From da01abb3398ecd427c34b5cef10514fc461afcec Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sat, 10 Sep 2022 00:36:16 +0200 Subject: [PATCH 01/94] added functions for splitting up markdown files --- .vscode/settings.json | 3 + src/converters/obsidian/obsidianNodes.test.ts | 88 +++++++++++++++++++ src/converters/obsidian/obsidianNodes.ts | 87 ++++++++++++++++++ .../obsidian/obsidianNodes.types.ts | 16 ++++ src/converters/obsidian/utils.test.ts | 12 +++ src/converters/obsidian/utils.ts | 11 +++ src/types/types.ts | 2 +- 7 files changed, 218 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json create mode 100644 src/converters/obsidian/obsidianNodes.test.ts create mode 100644 src/converters/obsidian/obsidianNodes.ts create mode 100644 src/converters/obsidian/obsidianNodes.types.ts create mode 100644 src/converters/obsidian/utils.test.ts create mode 100644 src/converters/obsidian/utils.ts diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..59fa617 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{"[markdown]": { + "editor.formatOnSave": false, + }} \ No newline at end of file diff --git a/src/converters/obsidian/obsidianNodes.test.ts b/src/converters/obsidian/obsidianNodes.test.ts new file mode 100644 index 0000000..1a3aae1 --- /dev/null +++ b/src/converters/obsidian/obsidianNodes.test.ts @@ -0,0 +1,88 @@ +import { expect, test } from '@jest/globals'; +import { readNodes } from './obsidianNodes'; +import { HierarchyType } from './obsidianNodes.types'; + +test('headings', () => { + expect(readNodes('## Heading')).toStrictEqual([ + { content: '## Heading', endPos: 9, level: 2, startPos: 0, type: HierarchyType.HEADING }, + ]); + expect(readNodes('## Heading\n')).toStrictEqual([ + { content: '## Heading', endPos: 9, level: 2, startPos: 0, type: HierarchyType.HEADING }, + ]); + expect(readNodes('## Heading\n\n')).toStrictEqual([ + { content: '## Heading', endPos: 9, level: 2, startPos: 0, type: HierarchyType.HEADING }, + ]); +}); + +test('paragraphs', () => { + expect(readNodes('Starting without heading.')).toStrictEqual([ + { content: 'Starting without heading.', endPos: 24, level: 0, startPos: 0, type: HierarchyType.PARAGRAPH }, + ]); + expect(readNodes('Starting without heading.\n')).toStrictEqual([ + { content: 'Starting without heading.', endPos: 24, level: 0, startPos: 0, type: HierarchyType.PARAGRAPH }, + ]); + expect(readNodes('Starting without heading.\n\n')).toStrictEqual([ + { content: 'Starting without heading.', endPos: 24, level: 0, startPos: 0, type: HierarchyType.PARAGRAPH }, + ]); + expect(readNodes('Directly followed by hierachy.\n# Heading')).toStrictEqual([ + { content: 'Directly followed by hierachy.', endPos: 29, level: 0, startPos: 0, type: HierarchyType.PARAGRAPH }, + { content: '# Heading', endPos: 39, level: 1, startPos: 31, type: HierarchyType.HEADING }, + ]); + expect(readNodes('# Heading\nPrefixed by hierachy.')).toStrictEqual([ + { content: '# Heading', endPos: 8, level: 1, startPos: 0, type: HierarchyType.HEADING }, + { content: 'Prefixed by hierachy.', endPos: 30, level: 0, startPos: 10, type: HierarchyType.PARAGRAPH }, + ]); + expect(readNodes('# Heading\n\nPrefixed by hierachy.')).toStrictEqual([ + { content: '# Heading', endPos: 8, level: 1, startPos: 0, type: HierarchyType.HEADING }, + { content: 'Prefixed by hierachy.', endPos: 31, level: 0, startPos: 11, type: HierarchyType.PARAGRAPH }, + ]); +}); + +test('outliner nodes', () => { + expect( + readNodes( + `- Some + - Node + - Fun`, + ), + ).toStrictEqual([ + { + content: '- Some', + endPos: 5, + level: 0, + startPos: 0, + type: HierarchyType.OUTLINE, + }, + { + content: ' - Node', + endPos: 16, + level: 4, + startPos: 7, + type: HierarchyType.OUTLINE, + }, + { + content: ' - Fun', + endPos: 24, + level: 2, + startPos: 18, + type: HierarchyType.OUTLINE, + }, + ]); + expect( + readNodes( + `- Node with multi lines work. + As long as the empty space is equivalent. + How many you like.`, + ), + ).toStrictEqual([ + { + content: `- Node with multi lines work. + As long as the empty space is equivalent. + How many you like.`, + endPos: 93, + level: 0, + startPos: 0, + type: HierarchyType.OUTLINE, + }, + ]); +}); diff --git a/src/converters/obsidian/obsidianNodes.ts b/src/converters/obsidian/obsidianNodes.ts new file mode 100644 index 0000000..e324e36 --- /dev/null +++ b/src/converters/obsidian/obsidianNodes.ts @@ -0,0 +1,87 @@ +import { NodeDescription, Hierarchy, HierarchyType } from './obsidianNodes.types'; +import { countEmptySpace, nextNewLine } from './utils'; + +export function readNodes(content: string): NodeDescription[] { + const nodeDescs: NodeDescription[] = []; + + for (let index = 0; index < content.length; index++) { + const element = content[index]; + if (element == '\n') continue; + const hierarchy = getHierarchy(element, content, index); + const endPos = endPosition(content, index, hierarchy); + nodeDescs.push({ ...hierarchy, endPos, startPos: index, content: content.slice(index, endPos + 1) }); + + index = endPos; + } + + return nodeDescs; +} + +const HIERARCHY_INDICATORS = ['#', '*', '-']; + +function isOutlinerNode(char: string) { + return char === '*' || char === '-'; +} + +export function getHierarchy(curChar: string, content: string, curPosition: number): Hierarchy { + if (curChar === '#') { + let pos = curPosition + 1; + let char = content[pos]; + while (char === '#') { + pos++; + char = content[pos]; + } + if (char === ' ') { + return { type: HierarchyType.HEADING, level: pos - curPosition }; + } else { + //is a paragraph that starts with #'s + return { type: HierarchyType.PARAGRAPH, level: 0 }; + } + } + + //for nodes we need a precise level === empty space, so we can detect multi line node content + const emptySpaces = countEmptySpace(content, curPosition); + if (isOutlinerNode(content[curPosition + emptySpaces]) && content[curPosition + emptySpaces + 1] === ' ') { + return { type: HierarchyType.OUTLINE, level: Math.max(emptySpaces) }; + } + + return { type: HierarchyType.PARAGRAPH, level: 0 }; +} + +export function endPosition(content: string, curPosition: number, hierarchy: Hierarchy): number { + let endPosition = nextNewLine(content, curPosition); + let char = content[endPosition]; + + if (char === undefined || hierarchy.type === HierarchyType.HEADING) { + return endPosition - 1; + } + + if (hierarchy.type === HierarchyType.OUTLINE) { + while (true) { + //new lines that start with the number of empty spaces of the level+1 are considered part of the node + const emptySpaces = countEmptySpace(content, endPosition + 1); + if (emptySpaces == hierarchy.level + 2) { + endPosition = nextNewLine(content, endPosition + 1); + char = content[endPosition]; + } else { + return endPosition - 1; + } + if (char === undefined) return endPosition - 1; + } + } + + if (hierarchy.type === HierarchyType.PARAGRAPH) { + endPosition++; + char = content[endPosition]; + //paragraphs end with double newlines or a new hierarchy + while (true) { + if (char === '\n' || HIERARCHY_INDICATORS.includes(char) || char === undefined) { + return endPosition - 2; + } + endPosition++; + char = content[endPosition]; + } + } + + throw 'Hierarchy type not detected.'; +} diff --git a/src/converters/obsidian/obsidianNodes.types.ts b/src/converters/obsidian/obsidianNodes.types.ts new file mode 100644 index 0000000..7d94010 --- /dev/null +++ b/src/converters/obsidian/obsidianNodes.types.ts @@ -0,0 +1,16 @@ +export enum HierarchyType { + HEADING = 'Heading', + OUTLINE = 'Outliner Node', + PARAGRAPH = 'Paragraph', +} + +export interface Hierarchy { + type: HierarchyType; + level: number; +} + +export interface NodeDescription extends Hierarchy { + startPos: number; + endPos: number; + content: string; +} diff --git a/src/converters/obsidian/utils.test.ts b/src/converters/obsidian/utils.test.ts new file mode 100644 index 0000000..c1f9401 --- /dev/null +++ b/src/converters/obsidian/utils.test.ts @@ -0,0 +1,12 @@ +import { expect, test } from '@jest/globals'; +import { countEmptySpace, nextNewLine } from './utils'; + +test('empty space util', () => { + expect(countEmptySpace('a b c', 1)).toBe(3); + expect(countEmptySpace('a b c', 5)).toBe(1); +}); + +test('next newline util', () => { + expect(nextNewLine('\nfoo bar foobar', 2)).toBe('\nfoo bar foobar'.length); + expect(nextNewLine('foo \n\n bar', 2)).toBe(4); +}); diff --git a/src/converters/obsidian/utils.ts b/src/converters/obsidian/utils.ts new file mode 100644 index 0000000..07f7d2b --- /dev/null +++ b/src/converters/obsidian/utils.ts @@ -0,0 +1,11 @@ +export function countEmptySpace(content: string, curPosition: number, count = 0): number { + //we count tab as one empty space + if (content[curPosition] !== ' ' && content[curPosition] !== '\t') return count; + return countEmptySpace(content, curPosition + 1, count + 1); +} + +export function nextNewLine(content: string, curPosition: number, count = 0): number { + //end of file is also counted as newline for simplicity + if (content[curPosition + count] === undefined || content[curPosition + count] === '\n') return curPosition + count; + return nextNewLine(content, curPosition, count + 1); +} diff --git a/src/types/types.ts b/src/types/types.ts index b6f1d70..26de498 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -11,7 +11,7 @@ export type TanaIntermediateFile = { // all attributes attributes?: TanaIntermediateAttribute[]; - // all attributes + // all supertags supertags?: TanaIntermediateSupertag[]; }; From 675181662baec9bbcb94d0d3220511dcdddb34b0 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Tue, 13 Sep 2022 22:46:47 +0200 Subject: [PATCH 02/94] added conversion of obsidan nodes to tana nodes --- src/converters/obsidian/fileConverter.ts | 110 ++++++++++++++++++ src/converters/obsidian/obsidianNodes.ts | 45 +++++-- .../obsidian/obsidianNodes.types.ts | 16 --- .../obsidian/tests/fileConverter.test.ts | 68 +++++++++++ .../tests/fixtures/vault/folder/test2.md | 15 +++ .../obsidian/tests/fixtures/vault/test.md | 15 +++ .../{ => tests}/obsidianNodes.test.ts | 81 ++++++++++++- .../obsidian/{ => tests}/utils.test.ts | 2 +- .../obsidian/tests/vaultConverter.test.ts | 9 ++ src/converters/obsidian/vaultConverter.ts | 46 ++++++++ 10 files changed, 378 insertions(+), 29 deletions(-) create mode 100644 src/converters/obsidian/fileConverter.ts delete mode 100644 src/converters/obsidian/obsidianNodes.types.ts create mode 100644 src/converters/obsidian/tests/fileConverter.test.ts create mode 100644 src/converters/obsidian/tests/fixtures/vault/folder/test2.md create mode 100644 src/converters/obsidian/tests/fixtures/vault/test.md rename src/converters/obsidian/{ => tests}/obsidianNodes.test.ts (59%) rename src/converters/obsidian/{ => tests}/utils.test.ts (85%) create mode 100644 src/converters/obsidian/tests/vaultConverter.test.ts create mode 100644 src/converters/obsidian/vaultConverter.ts diff --git a/src/converters/obsidian/fileConverter.ts b/src/converters/obsidian/fileConverter.ts new file mode 100644 index 0000000..f80ab1b --- /dev/null +++ b/src/converters/obsidian/fileConverter.ts @@ -0,0 +1,110 @@ +import { TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; +import { getBracketLinks, idgenerator } from '../../utils/utils'; +import { HierarchyType, ObsidianNode, readNodes } from './obsidianNodes'; + +function createChildNode(obsidianNode: ObsidianNode, today: number, idGenerator: IdGenerator): TanaIntermediateNode { + return { uid: idGenerator(), name: obsidianNode.content, createdAt: today, editedAt: today, type: 'node' }; +} + +function createRootNode(fileName: string, today: number): TanaIntermediateNode { + return { uid: fileName, name: '', createdAt: today, editedAt: today, type: 'node' }; +} + +type IdGenerator = () => string; + +export function convertObsidianFile( + fileName: string, //without ending + fileContent: string, + summary: TanaIntermediateSummary = { + leafNodes: 0, + topLevelNodes: 0, + totalNodes: 0, + calendarNodes: 0, + fields: 0, + brokenRefs: 0, + }, + today: number = Date.now(), + idGenerator: IdGenerator = idgenerator, +) { + const rootNode = createRootNode(fileName, today); + summary.topLevelNodes++; + const obsidianNodes = readNodes(fileContent); + summary.leafNodes += obsidianNodes.length; + summary.totalNodes += 1 + obsidianNodes.length; + //TODO: broken refs + + const lastObsidianNodes: ObsidianNode[] = [{ type: HierarchyType.ROOT, level: -1 } as ObsidianNode]; + const lastTanaNodes = [rootNode]; + + for (const node of obsidianNodes) { + const childNode = createChildNode(node, today, idGenerator); + processRawTanaNode(childNode); + insertNodeIntoHierarchy(childNode, node, lastObsidianNodes, lastTanaNodes); + } + + return [rootNode, summary]; +} + +function processRawTanaNode(tanaNode: TanaIntermediateNode) { + //TODO: links to headings [[..#..]] / blocks [[filename#^dcf64c]] + //TODO: aliases + //TODO: convert to different node types, remove markdown formatting etc. + const foundUids = getBracketLinks(tanaNode.name, true); + + if (foundUids.length > 0) { + tanaNode.refs = foundUids; + } +} + +function insertNodeIntoHierarchy( + tanaNode: TanaIntermediateNode, + obsidianNode: ObsidianNode, + lastObsidianNodes: ObsidianNode[], + lastTanaNodes: TanaIntermediateNode[], +) { + //once the non-parent nodes are removed, the next one is the parent + removeNonParentNodes(obsidianNode, lastObsidianNodes, lastTanaNodes); + let lastObsidianNode = lastObsidianNodes[lastObsidianNodes.length - 1]; + let lastTanaNode = lastTanaNodes[lastTanaNodes.length - 1]; + if (lastObsidianNode && lastTanaNode) { + lastTanaNode.children = lastTanaNode.children ?? []; + lastTanaNode.children.push(tanaNode); + } + lastObsidianNodes.push(obsidianNode); + lastTanaNodes.push(tanaNode); +} + +function removeNonParentNodes( + obsidianNode: ObsidianNode, + lastObsidianNodes: ObsidianNode[], + lastTanaNodes: TanaIntermediateNode[], +) { + let lastObsidianNode = lastObsidianNodes[lastObsidianNodes.length - 1]; + let lastTanaNode = lastTanaNodes[lastTanaNodes.length - 1]; + while (lastObsidianNode && lastTanaNode && !isChild(lastObsidianNode, obsidianNode)) { + lastObsidianNodes.pop(); + lastTanaNodes.pop(); + lastObsidianNode = lastObsidianNodes[lastObsidianNodes.length - 1]; + lastTanaNode = lastTanaNodes[lastTanaNodes.length - 1]; + } +} + +function isChild(potentialParent: ObsidianNode, potentialChild: ObsidianNode) { + if (potentialParent.type === HierarchyType.ROOT) return true; + + //HEADING is always a parent of non-headings + if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) { + return true; + } + + //PARAGRAPH can only be child of HEADING and can not be a parent + if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) { + return false; + } + + if (potentialParent.type === potentialChild.type) { + return potentialParent.level < potentialChild.level; + } + + return false; +} diff --git a/src/converters/obsidian/obsidianNodes.ts b/src/converters/obsidian/obsidianNodes.ts index e324e36..fdce3ce 100644 --- a/src/converters/obsidian/obsidianNodes.ts +++ b/src/converters/obsidian/obsidianNodes.ts @@ -1,14 +1,33 @@ -import { NodeDescription, Hierarchy, HierarchyType } from './obsidianNodes.types'; import { countEmptySpace, nextNewLine } from './utils'; -export function readNodes(content: string): NodeDescription[] { - const nodeDescs: NodeDescription[] = []; +export enum HierarchyType { + ROOT = 'Root', + HEADING = 'Heading', + OUTLINE = 'Outliner Node', + PARAGRAPH = 'Paragraph', +} + +export interface Hierarchy { + type: HierarchyType; + //lower = higher in the hierarchy + //for outliner nodes also used as a measure of empty space + level: number; +} + +export interface ObsidianNode extends Hierarchy { + startPos: number; + endPos: number; + content: string; +} + +export function readNodes(content: string): ObsidianNode[] { + const nodeDescs: ObsidianNode[] = []; for (let index = 0; index < content.length; index++) { const element = content[index]; if (element == '\n') continue; const hierarchy = getHierarchy(element, content, index); - const endPos = endPosition(content, index, hierarchy); + const endPos = findEndPosition(content, index, hierarchy); nodeDescs.push({ ...hierarchy, endPos, startPos: index, content: content.slice(index, endPos + 1) }); index = endPos; @@ -17,9 +36,7 @@ export function readNodes(content: string): NodeDescription[] { return nodeDescs; } -const HIERARCHY_INDICATORS = ['#', '*', '-']; - -function isOutlinerNode(char: string) { +function isOutlinerNodeStart(char: string) { return char === '*' || char === '-'; } @@ -41,14 +58,20 @@ export function getHierarchy(curChar: string, content: string, curPosition: numb //for nodes we need a precise level === empty space, so we can detect multi line node content const emptySpaces = countEmptySpace(content, curPosition); - if (isOutlinerNode(content[curPosition + emptySpaces]) && content[curPosition + emptySpaces + 1] === ' ') { + if (isOutlinerNodeStart(content[curPosition + emptySpaces]) && content[curPosition + emptySpaces + 1] === ' ') { return { type: HierarchyType.OUTLINE, level: Math.max(emptySpaces) }; } return { type: HierarchyType.PARAGRAPH, level: 0 }; } -export function endPosition(content: string, curPosition: number, hierarchy: Hierarchy): number { +const HIERARCHY_INDICATORS = ['#', '*', '-']; + +//TODO: change to return str instead of just searching endpos for even less O(n) +/** + * Returns the index in the content-string of the endposition of the current obsidian node. + */ +export function findEndPosition(content: string, curPosition: number, hierarchy: Hierarchy): number { let endPosition = nextNewLine(content, curPosition); let char = content[endPosition]; @@ -71,13 +94,15 @@ export function endPosition(content: string, curPosition: number, hierarchy: Hie } if (hierarchy.type === HierarchyType.PARAGRAPH) { + let lastChar = char; endPosition++; char = content[endPosition]; //paragraphs end with double newlines or a new hierarchy while (true) { - if (char === '\n' || HIERARCHY_INDICATORS.includes(char) || char === undefined) { + if ((char === '\n' && lastChar === '\n') || HIERARCHY_INDICATORS.includes(char) || char === undefined) { return endPosition - 2; } + lastChar = char; endPosition++; char = content[endPosition]; } diff --git a/src/converters/obsidian/obsidianNodes.types.ts b/src/converters/obsidian/obsidianNodes.types.ts deleted file mode 100644 index 7d94010..0000000 --- a/src/converters/obsidian/obsidianNodes.types.ts +++ /dev/null @@ -1,16 +0,0 @@ -export enum HierarchyType { - HEADING = 'Heading', - OUTLINE = 'Outliner Node', - PARAGRAPH = 'Paragraph', -} - -export interface Hierarchy { - type: HierarchyType; - level: number; -} - -export interface NodeDescription extends Hierarchy { - startPos: number; - endPos: number; - content: string; -} diff --git a/src/converters/obsidian/tests/fileConverter.test.ts b/src/converters/obsidian/tests/fileConverter.test.ts new file mode 100644 index 0000000..be3ac34 --- /dev/null +++ b/src/converters/obsidian/tests/fileConverter.test.ts @@ -0,0 +1,68 @@ +import { expect, test } from '@jest/globals'; +import { readFileSync } from 'fs'; +import { convertObsidianFile } from '../fileConverter'; + +test('obsidian file converter', () => { + const fileContent = readFileSync('./src/converters/obsidian/tests/fixtures/vault/test.md', 'utf-8'); + const result = convertObsidianFile('test', fileContent, undefined, 1, () => 'uid'); + + expect(result).toStrictEqual([ + { + createdAt: 1, + editedAt: 1, + name: '', + type: 'node', + uid: 'test', + children: [ + { + createdAt: 1, + editedAt: 1, + name: 'Starting without [[heading]].', + refs: ['heading'], + type: 'node', + uid: 'uid', + }, + { + children: [ + { createdAt: 1, editedAt: 1, name: '[[Some]]', refs: ['Some'], type: 'node', uid: 'uid' }, + { createdAt: 1, editedAt: 1, name: 'Stuff but with\na newline.', type: 'node', uid: 'uid' }, + { + children: [ + { + children: [ + { + createdAt: 1, + editedAt: 1, + name: ' - Node with [[Link]] [[Link2]]', + refs: ['Link', 'Link2'], + type: 'node', + uid: 'uid', + }, + { createdAt: 1, editedAt: 1, name: ' - Fun', type: 'node', uid: 'uid' }, + ], + createdAt: 1, + editedAt: 1, + name: '- Some', + type: 'node', + uid: 'uid', + }, + { createdAt: 1, editedAt: 1, name: '#### Out of Level', type: 'node', uid: 'uid' }, + ], + createdAt: 1, + editedAt: 1, + name: '## Heading 2', + type: 'node', + uid: 'uid', + }, + ], + createdAt: 1, + editedAt: 1, + name: '# Heading here', + type: 'node', + uid: 'uid', + }, + ], + }, + { brokenRefs: 0, calendarNodes: 0, fields: 0, leafNodes: 9, topLevelNodes: 1, totalNodes: 10 }, + ]); +}); diff --git a/src/converters/obsidian/tests/fixtures/vault/folder/test2.md b/src/converters/obsidian/tests/fixtures/vault/folder/test2.md new file mode 100644 index 0000000..6910bf5 --- /dev/null +++ b/src/converters/obsidian/tests/fixtures/vault/folder/test2.md @@ -0,0 +1,15 @@ +Starting without [[heading]] 2. +# Heading here + +[[Some]] + +Stuff but with +a newline. + +## Heading 2 + +- Some + - Node with [[Link]] [[Link2]] + - Fun + +#### Out of Level diff --git a/src/converters/obsidian/tests/fixtures/vault/test.md b/src/converters/obsidian/tests/fixtures/vault/test.md new file mode 100644 index 0000000..5c0ef7b --- /dev/null +++ b/src/converters/obsidian/tests/fixtures/vault/test.md @@ -0,0 +1,15 @@ +Starting without [[heading]]. +# Heading here + +[[Some]] + +Stuff but with +a newline. + +## Heading 2 + +- Some + - Node with [[Link]] [[Link2]] + - Fun + +#### Out of Level diff --git a/src/converters/obsidian/obsidianNodes.test.ts b/src/converters/obsidian/tests/obsidianNodes.test.ts similarity index 59% rename from src/converters/obsidian/obsidianNodes.test.ts rename to src/converters/obsidian/tests/obsidianNodes.test.ts index 1a3aae1..ede005e 100644 --- a/src/converters/obsidian/obsidianNodes.test.ts +++ b/src/converters/obsidian/tests/obsidianNodes.test.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; -import { readNodes } from './obsidianNodes'; -import { HierarchyType } from './obsidianNodes.types'; +import { readFileSync } from 'fs'; +import { HierarchyType, readNodes } from '../obsidianNodes'; test('headings', () => { expect(readNodes('## Heading')).toStrictEqual([ @@ -36,9 +36,18 @@ test('paragraphs', () => { { content: '# Heading', endPos: 8, level: 1, startPos: 0, type: HierarchyType.HEADING }, { content: 'Prefixed by hierachy.', endPos: 31, level: 0, startPos: 11, type: HierarchyType.PARAGRAPH }, ]); + expect(readNodes('Stuff but with\na newline.\n\n')).toStrictEqual([ + { content: 'Stuff but with\na newline.', endPos: 24, level: 0, startPos: 0, type: HierarchyType.PARAGRAPH }, + ]); }); test('outliner nodes', () => { + expect(readNodes('- Node')).toStrictEqual([ + { content: '- Node', endPos: 5, level: 0, startPos: 0, type: HierarchyType.OUTLINE }, + ]); + expect(readNodes(' - Node')).toStrictEqual([ + { content: ' - Node', endPos: 6, level: 1, startPos: 0, type: HierarchyType.OUTLINE }, + ]); expect( readNodes( `- Some @@ -86,3 +95,71 @@ test('outliner nodes', () => { }, ]); }); + +test('mixed nodes', () => { + expect(readNodes(readFileSync('./src/converters/obsidian/tests/fixtures/vault/test.md', 'utf-8'))).toStrictEqual([ + { + content: 'Starting without [[heading]].', + endPos: 28, + level: 0, + startPos: 0, + type: HierarchyType.PARAGRAPH, + }, + { + content: '# Heading here', + endPos: 43, + level: 1, + startPos: 30, + type: HierarchyType.HEADING, + }, + { + content: '[[Some]]', + endPos: 53, + level: 0, + startPos: 46, + type: HierarchyType.PARAGRAPH, + }, + { + content: 'Stuff but with\na newline.', + endPos: 80, + level: 0, + startPos: 56, + type: HierarchyType.PARAGRAPH, + }, + { + content: '## Heading 2', + endPos: 94, + level: 2, + startPos: 83, + type: HierarchyType.HEADING, + }, + { + content: '- Some', + endPos: 102, + level: 0, + startPos: 97, + type: HierarchyType.OUTLINE, + }, + { + content: ' - Node with [[Link]] [[Link2]]', + endPos: 137, + level: 4, + startPos: 104, + type: HierarchyType.OUTLINE, + }, + { + content: ' - Fun', + endPos: 145, + level: 2, + startPos: 139, + type: HierarchyType.OUTLINE, + }, + { + content: '#### Out of Level', + endPos: 164, + level: 4, + startPos: 148, + type: HierarchyType.HEADING, + }, + ]); +}); diff --git a/src/converters/obsidian/utils.test.ts b/src/converters/obsidian/tests/utils.test.ts similarity index 85% rename from src/converters/obsidian/utils.test.ts rename to src/converters/obsidian/tests/utils.test.ts index c1f9401..806a70a 100644 --- a/src/converters/obsidian/utils.test.ts +++ b/src/converters/obsidian/tests/utils.test.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { countEmptySpace, nextNewLine } from './utils'; +import { countEmptySpace, nextNewLine } from '../utils'; test('empty space util', () => { expect(countEmptySpace('a b c', 1)).toBe(3); diff --git a/src/converters/obsidian/tests/vaultConverter.test.ts b/src/converters/obsidian/tests/vaultConverter.test.ts new file mode 100644 index 0000000..93444ec --- /dev/null +++ b/src/converters/obsidian/tests/vaultConverter.test.ts @@ -0,0 +1,9 @@ +import { expect, test } from '@jest/globals'; +import { readFileSync } from 'fs'; +import { convertObsidianFile } from '../fileConverter'; +import { convertVault } from '../vaultConverter'; + +test('obsidian file converter', () => { + const fileContent = readFileSync('./src/converters/obsidian/tests/fixtures/vault/test.md', 'utf-8'); + convertVault('./src/converters/obsidian/tests/fixtures/vault'); +}); diff --git a/src/converters/obsidian/vaultConverter.ts b/src/converters/obsidian/vaultConverter.ts new file mode 100644 index 0000000..ef89480 --- /dev/null +++ b/src/converters/obsidian/vaultConverter.ts @@ -0,0 +1,46 @@ +import { appendFile, appendFileSync, readdirSync, readFileSync, writeFileSync } from 'fs'; +import path, { resolve } from 'path'; +import { TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; +import { convertObsidianFile } from './fileConverter'; + +//source: https://stackoverflow.com/questions/5827612/node-js-fs-readdir-recursive-directory-search +function* getFiles(dir: string): Generator { + const dirents = readdirSync(dir, { withFileTypes: true }); + for (const dirent of dirents) { + const res = resolve(dir, dirent.name); + if (dirent.isDirectory()) { + yield* getFiles(res); + } else { + yield res; + } + } +} + +/** + * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults. + */ +export function convertVault(vaultPath: string) { + const iter = getFiles(vaultPath); + + const targetFileName = `${path.basename(vaultPath)}.tif.json`; + appendFileSync(targetFileName, '{\n "version": "TanaIntermediateFile V0.1",\n "nodes": ['); + + let summary; + let addComma = false; + for (const filePath of iter) { + if (!filePath.endsWith('.md')) continue; + if (addComma) { + appendFileSync(targetFileName, ',\n'); + } + + const [fileNode, updatedSummary] = convertObsidianFile( + path.basename(filePath).replace('.md', ''), + readFileSync(filePath, 'utf-8'), + summary, + ) as [TanaIntermediateNode, TanaIntermediateSummary]; + summary = updatedSummary; + appendFileSync(targetFileName, JSON.stringify(fileNode, null, 2)); + addComma = true; + } + appendFileSync(targetFileName, '\n ]\n "summary": \n' + JSON.stringify(summary, null, 2) + '\n}'); +} From bc5d19c7442d34897eb2b0b1e5b61a147299a56e Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Tue, 13 Sep 2022 23:01:13 +0200 Subject: [PATCH 03/94] added integration test for obsidian vault converter --- src/converters/obsidian/fileConverter.ts | 2 +- .../obsidian/tests/fixtures/test.tif.json | 175 ++++++++++++++++++ .../obsidian/tests/vaultConverter.test.ts | 12 +- src/converters/obsidian/vaultConverter.ts | 19 +- 4 files changed, 196 insertions(+), 12 deletions(-) create mode 100644 src/converters/obsidian/tests/fixtures/test.tif.json diff --git a/src/converters/obsidian/fileConverter.ts b/src/converters/obsidian/fileConverter.ts index f80ab1b..e9d86f4 100644 --- a/src/converters/obsidian/fileConverter.ts +++ b/src/converters/obsidian/fileConverter.ts @@ -10,7 +10,7 @@ function createRootNode(fileName: string, today: number): TanaIntermediateNode { return { uid: fileName, name: '', createdAt: today, editedAt: today, type: 'node' }; } -type IdGenerator = () => string; +export type IdGenerator = () => string; export function convertObsidianFile( fileName: string, //without ending diff --git a/src/converters/obsidian/tests/fixtures/test.tif.json b/src/converters/obsidian/tests/fixtures/test.tif.json new file mode 100644 index 0000000..f9ac7b8 --- /dev/null +++ b/src/converters/obsidian/tests/fixtures/test.tif.json @@ -0,0 +1,175 @@ +{ + "version": "TanaIntermediateFile V0.1", + "nodes": [ + { + "uid": "test2", + "name": "", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "uid", + "name": "Starting without [[heading]] 2.", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["heading"] + }, + { + "uid": "uid", + "name": "# Heading here", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "uid", + "name": "[[Some]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["Some"] + }, + { + "uid": "uid", + "name": "Stuff but with\na newline.", + "createdAt": 1, + "editedAt": 1, + "type": "node" + }, + { + "uid": "uid", + "name": "## Heading 2", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "uid", + "name": "- Some", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "uid", + "name": " - Node with [[Link]] [[Link2]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["Link", "Link2"] + }, + { + "uid": "uid", + "name": " - Fun", + "createdAt": 1, + "editedAt": 1, + "type": "node" + } + ] + }, + { + "uid": "uid", + "name": "#### Out of Level", + "createdAt": 1, + "editedAt": 1, + "type": "node" + } + ] + } + ] + } + ] + }, + { + "uid": "test", + "name": "", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "uid", + "name": "Starting without [[heading]].", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["heading"] + }, + { + "uid": "uid", + "name": "# Heading here", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "uid", + "name": "[[Some]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["Some"] + }, + { + "uid": "uid", + "name": "Stuff but with\na newline.", + "createdAt": 1, + "editedAt": 1, + "type": "node" + }, + { + "uid": "uid", + "name": "## Heading 2", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "uid", + "name": "- Some", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "uid", + "name": " - Node with [[Link]] [[Link2]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["Link", "Link2"] + }, + { + "uid": "uid", + "name": " - Fun", + "createdAt": 1, + "editedAt": 1, + "type": "node" + } + ] + }, + { + "uid": "uid", + "name": "#### Out of Level", + "createdAt": 1, + "editedAt": 1, + "type": "node" + } + ] + } + ] + } + ] + } + ], + "summary": { + "leafNodes": 18, + "topLevelNodes": 2, + "totalNodes": 20, + "calendarNodes": 0, + "fields": 0, + "brokenRefs": 0 + } +} diff --git a/src/converters/obsidian/tests/vaultConverter.test.ts b/src/converters/obsidian/tests/vaultConverter.test.ts index 93444ec..8c1c684 100644 --- a/src/converters/obsidian/tests/vaultConverter.test.ts +++ b/src/converters/obsidian/tests/vaultConverter.test.ts @@ -1,9 +1,11 @@ import { expect, test } from '@jest/globals'; -import { readFileSync } from 'fs'; -import { convertObsidianFile } from '../fileConverter'; +import { readFileSync, unlinkSync } from 'fs'; import { convertVault } from '../vaultConverter'; -test('obsidian file converter', () => { - const fileContent = readFileSync('./src/converters/obsidian/tests/fixtures/vault/test.md', 'utf-8'); - convertVault('./src/converters/obsidian/tests/fixtures/vault'); +test('obsidian vault converter', () => { + convertVault('./src/converters/obsidian/tests/fixtures/vault', 1, () => 'uid'); + const result = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/vault.tif.json', 'utf-8')); + unlinkSync('./src/converters/obsidian/tests/fixtures/vault.tif.json'); + const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/test.tif.json', 'utf-8')); + expect(result).toStrictEqual(expected); }); diff --git a/src/converters/obsidian/vaultConverter.ts b/src/converters/obsidian/vaultConverter.ts index ef89480..0842d04 100644 --- a/src/converters/obsidian/vaultConverter.ts +++ b/src/converters/obsidian/vaultConverter.ts @@ -1,7 +1,8 @@ -import { appendFile, appendFileSync, readdirSync, readFileSync, writeFileSync } from 'fs'; +import { appendFile, appendFileSync, readdirSync, readFileSync, unlinkSync, writeFileSync } from 'fs'; import path, { resolve } from 'path'; import { TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; -import { convertObsidianFile } from './fileConverter'; +import { idgenerator } from '../../utils/utils'; +import { convertObsidianFile, IdGenerator } from './fileConverter'; //source: https://stackoverflow.com/questions/5827612/node-js-fs-readdir-recursive-directory-search function* getFiles(dir: string): Generator { @@ -18,12 +19,16 @@ function* getFiles(dir: string): Generator { /** * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults. + * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly. */ -export function convertVault(vaultPath: string) { +export function convertVault(vaultPath: string, today: number = Date.now(), idGenerator: IdGenerator = idgenerator) { const iter = getFiles(vaultPath); - const targetFileName = `${path.basename(vaultPath)}.tif.json`; - appendFileSync(targetFileName, '{\n "version": "TanaIntermediateFile V0.1",\n "nodes": ['); + const targetFileName = `${vaultPath}.tif.json`; + try { + unlinkSync(targetFileName); + } catch (e) {} + appendFileSync(targetFileName, '{\n "version": "TanaIntermediateFile V0.1",\n "nodes": [\n'); let summary; let addComma = false; @@ -37,10 +42,12 @@ export function convertVault(vaultPath: string) { path.basename(filePath).replace('.md', ''), readFileSync(filePath, 'utf-8'), summary, + today, + idGenerator, ) as [TanaIntermediateNode, TanaIntermediateSummary]; summary = updatedSummary; appendFileSync(targetFileName, JSON.stringify(fileNode, null, 2)); addComma = true; } - appendFileSync(targetFileName, '\n ]\n "summary": \n' + JSON.stringify(summary, null, 2) + '\n}'); + appendFileSync(targetFileName, '\n ],\n "summary": \n' + JSON.stringify(summary, null, 2) + '\n}'); } From 39ad1d51fb6948a82636f024d0851878f5a1a2a4 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Tue, 13 Sep 2022 23:12:47 +0200 Subject: [PATCH 04/94] added obsidian converters to runner --- src/converters/obsidian/fileConverter.ts | 12 +++- src/converters/obsidian/vaultConverter.ts | 2 + src/runner.ts | 81 +++++++++++++++-------- 3 files changed, 68 insertions(+), 27 deletions(-) diff --git a/src/converters/obsidian/fileConverter.ts b/src/converters/obsidian/fileConverter.ts index e9d86f4..6c63bf4 100644 --- a/src/converters/obsidian/fileConverter.ts +++ b/src/converters/obsidian/fileConverter.ts @@ -1,4 +1,4 @@ -import { TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; +import { TanaIntermediateFile, TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; import { getBracketLinks, idgenerator } from '../../utils/utils'; import { HierarchyType, ObsidianNode, readNodes } from './obsidianNodes'; @@ -12,6 +12,16 @@ function createRootNode(fileName: string, today: number): TanaIntermediateNode { export type IdGenerator = () => string; +export function ObsidianSingleFileConverter(fileName: string, fileContent: string): TanaIntermediateFile { + const [node, summary] = convertObsidianFile(fileName, fileContent) as [TanaIntermediateNode, TanaIntermediateSummary]; + + return { + version: 'TanaIntermediateFile V0.1', + summary, + nodes: [node], + }; +} + export function convertObsidianFile( fileName: string, //without ending fileContent: string, diff --git a/src/converters/obsidian/vaultConverter.ts b/src/converters/obsidian/vaultConverter.ts index 0842d04..87ea081 100644 --- a/src/converters/obsidian/vaultConverter.ts +++ b/src/converters/obsidian/vaultConverter.ts @@ -50,4 +50,6 @@ export function convertVault(vaultPath: string, today: number = Date.now(), idGe addComma = true; } appendFileSync(targetFileName, '\n ],\n "summary": \n' + JSON.stringify(summary, null, 2) + '\n}'); + + return summary; } diff --git a/src/runner.ts b/src/runner.ts index 6dcee26..e4da6df 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -4,6 +4,10 @@ import * as fs from 'fs'; import { RoamConverter } from './converters/roam/index'; import { TanaIntermediateFile } from './types/types'; import { WorkflowyConverter } from './converters/workflowy'; +import { lstatSync } from 'fs'; +import { ObsidianSingleFileConverter } from './converters/obsidian/fileConverter'; +import path from 'path'; +import { convertVault } from './converters/obsidian/vaultConverter'; const fileType = process.argv[2]; const file = process.argv[3]; @@ -14,45 +18,70 @@ if (!fileType) { } if (!file) { - console.log('No file provided'); + console.log('No file or folder provided'); exit(0); } -const supportedTypes = ['roam', 'workflowy']; +const supportedTypes = ['roam', 'workflowy', 'obsidian']; if (!supportedTypes.includes(fileType)) { console.log(`File type: ${fileType} is not supported`); exit(0); } -console.log(`\n\nReading file: ${file} for import as: ${fileType}`); +function handleSingleFileConversion() { + console.log(`\n\nReading file: ${file} for import as: ${fileType}`); -const contents = fs.readFileSync(file, 'utf8'); -console.log('File length:', contents.length); + const contents = fs.readFileSync(file, 'utf8'); + console.log('File length:', contents.length); -function saveFile(fileName: string, tanaIntermediteNodes: TanaIntermediateFile) { - const targetFileName = `${fileName}.tif.json`; - fs.writeFileSync(targetFileName, JSON.stringify(tanaIntermediteNodes, null, 2)); - console.log(`Tana Intermediate Nodes written to : ${targetFileName}`); -} + function saveFile(fileName: string, tanaIntermediteNodes: TanaIntermediateFile) { + const targetFileName = `${fileName}.tif.json`; + fs.writeFileSync(targetFileName, JSON.stringify(tanaIntermediteNodes, null, 2)); + console.log(`Tana Intermediate Nodes written to : ${targetFileName}`); + } + + let tanaIntermediteFile = undefined; + switch (fileType) { + case 'roam': + tanaIntermediteFile = new RoamConverter().convert(contents); + break; + case 'workflowy': + tanaIntermediteFile = new WorkflowyConverter().convert(contents); + break; + case 'obsidian': + tanaIntermediteFile = ObsidianSingleFileConverter(path.basename(file).replace('.md', ''), contents); + break; + default: + console.log(`File type ${fileType} is not supported for single files`); + exit(0); + } -let tanaIntermediteFile = undefined; -switch (fileType) { - case 'roam': - tanaIntermediteFile = new RoamConverter().convert(contents); - break; - case 'workflowy': - tanaIntermediteFile = new WorkflowyConverter().convert(contents); - break; - default: - console.log(`File type ${fileType} is not supported`); + if (!tanaIntermediteFile) { + console.log('No nodes found'); exit(0); -} + } -if (!tanaIntermediteFile) { - console.log('No nodes found'); - exit(0); + console.dir(tanaIntermediteFile.summary); + + saveFile(file, tanaIntermediteFile); } -console.dir(tanaIntermediteFile.summary); +function handleFolderConversion() { + console.log(`\n\nReading folder: ${file} for import as: ${fileType}`); + let summary; + switch (fileType) { + case 'obsidian': + summary = convertVault(file); + break; + default: + console.log(`File type ${fileType} is not supported for folders`); + exit(0); + } + console.dir(summary); +} -saveFile(file, tanaIntermediteFile); +if (lstatSync(file).isDirectory()) { + handleFolderConversion(); +} else { + handleSingleFileConversion(); +} From 398a40c1bc0e2366fe9484ce7e242ba2c57b1c83 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Tue, 13 Sep 2022 23:20:45 +0200 Subject: [PATCH 05/94] added obsidian converter to scripts --- package.json | 1 + src/converters/obsidian/vaultConverter.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/package.json b/package.json index 1144374..22b21d1 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "build": "yarn prepare", "convert:roam": "yarn build && node --experimental-modules --es-module-specifier-resolution=node dist/runner.js roam", "convert:workflowy": "yarn build && node --experimental-modules --es-module-specifier-resolution=node dist/runner.js workflowy", + "convert:obsidian": "yarn build && node --experimental-modules --es-module-specifier-resolution=node dist/runner.js obsidian", "test": "jest" }, "devDependencies": { diff --git a/src/converters/obsidian/vaultConverter.ts b/src/converters/obsidian/vaultConverter.ts index 87ea081..01838d5 100644 --- a/src/converters/obsidian/vaultConverter.ts +++ b/src/converters/obsidian/vaultConverter.ts @@ -24,6 +24,10 @@ function* getFiles(dir: string): Generator { export function convertVault(vaultPath: string, today: number = Date.now(), idGenerator: IdGenerator = idgenerator) { const iter = getFiles(vaultPath); + if (vaultPath.endsWith('/')) { + vaultPath = vaultPath.slice(0, -1); + } + const targetFileName = `${vaultPath}.tif.json`; try { unlinkSync(targetFileName); From 883434c4a22b1aa02674c94b4d3782993d00ab0f Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Wed, 14 Sep 2022 00:00:29 +0200 Subject: [PATCH 06/94] remove basic markdown / empty space in obsidian converter --- src/converters/obsidian/obsidianNodes.ts | 38 +++++++- .../obsidian/tests/fileConverter.test.ts | 12 +-- .../obsidian/tests/fixtures/test.tif.json | 24 ++--- .../obsidian/tests/obsidianNodes.test.ts | 91 ++++++------------- 4 files changed, 82 insertions(+), 83 deletions(-) diff --git a/src/converters/obsidian/obsidianNodes.ts b/src/converters/obsidian/obsidianNodes.ts index fdce3ce..f7b42a6 100644 --- a/src/converters/obsidian/obsidianNodes.ts +++ b/src/converters/obsidian/obsidianNodes.ts @@ -15,8 +15,6 @@ export interface Hierarchy { } export interface ObsidianNode extends Hierarchy { - startPos: number; - endPos: number; content: string; } @@ -28,14 +26,48 @@ export function readNodes(content: string): ObsidianNode[] { if (element == '\n') continue; const hierarchy = getHierarchy(element, content, index); const endPos = findEndPosition(content, index, hierarchy); - nodeDescs.push({ ...hierarchy, endPos, startPos: index, content: content.slice(index, endPos + 1) }); + nodeDescs.push({ + ...hierarchy, + content: cutNodeContent(content, index, endPos, hierarchy), + }); + //we increment immediately afterwards due to the loop index = endPos; } return nodeDescs; } +function cutNodeContent(content: string, startPos: number, endPos: number, hierarchy: Hierarchy) { + let sliceStart = startPos; + let sliceEnd = endPos + 1; + + //removing prefixing empty space + let startChar = content[sliceStart]; + while (startChar === ' ' || startChar === '\t') { + sliceStart++; + startChar = content[sliceStart]; + } + + if (hierarchy.type === HierarchyType.OUTLINE) { + sliceStart += 2; //2 = *-char and empty space after that + } + + //TODO: might need to convert it + if (hierarchy.type === HierarchyType.HEADING) { + sliceStart += hierarchy.level + 1; //heading symbols and empty space after that + } + + //removing trailing empty space, newlines are already excluded + let endChar = content[sliceEnd - 1]; + while (endChar === ' ' || endChar === '\t') { + sliceEnd--; + endChar = content[sliceEnd - 1]; + } + + return content.slice(sliceStart, sliceEnd); +} + function isOutlinerNodeStart(char: string) { return char === '*' || char === '-'; } diff --git a/src/converters/obsidian/tests/fileConverter.test.ts b/src/converters/obsidian/tests/fileConverter.test.ts index be3ac34..ae3808b 100644 --- a/src/converters/obsidian/tests/fileConverter.test.ts +++ b/src/converters/obsidian/tests/fileConverter.test.ts @@ -33,31 +33,31 @@ test('obsidian file converter', () => { { createdAt: 1, editedAt: 1, - name: ' - Node with [[Link]] [[Link2]]', + name: 'Node with [[Link]] [[Link2]]', refs: ['Link', 'Link2'], type: 'node', uid: 'uid', }, - { createdAt: 1, editedAt: 1, name: ' - Fun', type: 'node', uid: 'uid' }, + { createdAt: 1, editedAt: 1, name: 'Fun', type: 'node', uid: 'uid' }, ], createdAt: 1, editedAt: 1, - name: '- Some', + name: 'Some', type: 'node', uid: 'uid', }, - { createdAt: 1, editedAt: 1, name: '#### Out of Level', type: 'node', uid: 'uid' }, + { createdAt: 1, editedAt: 1, name: 'Out of Level', type: 'node', uid: 'uid' }, ], createdAt: 1, editedAt: 1, - name: '## Heading 2', + name: 'Heading 2', type: 'node', uid: 'uid', }, ], createdAt: 1, editedAt: 1, - name: '# Heading here', + name: 'Heading here', type: 'node', uid: 'uid', }, diff --git a/src/converters/obsidian/tests/fixtures/test.tif.json b/src/converters/obsidian/tests/fixtures/test.tif.json index f9ac7b8..29c65e8 100644 --- a/src/converters/obsidian/tests/fixtures/test.tif.json +++ b/src/converters/obsidian/tests/fixtures/test.tif.json @@ -18,7 +18,7 @@ }, { "uid": "uid", - "name": "# Heading here", + "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", @@ -40,21 +40,21 @@ }, { "uid": "uid", - "name": "## Heading 2", + "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { "uid": "uid", - "name": "- Some", + "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { "uid": "uid", - "name": " - Node with [[Link]] [[Link2]]", + "name": "Node with [[Link]] [[Link2]]", "createdAt": 1, "editedAt": 1, "type": "node", @@ -62,7 +62,7 @@ }, { "uid": "uid", - "name": " - Fun", + "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" @@ -71,7 +71,7 @@ }, { "uid": "uid", - "name": "#### Out of Level", + "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" @@ -99,7 +99,7 @@ }, { "uid": "uid", - "name": "# Heading here", + "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", @@ -121,21 +121,21 @@ }, { "uid": "uid", - "name": "## Heading 2", + "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { "uid": "uid", - "name": "- Some", + "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { "uid": "uid", - "name": " - Node with [[Link]] [[Link2]]", + "name": "Node with [[Link]] [[Link2]]", "createdAt": 1, "editedAt": 1, "type": "node", @@ -143,7 +143,7 @@ }, { "uid": "uid", - "name": " - Fun", + "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" @@ -152,7 +152,7 @@ }, { "uid": "uid", - "name": "#### Out of Level", + "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" diff --git a/src/converters/obsidian/tests/obsidianNodes.test.ts b/src/converters/obsidian/tests/obsidianNodes.test.ts index ede005e..2f51007 100644 --- a/src/converters/obsidian/tests/obsidianNodes.test.ts +++ b/src/converters/obsidian/tests/obsidianNodes.test.ts @@ -3,51 +3,44 @@ import { readFileSync } from 'fs'; import { HierarchyType, readNodes } from '../obsidianNodes'; test('headings', () => { - expect(readNodes('## Heading')).toStrictEqual([ - { content: '## Heading', endPos: 9, level: 2, startPos: 0, type: HierarchyType.HEADING }, - ]); - expect(readNodes('## Heading\n')).toStrictEqual([ - { content: '## Heading', endPos: 9, level: 2, startPos: 0, type: HierarchyType.HEADING }, - ]); - expect(readNodes('## Heading\n\n')).toStrictEqual([ - { content: '## Heading', endPos: 9, level: 2, startPos: 0, type: HierarchyType.HEADING }, - ]); + expect(readNodes('## Heading ')).toStrictEqual([{ content: 'Heading', level: 2, type: HierarchyType.HEADING }]); + expect(readNodes('## Heading\n')).toStrictEqual([{ content: 'Heading', level: 2, type: HierarchyType.HEADING }]); + expect(readNodes('## Heading\n\n')).toStrictEqual([{ content: 'Heading', level: 2, type: HierarchyType.HEADING }]); }); test('paragraphs', () => { - expect(readNodes('Starting without heading.')).toStrictEqual([ - { content: 'Starting without heading.', endPos: 24, level: 0, startPos: 0, type: HierarchyType.PARAGRAPH }, + expect(readNodes('Starting without heading. ')).toStrictEqual([ + { content: 'Starting without heading.', level: 0, type: HierarchyType.PARAGRAPH }, + ]); + expect(readNodes(' Starting without heading.')).toStrictEqual([ + { content: 'Starting without heading.', level: 0, type: HierarchyType.PARAGRAPH }, ]); expect(readNodes('Starting without heading.\n')).toStrictEqual([ - { content: 'Starting without heading.', endPos: 24, level: 0, startPos: 0, type: HierarchyType.PARAGRAPH }, + { content: 'Starting without heading.', level: 0, type: HierarchyType.PARAGRAPH }, ]); expect(readNodes('Starting without heading.\n\n')).toStrictEqual([ - { content: 'Starting without heading.', endPos: 24, level: 0, startPos: 0, type: HierarchyType.PARAGRAPH }, + { content: 'Starting without heading.', level: 0, type: HierarchyType.PARAGRAPH }, ]); expect(readNodes('Directly followed by hierachy.\n# Heading')).toStrictEqual([ - { content: 'Directly followed by hierachy.', endPos: 29, level: 0, startPos: 0, type: HierarchyType.PARAGRAPH }, - { content: '# Heading', endPos: 39, level: 1, startPos: 31, type: HierarchyType.HEADING }, + { content: 'Directly followed by hierachy.', level: 0, type: HierarchyType.PARAGRAPH }, + { content: 'Heading', level: 1, type: HierarchyType.HEADING }, ]); expect(readNodes('# Heading\nPrefixed by hierachy.')).toStrictEqual([ - { content: '# Heading', endPos: 8, level: 1, startPos: 0, type: HierarchyType.HEADING }, - { content: 'Prefixed by hierachy.', endPos: 30, level: 0, startPos: 10, type: HierarchyType.PARAGRAPH }, + { content: 'Heading', level: 1, type: HierarchyType.HEADING }, + { content: 'Prefixed by hierachy.', level: 0, type: HierarchyType.PARAGRAPH }, ]); expect(readNodes('# Heading\n\nPrefixed by hierachy.')).toStrictEqual([ - { content: '# Heading', endPos: 8, level: 1, startPos: 0, type: HierarchyType.HEADING }, - { content: 'Prefixed by hierachy.', endPos: 31, level: 0, startPos: 11, type: HierarchyType.PARAGRAPH }, + { content: 'Heading', level: 1, type: HierarchyType.HEADING }, + { content: 'Prefixed by hierachy.', level: 0, type: HierarchyType.PARAGRAPH }, ]); expect(readNodes('Stuff but with\na newline.\n\n')).toStrictEqual([ - { content: 'Stuff but with\na newline.', endPos: 24, level: 0, startPos: 0, type: HierarchyType.PARAGRAPH }, + { content: 'Stuff but with\na newline.', level: 0, type: HierarchyType.PARAGRAPH }, ]); }); test('outliner nodes', () => { - expect(readNodes('- Node')).toStrictEqual([ - { content: '- Node', endPos: 5, level: 0, startPos: 0, type: HierarchyType.OUTLINE }, - ]); - expect(readNodes(' - Node')).toStrictEqual([ - { content: ' - Node', endPos: 6, level: 1, startPos: 0, type: HierarchyType.OUTLINE }, - ]); + expect(readNodes('- Node')).toStrictEqual([{ content: 'Node', level: 0, type: HierarchyType.OUTLINE }]); + expect(readNodes(' - Node')).toStrictEqual([{ content: 'Node', level: 1, type: HierarchyType.OUTLINE }]); expect( readNodes( `- Some @@ -56,24 +49,18 @@ test('outliner nodes', () => { ), ).toStrictEqual([ { - content: '- Some', - endPos: 5, + content: 'Some', level: 0, - startPos: 0, type: HierarchyType.OUTLINE, }, { - content: ' - Node', - endPos: 16, + content: 'Node', level: 4, - startPos: 7, type: HierarchyType.OUTLINE, }, { - content: ' - Fun', - endPos: 24, + content: 'Fun', level: 2, - startPos: 18, type: HierarchyType.OUTLINE, }, ]); @@ -85,12 +72,10 @@ test('outliner nodes', () => { ), ).toStrictEqual([ { - content: `- Node with multi lines work. + content: `Node with multi lines work. As long as the empty space is equivalent. How many you like.`, - endPos: 93, level: 0, - startPos: 0, type: HierarchyType.OUTLINE, }, ]); @@ -100,65 +85,47 @@ test('mixed nodes', () => { expect(readNodes(readFileSync('./src/converters/obsidian/tests/fixtures/vault/test.md', 'utf-8'))).toStrictEqual([ { content: 'Starting without [[heading]].', - endPos: 28, level: 0, - startPos: 0, type: HierarchyType.PARAGRAPH, }, { - content: '# Heading here', - endPos: 43, + content: 'Heading here', level: 1, - startPos: 30, type: HierarchyType.HEADING, }, { content: '[[Some]]', - endPos: 53, level: 0, - startPos: 46, type: HierarchyType.PARAGRAPH, }, { content: 'Stuff but with\na newline.', - endPos: 80, level: 0, - startPos: 56, type: HierarchyType.PARAGRAPH, }, { - content: '## Heading 2', - endPos: 94, + content: 'Heading 2', level: 2, - startPos: 83, type: HierarchyType.HEADING, }, { - content: '- Some', - endPos: 102, + content: 'Some', level: 0, - startPos: 97, type: HierarchyType.OUTLINE, }, { - content: ' - Node with [[Link]] [[Link2]]', - endPos: 137, + content: 'Node with [[Link]] [[Link2]]', level: 4, - startPos: 104, type: HierarchyType.OUTLINE, }, { - content: ' - Fun', - endPos: 145, + content: 'Fun', level: 2, - startPos: 139, type: HierarchyType.OUTLINE, }, { - content: '#### Out of Level', - endPos: 164, + content: 'Out of Level', level: 4, - startPos: 148, type: HierarchyType.HEADING, }, ]); From baa4b1a10066400eec99c1430f7a27f58d2c8250 Mon Sep 17 00:00:00 2001 From: Stian Haklev Date: Wed, 14 Sep 2022 08:59:52 +0200 Subject: [PATCH 07/94] WIP --- src/converters/obsidian/fileConverter.ts | 44 +++++++++++++++++++---- src/converters/obsidian/vaultConverter.ts | 26 +++++++++++--- 2 files changed, 59 insertions(+), 11 deletions(-) diff --git a/src/converters/obsidian/fileConverter.ts b/src/converters/obsidian/fileConverter.ts index 6c63bf4..842909f 100644 --- a/src/converters/obsidian/fileConverter.ts +++ b/src/converters/obsidian/fileConverter.ts @@ -6,14 +6,18 @@ function createChildNode(obsidianNode: ObsidianNode, today: number, idGenerator: return { uid: idGenerator(), name: obsidianNode.content, createdAt: today, editedAt: today, type: 'node' }; } -function createRootNode(fileName: string, today: number): TanaIntermediateNode { - return { uid: fileName, name: '', createdAt: today, editedAt: today, type: 'node' }; +export function createRootNode(fileName: string, displayName: string, today: number): TanaIntermediateNode { + return { uid: fileName, name: displayName, createdAt: today, editedAt: today, type: 'node' }; } export type IdGenerator = () => string; export function ObsidianSingleFileConverter(fileName: string, fileContent: string): TanaIntermediateFile { - const [node, summary] = convertObsidianFile(fileName, fileContent) as [TanaIntermediateNode, TanaIntermediateSummary]; + const [node, summary] = convertObsidianFile(fileName, fileContent) as [ + TanaIntermediateNode, + TanaIntermediateSummary, + string[], + ]; return { version: 'TanaIntermediateFile V0.1', @@ -35,10 +39,24 @@ export function convertObsidianFile( }, today: number = Date.now(), idGenerator: IdGenerator = idgenerator, -) { - const rootNode = createRootNode(fileName, today); +): [TanaIntermediateNode, TanaIntermediateSummary, string[]] { + let newPages: string[] = []; + let obsidianNodes = readNodes(fileContent); + let displayName = fileName; + const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/); + if (name) { + displayName = name[1]; + obsidianNodes = obsidianNodes.slice(1); + } + + // common in Obsidian to repeat the filename in the first line, remove first line if so + if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) { + obsidianNodes = obsidianNodes.slice(1); + } + + const rootNode = createRootNode(fileName, displayName, today); summary.topLevelNodes++; - const obsidianNodes = readNodes(fileContent); + summary.leafNodes += obsidianNodes.length; summary.totalNodes += 1 + obsidianNodes.length; //TODO: broken refs @@ -49,16 +67,28 @@ export function convertObsidianFile( for (const node of obsidianNodes) { const childNode = createChildNode(node, today, idGenerator); processRawTanaNode(childNode); + if (childNode.refs) { + newPages = newPages.concat(childNode.refs); + } insertNodeIntoHierarchy(childNode, node, lastObsidianNodes, lastTanaNodes); } - return [rootNode, summary]; + return [rootNode, summary, newPages]; } function processRawTanaNode(tanaNode: TanaIntermediateNode) { //TODO: links to headings [[..#..]] / blocks [[filename#^dcf64c]] //TODO: aliases //TODO: convert to different node types, remove markdown formatting etc. + const n = tanaNode.name; + tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim(); + // links with alias + tanaNode.name = tanaNode.name.replace(/\[\[([^|]+)\|([^\]]+)\]\]/g, '[$1]([[$2]])'); + // links with anchor, just remove anchor for now + tanaNode.name = tanaNode.name.replace(/\[\[([^#]+)#([^#\]]+)\]\]/g, '[[$1]]'); + // tags, convert to links for now + tanaNode.name = tanaNode.name.replace(/(?:\s|^)(#([^\[]]+?))(?:(?=\s)|$)/g, ' #[[$2]]'); + const foundUids = getBracketLinks(tanaNode.name, true); if (foundUids.length > 0) { diff --git a/src/converters/obsidian/vaultConverter.ts b/src/converters/obsidian/vaultConverter.ts index 01838d5..27bd46f 100644 --- a/src/converters/obsidian/vaultConverter.ts +++ b/src/converters/obsidian/vaultConverter.ts @@ -1,8 +1,12 @@ +import he from 'he'; import { appendFile, appendFileSync, readdirSync, readFileSync, unlinkSync, writeFileSync } from 'fs'; import path, { resolve } from 'path'; -import { TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; +import { TanaIntermediateNode, TanaIntermediateSummary, TanaIntermediateFile } from '../../types/types'; import { idgenerator } from '../../utils/utils'; -import { convertObsidianFile, IdGenerator } from './fileConverter'; +import { convertObsidianFile, IdGenerator, createRootNode } from './fileConverter'; + +//bobbyhadz.com/blog/javascript-get-difference-between-two-sets#:~:text=To%20get%20the%20difference%20between,array%20back%20to%20a%20Set%20. +const getDifference = (setA: any[], setB: any[]) => new Set([...setA].filter((element) => !setB.includes(element))); //source: https://stackoverflow.com/questions/5827612/node-js-fs-readdir-recursive-directory-search function* getFiles(dir: string): Generator { @@ -35,6 +39,8 @@ export function convertVault(vaultPath: string, today: number = Date.now(), idGe appendFileSync(targetFileName, '{\n "version": "TanaIntermediateFile V0.1",\n "nodes": [\n'); let summary; + let newLinks: string[] = []; + let pagesCreated: string[] = []; let addComma = false; for (const filePath of iter) { if (!filePath.endsWith('.md')) continue; @@ -42,17 +48,29 @@ export function convertVault(vaultPath: string, today: number = Date.now(), idGe appendFileSync(targetFileName, ',\n'); } - const [fileNode, updatedSummary] = convertObsidianFile( + const [fileNode, updatedSummary, links] = convertObsidianFile( path.basename(filePath).replace('.md', ''), readFileSync(filePath, 'utf-8'), summary, today, idGenerator, - ) as [TanaIntermediateNode, TanaIntermediateSummary]; + ) as [TanaIntermediateNode, TanaIntermediateSummary, string[]]; + newLinks = newLinks.concat(links); + pagesCreated.push(fileNode.uid); summary = updatedSummary; appendFileSync(targetFileName, JSON.stringify(fileNode, null, 2)); addComma = true; } + + const pagesToCreate = getDifference(newLinks, pagesCreated); + const pagesInTana = [...pagesToCreate] + .map((x) => JSON.stringify(createRootNode(x, decodeURIComponent(x), today), null, 2)) + .join(','); + if (summary) { + summary.topLevelNodes = (summary?.topLevelNodes || 0) + pagesInTana.length; + } + + appendFileSync(targetFileName, ',' + pagesInTana); appendFileSync(targetFileName, '\n ],\n "summary": \n' + JSON.stringify(summary, null, 2) + '\n}'); return summary; From f7632c1efdb200584efb62f52c7f772cce483647 Mon Sep 17 00:00:00 2001 From: Stian Haklev Date: Wed, 14 Sep 2022 10:42:14 +0200 Subject: [PATCH 08/94] Fixes suggested by Lucca --- src/converters/obsidian/fileConverter.ts | 2 +- src/converters/obsidian/vaultConverter.ts | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/converters/obsidian/fileConverter.ts b/src/converters/obsidian/fileConverter.ts index 842909f..27f80ba 100644 --- a/src/converters/obsidian/fileConverter.ts +++ b/src/converters/obsidian/fileConverter.ts @@ -68,7 +68,7 @@ export function convertObsidianFile( const childNode = createChildNode(node, today, idGenerator); processRawTanaNode(childNode); if (childNode.refs) { - newPages = newPages.concat(childNode.refs); + newPages.push(...childNode.refs); } insertNodeIntoHierarchy(childNode, node, lastObsidianNodes, lastTanaNodes); } diff --git a/src/converters/obsidian/vaultConverter.ts b/src/converters/obsidian/vaultConverter.ts index 27bd46f..3543175 100644 --- a/src/converters/obsidian/vaultConverter.ts +++ b/src/converters/obsidian/vaultConverter.ts @@ -1,4 +1,3 @@ -import he from 'he'; import { appendFile, appendFileSync, readdirSync, readFileSync, unlinkSync, writeFileSync } from 'fs'; import path, { resolve } from 'path'; import { TanaIntermediateNode, TanaIntermediateSummary, TanaIntermediateFile } from '../../types/types'; @@ -21,6 +20,14 @@ function* getFiles(dir: string): Generator { } } +const maybeDecode = (x: string) => { + try { + return decodeURIComponent(x); + } catch (e) { + return x; + } +}; + /** * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults. * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly. @@ -55,7 +62,7 @@ export function convertVault(vaultPath: string, today: number = Date.now(), idGe today, idGenerator, ) as [TanaIntermediateNode, TanaIntermediateSummary, string[]]; - newLinks = newLinks.concat(links); + newLinks.push(...links); pagesCreated.push(fileNode.uid); summary = updatedSummary; appendFileSync(targetFileName, JSON.stringify(fileNode, null, 2)); @@ -64,7 +71,7 @@ export function convertVault(vaultPath: string, today: number = Date.now(), idGe const pagesToCreate = getDifference(newLinks, pagesCreated); const pagesInTana = [...pagesToCreate] - .map((x) => JSON.stringify(createRootNode(x, decodeURIComponent(x), today), null, 2)) + .map((x) => JSON.stringify(createRootNode(x, maybeDecode(x), today), null, 2)) .join(','); if (summary) { summary.topLevelNodes = (summary?.topLevelNodes || 0) + pagesInTana.length; From 06613bb88a80769064de5b082c96bf07174a923d Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 3 Oct 2022 20:17:33 +0200 Subject: [PATCH 09/94] fix sub-outline node detection --- src/converters/obsidian/fileConverter.ts | 18 ++++-- src/converters/obsidian/obsidianNodes.ts | 5 +- .../obsidian/tests/obsidianNodes.test.ts | 63 ++++++++++++++----- src/converters/obsidian/vaultConverter.ts | 14 +++-- 4 files changed, 72 insertions(+), 28 deletions(-) diff --git a/src/converters/obsidian/fileConverter.ts b/src/converters/obsidian/fileConverter.ts index 27f80ba..406361c 100644 --- a/src/converters/obsidian/fileConverter.ts +++ b/src/converters/obsidian/fileConverter.ts @@ -1,17 +1,23 @@ import { TanaIntermediateFile, TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; import { getBracketLinks, idgenerator } from '../../utils/utils'; -import { HierarchyType, ObsidianNode, readNodes } from './obsidianNodes'; +import { HierarchyType, ObsidianNode, fileContentToNodes } from './obsidianNodes'; function createChildNode(obsidianNode: ObsidianNode, today: number, idGenerator: IdGenerator): TanaIntermediateNode { return { uid: idGenerator(), name: obsidianNode.content, createdAt: today, editedAt: today, type: 'node' }; } -export function createRootNode(fileName: string, displayName: string, today: number): TanaIntermediateNode { - return { uid: fileName, name: displayName, createdAt: today, editedAt: today, type: 'node' }; +export function createFileNode(displayName: string, today: number, uidFinder: UidFinder): TanaIntermediateNode { + return { uid: uidFinder(displayName), name: displayName, createdAt: today, editedAt: today, type: 'node' }; } export type IdGenerator = () => string; +/** + * We can not just take the obsidian link because we might already have created a node for that link. + * This function should return the correct Uid. + */ +export type UidFinder = (obsidianLink: string) => string; + export function ObsidianSingleFileConverter(fileName: string, fileContent: string): TanaIntermediateFile { const [node, summary] = convertObsidianFile(fileName, fileContent) as [ TanaIntermediateNode, @@ -39,9 +45,10 @@ export function convertObsidianFile( }, today: number = Date.now(), idGenerator: IdGenerator = idgenerator, + uidFinder: UidFinder = (link) => link, ): [TanaIntermediateNode, TanaIntermediateSummary, string[]] { let newPages: string[] = []; - let obsidianNodes = readNodes(fileContent); + let obsidianNodes = fileContentToNodes(fileContent); let displayName = fileName; const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/); if (name) { @@ -54,7 +61,7 @@ export function convertObsidianFile( obsidianNodes = obsidianNodes.slice(1); } - const rootNode = createRootNode(fileName, displayName, today); + const rootNode = createFileNode(displayName, today, uidFinder); summary.topLevelNodes++; summary.leafNodes += obsidianNodes.length; @@ -89,6 +96,7 @@ function processRawTanaNode(tanaNode: TanaIntermediateNode) { // tags, convert to links for now tanaNode.name = tanaNode.name.replace(/(?:\s|^)(#([^\[]]+?))(?:(?=\s)|$)/g, ' #[[$2]]'); + //TODO: replace with correct UIDs const foundUids = getBracketLinks(tanaNode.name, true); if (foundUids.length > 0) { diff --git a/src/converters/obsidian/obsidianNodes.ts b/src/converters/obsidian/obsidianNodes.ts index f7b42a6..e2e1e35 100644 --- a/src/converters/obsidian/obsidianNodes.ts +++ b/src/converters/obsidian/obsidianNodes.ts @@ -11,6 +11,7 @@ export interface Hierarchy { type: HierarchyType; //lower = higher in the hierarchy //for outliner nodes also used as a measure of empty space + //for heading nodes this is the number of #'s level: number; } @@ -18,7 +19,7 @@ export interface ObsidianNode extends Hierarchy { content: string; } -export function readNodes(content: string): ObsidianNode[] { +export function fileContentToNodes(content: string): ObsidianNode[] { const nodeDescs: ObsidianNode[] = []; for (let index = 0; index < content.length; index++) { @@ -115,7 +116,7 @@ export function findEndPosition(content: string, curPosition: number, hierarchy: while (true) { //new lines that start with the number of empty spaces of the level+1 are considered part of the node const emptySpaces = countEmptySpace(content, endPosition + 1); - if (emptySpaces == hierarchy.level + 2) { + if (emptySpaces == hierarchy.level + 2 && !isOutlinerNodeStart(content[endPosition + 1 + emptySpaces])) { endPosition = nextNewLine(content, endPosition + 1); char = content[endPosition]; } else { diff --git a/src/converters/obsidian/tests/obsidianNodes.test.ts b/src/converters/obsidian/tests/obsidianNodes.test.ts index 2f51007..d3479f6 100644 --- a/src/converters/obsidian/tests/obsidianNodes.test.ts +++ b/src/converters/obsidian/tests/obsidianNodes.test.ts @@ -1,48 +1,75 @@ import { expect, test } from '@jest/globals'; import { readFileSync } from 'fs'; -import { HierarchyType, readNodes } from '../obsidianNodes'; +import { HierarchyType, fileContentToNodes } from '../obsidianNodes'; test('headings', () => { - expect(readNodes('## Heading ')).toStrictEqual([{ content: 'Heading', level: 2, type: HierarchyType.HEADING }]); - expect(readNodes('## Heading\n')).toStrictEqual([{ content: 'Heading', level: 2, type: HierarchyType.HEADING }]); - expect(readNodes('## Heading\n\n')).toStrictEqual([{ content: 'Heading', level: 2, type: HierarchyType.HEADING }]); + expect(fileContentToNodes('## Heading ')).toStrictEqual([ + { content: 'Heading', level: 2, type: HierarchyType.HEADING }, + ]); + expect(fileContentToNodes('## Heading\n')).toStrictEqual([ + { content: 'Heading', level: 2, type: HierarchyType.HEADING }, + ]); + expect(fileContentToNodes('## Heading\n\n')).toStrictEqual([ + { content: 'Heading', level: 2, type: HierarchyType.HEADING }, + ]); }); test('paragraphs', () => { - expect(readNodes('Starting without heading. ')).toStrictEqual([ + expect(fileContentToNodes('Starting without heading. ')).toStrictEqual([ { content: 'Starting without heading.', level: 0, type: HierarchyType.PARAGRAPH }, ]); - expect(readNodes(' Starting without heading.')).toStrictEqual([ + expect(fileContentToNodes(' Starting without heading.')).toStrictEqual([ { content: 'Starting without heading.', level: 0, type: HierarchyType.PARAGRAPH }, ]); - expect(readNodes('Starting without heading.\n')).toStrictEqual([ + expect(fileContentToNodes('Starting without heading.\n')).toStrictEqual([ { content: 'Starting without heading.', level: 0, type: HierarchyType.PARAGRAPH }, ]); - expect(readNodes('Starting without heading.\n\n')).toStrictEqual([ + expect(fileContentToNodes('Starting without heading.\n\n')).toStrictEqual([ { content: 'Starting without heading.', level: 0, type: HierarchyType.PARAGRAPH }, ]); - expect(readNodes('Directly followed by hierachy.\n# Heading')).toStrictEqual([ + expect(fileContentToNodes('Directly followed by hierachy.\n# Heading')).toStrictEqual([ { content: 'Directly followed by hierachy.', level: 0, type: HierarchyType.PARAGRAPH }, { content: 'Heading', level: 1, type: HierarchyType.HEADING }, ]); - expect(readNodes('# Heading\nPrefixed by hierachy.')).toStrictEqual([ + expect(fileContentToNodes('# Heading\nPrefixed by hierachy.')).toStrictEqual([ { content: 'Heading', level: 1, type: HierarchyType.HEADING }, { content: 'Prefixed by hierachy.', level: 0, type: HierarchyType.PARAGRAPH }, ]); - expect(readNodes('# Heading\n\nPrefixed by hierachy.')).toStrictEqual([ + expect(fileContentToNodes('# Heading\n\nPrefixed by hierachy.')).toStrictEqual([ { content: 'Heading', level: 1, type: HierarchyType.HEADING }, { content: 'Prefixed by hierachy.', level: 0, type: HierarchyType.PARAGRAPH }, ]); - expect(readNodes('Stuff but with\na newline.\n\n')).toStrictEqual([ + expect(fileContentToNodes('Stuff but with\na newline.\n\n')).toStrictEqual([ { content: 'Stuff but with\na newline.', level: 0, type: HierarchyType.PARAGRAPH }, ]); }); test('outliner nodes', () => { - expect(readNodes('- Node')).toStrictEqual([{ content: 'Node', level: 0, type: HierarchyType.OUTLINE }]); - expect(readNodes(' - Node')).toStrictEqual([{ content: 'Node', level: 1, type: HierarchyType.OUTLINE }]); + expect(fileContentToNodes('- Node')).toStrictEqual([{ content: 'Node', level: 0, type: HierarchyType.OUTLINE }]); + expect(fileContentToNodes(' - Node')).toStrictEqual([{ content: 'Node', level: 1, type: HierarchyType.OUTLINE }]); + expect( + fileContentToNodes(`* Text + * Foo + * Bar`), + ).toStrictEqual([ + { + content: 'Text', + level: 0, + type: HierarchyType.OUTLINE, + }, + { + content: 'Foo', + level: 2, + type: HierarchyType.OUTLINE, + }, + { + content: 'Bar', + level: 2, + type: HierarchyType.OUTLINE, + }, + ]); expect( - readNodes( + fileContentToNodes( `- Some - Node - Fun`, @@ -65,7 +92,7 @@ test('outliner nodes', () => { }, ]); expect( - readNodes( + fileContentToNodes( `- Node with multi lines work. As long as the empty space is equivalent. How many you like.`, @@ -82,7 +109,9 @@ test('outliner nodes', () => { }); test('mixed nodes', () => { - expect(readNodes(readFileSync('./src/converters/obsidian/tests/fixtures/vault/test.md', 'utf-8'))).toStrictEqual([ + expect( + fileContentToNodes(readFileSync('./src/converters/obsidian/tests/fixtures/vault/test.md', 'utf-8')), + ).toStrictEqual([ { content: 'Starting without [[heading]].', level: 0, diff --git a/src/converters/obsidian/vaultConverter.ts b/src/converters/obsidian/vaultConverter.ts index 3543175..7bb3e3a 100644 --- a/src/converters/obsidian/vaultConverter.ts +++ b/src/converters/obsidian/vaultConverter.ts @@ -1,8 +1,8 @@ -import { appendFile, appendFileSync, readdirSync, readFileSync, unlinkSync, writeFileSync } from 'fs'; +import { appendFileSync, readdirSync, readFileSync, unlinkSync } from 'fs'; import path, { resolve } from 'path'; -import { TanaIntermediateNode, TanaIntermediateSummary, TanaIntermediateFile } from '../../types/types'; +import { TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; import { idgenerator } from '../../utils/utils'; -import { convertObsidianFile, IdGenerator, createRootNode } from './fileConverter'; +import { convertObsidianFile, IdGenerator, createFileNode } from './fileConverter'; //bobbyhadz.com/blog/javascript-get-difference-between-two-sets#:~:text=To%20get%20the%20difference%20between,array%20back%20to%20a%20Set%20. const getDifference = (setA: any[], setB: any[]) => new Set([...setA].filter((element) => !setB.includes(element))); @@ -71,7 +71,13 @@ export function convertVault(vaultPath: string, today: number = Date.now(), idGe const pagesToCreate = getDifference(newLinks, pagesCreated); const pagesInTana = [...pagesToCreate] - .map((x) => JSON.stringify(createRootNode(x, maybeDecode(x), today), null, 2)) + .map((x) => + JSON.stringify( + createFileNode(maybeDecode(x), today, (link) => link), + null, + 2, + ), + ) .join(','); if (summary) { summary.topLevelNodes = (summary?.topLevelNodes || 0) + pagesInTana.length; From 3752622046a03d301df3830dceb948cce373748a Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 3 Oct 2022 21:35:10 +0200 Subject: [PATCH 10/94] remove potentially wrong post processing from markdown node extraction --- src/converters/obsidian/fileConverter.ts | 27 +++--- .../extractMarkdownNodes.ts} | 77 ++++++----------- .../markdown/postProcessMarkdownNodes.ts | 20 +++++ .../obsidian/tests/fileConverter.test.ts | 2 +- .../obsidian/tests/fixtures/test.tif.json | 4 +- ...obsidianNodes.test.ts => markdown.test.ts} | 86 ++++++++++--------- 6 files changed, 114 insertions(+), 102 deletions(-) rename src/converters/obsidian/{obsidianNodes.ts => markdown/extractMarkdownNodes.ts} (60%) create mode 100644 src/converters/obsidian/markdown/postProcessMarkdownNodes.ts rename src/converters/obsidian/tests/{obsidianNodes.test.ts => markdown.test.ts} (50%) diff --git a/src/converters/obsidian/fileConverter.ts b/src/converters/obsidian/fileConverter.ts index 406361c..a956b3f 100644 --- a/src/converters/obsidian/fileConverter.ts +++ b/src/converters/obsidian/fileConverter.ts @@ -1,9 +1,16 @@ import { TanaIntermediateFile, TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; import { getBracketLinks, idgenerator } from '../../utils/utils'; -import { HierarchyType, ObsidianNode, fileContentToNodes } from './obsidianNodes'; +import { HierarchyType, MarkdownNode, extractMarkdownNodes } from './markdown/extractMarkdownNodes'; +import { postProcessMarkdownNodes } from './markdown/postProcessMarkdownNodes'; -function createChildNode(obsidianNode: ObsidianNode, today: number, idGenerator: IdGenerator): TanaIntermediateNode { - return { uid: idGenerator(), name: obsidianNode.content, createdAt: today, editedAt: today, type: 'node' }; +function createChildNode(obsidianNode: MarkdownNode, today: number, idGenerator: IdGenerator): TanaIntermediateNode { + return { + uid: idGenerator(), + name: postProcessMarkdownNodes(obsidianNode.content, obsidianNode), + createdAt: today, + editedAt: today, + type: 'node', + }; } export function createFileNode(displayName: string, today: number, uidFinder: UidFinder): TanaIntermediateNode { @@ -48,7 +55,7 @@ export function convertObsidianFile( uidFinder: UidFinder = (link) => link, ): [TanaIntermediateNode, TanaIntermediateSummary, string[]] { let newPages: string[] = []; - let obsidianNodes = fileContentToNodes(fileContent); + let obsidianNodes = extractMarkdownNodes(fileContent); let displayName = fileName; const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/); if (name) { @@ -68,7 +75,7 @@ export function convertObsidianFile( summary.totalNodes += 1 + obsidianNodes.length; //TODO: broken refs - const lastObsidianNodes: ObsidianNode[] = [{ type: HierarchyType.ROOT, level: -1 } as ObsidianNode]; + const lastObsidianNodes: MarkdownNode[] = [{ type: HierarchyType.ROOT, level: -1 } as MarkdownNode]; const lastTanaNodes = [rootNode]; for (const node of obsidianNodes) { @@ -106,8 +113,8 @@ function processRawTanaNode(tanaNode: TanaIntermediateNode) { function insertNodeIntoHierarchy( tanaNode: TanaIntermediateNode, - obsidianNode: ObsidianNode, - lastObsidianNodes: ObsidianNode[], + obsidianNode: MarkdownNode, + lastObsidianNodes: MarkdownNode[], lastTanaNodes: TanaIntermediateNode[], ) { //once the non-parent nodes are removed, the next one is the parent @@ -123,8 +130,8 @@ function insertNodeIntoHierarchy( } function removeNonParentNodes( - obsidianNode: ObsidianNode, - lastObsidianNodes: ObsidianNode[], + obsidianNode: MarkdownNode, + lastObsidianNodes: MarkdownNode[], lastTanaNodes: TanaIntermediateNode[], ) { let lastObsidianNode = lastObsidianNodes[lastObsidianNodes.length - 1]; @@ -137,7 +144,7 @@ function removeNonParentNodes( } } -function isChild(potentialParent: ObsidianNode, potentialChild: ObsidianNode) { +function isChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) { if (potentialParent.type === HierarchyType.ROOT) return true; //HEADING is always a parent of non-headings diff --git a/src/converters/obsidian/obsidianNodes.ts b/src/converters/obsidian/markdown/extractMarkdownNodes.ts similarity index 60% rename from src/converters/obsidian/obsidianNodes.ts rename to src/converters/obsidian/markdown/extractMarkdownNodes.ts index e2e1e35..ff54b49 100644 --- a/src/converters/obsidian/obsidianNodes.ts +++ b/src/converters/obsidian/markdown/extractMarkdownNodes.ts @@ -1,4 +1,4 @@ -import { countEmptySpace, nextNewLine } from './utils'; +import { countEmptySpace, nextNewLine } from '../utils'; export enum HierarchyType { ROOT = 'Root', @@ -15,12 +15,12 @@ export interface Hierarchy { level: number; } -export interface ObsidianNode extends Hierarchy { +export interface MarkdownNode extends Hierarchy { content: string; } -export function fileContentToNodes(content: string): ObsidianNode[] { - const nodeDescs: ObsidianNode[] = []; +export function extractMarkdownNodes(content: string): MarkdownNode[] { + const nodeDescs: MarkdownNode[] = []; for (let index = 0; index < content.length; index++) { const element = content[index]; @@ -29,7 +29,7 @@ export function fileContentToNodes(content: string): ObsidianNode[] { const endPos = findEndPosition(content, index, hierarchy); nodeDescs.push({ ...hierarchy, - content: cutNodeContent(content, index, endPos, hierarchy), + content: content.slice(index, endPos), }); //we increment immediately afterwards due to the loop @@ -39,38 +39,13 @@ export function fileContentToNodes(content: string): ObsidianNode[] { return nodeDescs; } -function cutNodeContent(content: string, startPos: number, endPos: number, hierarchy: Hierarchy) { - let sliceStart = startPos; - let sliceEnd = endPos + 1; - - //removing prefixing empty space - let startChar = content[sliceStart]; - while (startChar === ' ' || startChar === '\t') { - sliceStart++; - startChar = content[sliceStart]; - } - - if (hierarchy.type === HierarchyType.OUTLINE) { - sliceStart += 2; //2 = *-char and empty space after that - } - - //TODO: might need to convert it - if (hierarchy.type === HierarchyType.HEADING) { - sliceStart += hierarchy.level + 1; //heading symbols and empty space after that - } - - //removing trailing empty space, newlines are already excluded - let endChar = content[sliceEnd - 1]; - while (endChar === ' ' || endChar === '\t') { - sliceEnd--; - endChar = content[sliceEnd - 1]; +function isOutlinerNodeStart(content: string, pos: number) { + const char = content[pos]; + const secondChar = content[pos + 1]; + if ((char === '*' || char === '-') && secondChar === ' ') { + return true; } - - return content.slice(sliceStart, sliceEnd); -} - -function isOutlinerNodeStart(char: string) { - return char === '*' || char === '-'; + return !isNaN(parseInt(char)) && secondChar === '.' && content[pos + 2] === ' '; } export function getHierarchy(curChar: string, content: string, curPosition: number): Hierarchy { @@ -91,7 +66,7 @@ export function getHierarchy(curChar: string, content: string, curPosition: numb //for nodes we need a precise level === empty space, so we can detect multi line node content const emptySpaces = countEmptySpace(content, curPosition); - if (isOutlinerNodeStart(content[curPosition + emptySpaces]) && content[curPosition + emptySpaces + 1] === ' ') { + if (isOutlinerNodeStart(content, curPosition + emptySpaces)) { return { type: HierarchyType.OUTLINE, level: Math.max(emptySpaces) }; } @@ -100,7 +75,6 @@ export function getHierarchy(curChar: string, content: string, curPosition: numb const HIERARCHY_INDICATORS = ['#', '*', '-']; -//TODO: change to return str instead of just searching endpos for even less O(n) /** * Returns the index in the content-string of the endposition of the current obsidian node. */ @@ -109,31 +83,32 @@ export function findEndPosition(content: string, curPosition: number, hierarchy: let char = content[endPosition]; if (char === undefined || hierarchy.type === HierarchyType.HEADING) { - return endPosition - 1; - } - - if (hierarchy.type === HierarchyType.OUTLINE) { + endPosition = endPosition - 1; + } else if (hierarchy.type === HierarchyType.OUTLINE) { while (true) { //new lines that start with the number of empty spaces of the level+1 are considered part of the node const emptySpaces = countEmptySpace(content, endPosition + 1); - if (emptySpaces == hierarchy.level + 2 && !isOutlinerNodeStart(content[endPosition + 1 + emptySpaces])) { + if (emptySpaces == hierarchy.level + 2 && !isOutlinerNodeStart(content, endPosition + 1 + emptySpaces)) { endPosition = nextNewLine(content, endPosition + 1); char = content[endPosition]; } else { - return endPosition - 1; + endPosition = endPosition - 1; + break; + } + if (char === undefined) { + endPosition = endPosition - 1; + break; } - if (char === undefined) return endPosition - 1; } - } - - if (hierarchy.type === HierarchyType.PARAGRAPH) { + } else if (hierarchy.type === HierarchyType.PARAGRAPH) { let lastChar = char; endPosition++; char = content[endPosition]; //paragraphs end with double newlines or a new hierarchy while (true) { if ((char === '\n' && lastChar === '\n') || HIERARCHY_INDICATORS.includes(char) || char === undefined) { - return endPosition - 2; + endPosition = endPosition - 2; + break; } lastChar = char; endPosition++; @@ -141,5 +116,7 @@ export function findEndPosition(content: string, curPosition: number, hierarchy: } } - throw 'Hierarchy type not detected.'; + endPosition++; + + return endPosition; } diff --git a/src/converters/obsidian/markdown/postProcessMarkdownNodes.ts b/src/converters/obsidian/markdown/postProcessMarkdownNodes.ts new file mode 100644 index 0000000..32bbed7 --- /dev/null +++ b/src/converters/obsidian/markdown/postProcessMarkdownNodes.ts @@ -0,0 +1,20 @@ +import { Hierarchy, HierarchyType } from './extractMarkdownNodes'; + +export function postProcessMarkdownNodes(content: string, hierarchy: Hierarchy) { + if (hierarchy.type === HierarchyType.OUTLINE) { + //remove empty prefix + const processed = content.trimStart(); + if (!isNaN(parseInt(processed[0]))) { + //if it starts with e.g. "1." we keep the numbering because Tana does not support numbered lists right now + return processed; + } + //remove "* " + return processed.slice(2); + } + + if (hierarchy.type === HierarchyType.HEADING) { + return content.slice(hierarchy.level + 1); //heading symbols and empty space after that + } + + return content; +} diff --git a/src/converters/obsidian/tests/fileConverter.test.ts b/src/converters/obsidian/tests/fileConverter.test.ts index ae3808b..8a612ea 100644 --- a/src/converters/obsidian/tests/fileConverter.test.ts +++ b/src/converters/obsidian/tests/fileConverter.test.ts @@ -10,7 +10,7 @@ test('obsidian file converter', () => { { createdAt: 1, editedAt: 1, - name: '', + name: 'test', type: 'node', uid: 'test', children: [ diff --git a/src/converters/obsidian/tests/fixtures/test.tif.json b/src/converters/obsidian/tests/fixtures/test.tif.json index 29c65e8..271d299 100644 --- a/src/converters/obsidian/tests/fixtures/test.tif.json +++ b/src/converters/obsidian/tests/fixtures/test.tif.json @@ -3,7 +3,7 @@ "nodes": [ { "uid": "test2", - "name": "", + "name": "test2", "createdAt": 1, "editedAt": 1, "type": "node", @@ -84,7 +84,7 @@ }, { "uid": "test", - "name": "", + "name": "test", "createdAt": 1, "editedAt": 1, "type": "node", diff --git a/src/converters/obsidian/tests/obsidianNodes.test.ts b/src/converters/obsidian/tests/markdown.test.ts similarity index 50% rename from src/converters/obsidian/tests/obsidianNodes.test.ts rename to src/converters/obsidian/tests/markdown.test.ts index d3479f6..8f6362e 100644 --- a/src/converters/obsidian/tests/obsidianNodes.test.ts +++ b/src/converters/obsidian/tests/markdown.test.ts @@ -1,105 +1,104 @@ import { expect, test } from '@jest/globals'; import { readFileSync } from 'fs'; -import { HierarchyType, fileContentToNodes } from '../obsidianNodes'; +import { extractMarkdownNodes, HierarchyType } from '../markdown/extractMarkdownNodes'; test('headings', () => { - expect(fileContentToNodes('## Heading ')).toStrictEqual([ - { content: 'Heading', level: 2, type: HierarchyType.HEADING }, + expect(extractMarkdownNodes('## Heading')).toStrictEqual([ + { content: '## Heading', level: 2, type: HierarchyType.HEADING }, ]); - expect(fileContentToNodes('## Heading\n')).toStrictEqual([ - { content: 'Heading', level: 2, type: HierarchyType.HEADING }, + expect(extractMarkdownNodes('## Heading\n')).toStrictEqual([ + { content: '## Heading', level: 2, type: HierarchyType.HEADING }, ]); - expect(fileContentToNodes('## Heading\n\n')).toStrictEqual([ - { content: 'Heading', level: 2, type: HierarchyType.HEADING }, + expect(extractMarkdownNodes('## Heading\n\n')).toStrictEqual([ + { content: '## Heading', level: 2, type: HierarchyType.HEADING }, ]); }); test('paragraphs', () => { - expect(fileContentToNodes('Starting without heading. ')).toStrictEqual([ - { content: 'Starting without heading.', level: 0, type: HierarchyType.PARAGRAPH }, - ]); - expect(fileContentToNodes(' Starting without heading.')).toStrictEqual([ - { content: 'Starting without heading.', level: 0, type: HierarchyType.PARAGRAPH }, + expect(extractMarkdownNodes(' Starting without heading.')).toStrictEqual([ + { content: ' Starting without heading.', level: 0, type: HierarchyType.PARAGRAPH }, ]); - expect(fileContentToNodes('Starting without heading.\n')).toStrictEqual([ + expect(extractMarkdownNodes('Starting without heading.\n')).toStrictEqual([ { content: 'Starting without heading.', level: 0, type: HierarchyType.PARAGRAPH }, ]); - expect(fileContentToNodes('Starting without heading.\n\n')).toStrictEqual([ + expect(extractMarkdownNodes('Starting without heading.\n\n')).toStrictEqual([ { content: 'Starting without heading.', level: 0, type: HierarchyType.PARAGRAPH }, ]); - expect(fileContentToNodes('Directly followed by hierachy.\n# Heading')).toStrictEqual([ + expect(extractMarkdownNodes('Directly followed by hierachy.\n# Heading')).toStrictEqual([ { content: 'Directly followed by hierachy.', level: 0, type: HierarchyType.PARAGRAPH }, - { content: 'Heading', level: 1, type: HierarchyType.HEADING }, + { content: '# Heading', level: 1, type: HierarchyType.HEADING }, ]); - expect(fileContentToNodes('# Heading\nPrefixed by hierachy.')).toStrictEqual([ - { content: 'Heading', level: 1, type: HierarchyType.HEADING }, + expect(extractMarkdownNodes('# Heading\nPrefixed by hierachy.')).toStrictEqual([ + { content: '# Heading', level: 1, type: HierarchyType.HEADING }, { content: 'Prefixed by hierachy.', level: 0, type: HierarchyType.PARAGRAPH }, ]); - expect(fileContentToNodes('# Heading\n\nPrefixed by hierachy.')).toStrictEqual([ - { content: 'Heading', level: 1, type: HierarchyType.HEADING }, + expect(extractMarkdownNodes('# Heading\n\nPrefixed by hierachy.')).toStrictEqual([ + { content: '# Heading', level: 1, type: HierarchyType.HEADING }, { content: 'Prefixed by hierachy.', level: 0, type: HierarchyType.PARAGRAPH }, ]); - expect(fileContentToNodes('Stuff but with\na newline.\n\n')).toStrictEqual([ + expect(extractMarkdownNodes('Stuff but with\na newline.\n\n')).toStrictEqual([ { content: 'Stuff but with\na newline.', level: 0, type: HierarchyType.PARAGRAPH }, ]); }); test('outliner nodes', () => { - expect(fileContentToNodes('- Node')).toStrictEqual([{ content: 'Node', level: 0, type: HierarchyType.OUTLINE }]); - expect(fileContentToNodes(' - Node')).toStrictEqual([{ content: 'Node', level: 1, type: HierarchyType.OUTLINE }]); + expect(extractMarkdownNodes('- Node')).toStrictEqual([{ content: '- Node', level: 0, type: HierarchyType.OUTLINE }]); + expect(extractMarkdownNodes(' - Node')).toStrictEqual([ + { content: ' - Node', level: 1, type: HierarchyType.OUTLINE }, + ]); expect( - fileContentToNodes(`* Text + extractMarkdownNodes(`* Text * Foo * Bar`), ).toStrictEqual([ { - content: 'Text', + content: '* Text', level: 0, type: HierarchyType.OUTLINE, }, { - content: 'Foo', + content: ' * Foo', level: 2, type: HierarchyType.OUTLINE, }, { - content: 'Bar', + content: ' * Bar', level: 2, type: HierarchyType.OUTLINE, }, ]); expect( - fileContentToNodes( + extractMarkdownNodes( `- Some - Node - Fun`, ), ).toStrictEqual([ { - content: 'Some', + content: '- Some', level: 0, type: HierarchyType.OUTLINE, }, { - content: 'Node', + content: ' - Node', level: 4, type: HierarchyType.OUTLINE, }, { - content: 'Fun', + content: ' - Fun', level: 2, type: HierarchyType.OUTLINE, }, ]); expect( - fileContentToNodes( + extractMarkdownNodes( `- Node with multi lines work. As long as the empty space is equivalent. How many you like.`, ), ).toStrictEqual([ { - content: `Node with multi lines work. + content: `- Node with multi lines work. As long as the empty space is equivalent. How many you like.`, level: 0, @@ -110,15 +109,24 @@ test('outliner nodes', () => { test('mixed nodes', () => { expect( - fileContentToNodes(readFileSync('./src/converters/obsidian/tests/fixtures/vault/test.md', 'utf-8')), + extractMarkdownNodes(`## A list + https://some.url/ + 1. Much more foo. + 2. Take modern bar. + 3. Baz. + 4. etc. `), + ).toStrictEqual([{ content: 'Node', level: 0, type: HierarchyType.OUTLINE }]); + + expect( + extractMarkdownNodes(readFileSync('./src/converters/obsidian/tests/fixtures/vault/test.md', 'utf-8')), ).toStrictEqual([ { - content: 'Starting without [[heading]].', + content: ' Starting without [[heading]].', level: 0, type: HierarchyType.PARAGRAPH, }, { - content: 'Heading here', + content: '# Heading here', level: 1, type: HierarchyType.HEADING, }, @@ -133,17 +141,17 @@ test('mixed nodes', () => { type: HierarchyType.PARAGRAPH, }, { - content: 'Heading 2', + content: '## Heading 2', level: 2, type: HierarchyType.HEADING, }, { - content: 'Some', + content: '- Some', level: 0, type: HierarchyType.OUTLINE, }, { - content: 'Node with [[Link]] [[Link2]]', + content: '- Node with [[Link]] [[Link2]]', level: 4, type: HierarchyType.OUTLINE, }, From 8f9e506256a7d84afc548832d8f2a3906fc5510a Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 3 Oct 2022 22:17:41 +0200 Subject: [PATCH 11/94] improved hierarchy detection for numbered lists and paragraphs --- src/converters/obsidian/fileConverter.ts | 3 +- .../obsidian/markdown/extractMarkdownNodes.ts | 26 +++- .../markdown/postProcessMarkdownNodes.ts | 7 ++ .../obsidian/tests/markdown.test.ts | 111 +++++++++++++----- 4 files changed, 113 insertions(+), 34 deletions(-) diff --git a/src/converters/obsidian/fileConverter.ts b/src/converters/obsidian/fileConverter.ts index a956b3f..aa875f8 100644 --- a/src/converters/obsidian/fileConverter.ts +++ b/src/converters/obsidian/fileConverter.ts @@ -1,12 +1,11 @@ import { TanaIntermediateFile, TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; import { getBracketLinks, idgenerator } from '../../utils/utils'; import { HierarchyType, MarkdownNode, extractMarkdownNodes } from './markdown/extractMarkdownNodes'; -import { postProcessMarkdownNodes } from './markdown/postProcessMarkdownNodes'; function createChildNode(obsidianNode: MarkdownNode, today: number, idGenerator: IdGenerator): TanaIntermediateNode { return { uid: idGenerator(), - name: postProcessMarkdownNodes(obsidianNode.content, obsidianNode), + name: obsidianNode.content, createdAt: today, editedAt: today, type: 'node', diff --git a/src/converters/obsidian/markdown/extractMarkdownNodes.ts b/src/converters/obsidian/markdown/extractMarkdownNodes.ts index ff54b49..528736a 100644 --- a/src/converters/obsidian/markdown/extractMarkdownNodes.ts +++ b/src/converters/obsidian/markdown/extractMarkdownNodes.ts @@ -1,4 +1,5 @@ import { countEmptySpace, nextNewLine } from '../utils'; +import { postProcessMarkdownNodes } from './postProcessMarkdownNodes'; export enum HierarchyType { ROOT = 'Root', @@ -29,7 +30,7 @@ export function extractMarkdownNodes(content: string): MarkdownNode[] { const endPos = findEndPosition(content, index, hierarchy); nodeDescs.push({ ...hierarchy, - content: content.slice(index, endPos), + content: postProcessMarkdownNodes(content.slice(index, endPos), hierarchy), }); //we increment immediately afterwards due to the loop @@ -73,7 +74,23 @@ export function getHierarchy(curChar: string, content: string, curPosition: numb return { type: HierarchyType.PARAGRAPH, level: 0 }; } -const HIERARCHY_INDICATORS = ['#', '*', '-']; +function isHeadingStart(content: string, pos: number) { + //yeah yeah RegEx and all, but I really want this to be fast + if (content[pos] !== '#') return false; + let curPos = pos + 1; + while (content[curPos] === '#') { + curPos++; + } + return content[curPos] == ' '; +} + +function isBlockQuoteStart(content: string, pos: number) { + return content[pos] === '>' && content[pos + 1] === ' '; +} + +function isHierarchyStart(content: string, pos: number) { + return isHeadingStart(content, pos) || isOutlinerNodeStart(content, pos) || isBlockQuoteStart(content, pos); +} /** * Returns the index in the content-string of the endposition of the current obsidian node. @@ -106,7 +123,10 @@ export function findEndPosition(content: string, curPosition: number, hierarchy: char = content[endPosition]; //paragraphs end with double newlines or a new hierarchy while (true) { - if ((char === '\n' && lastChar === '\n') || HIERARCHY_INDICATORS.includes(char) || char === undefined) { + if (char === undefined) { + endPosition = endPosition - 1; + break; + } else if ((char === '\n' && lastChar === '\n') || isHierarchyStart(content, endPosition)) { endPosition = endPosition - 2; break; } diff --git a/src/converters/obsidian/markdown/postProcessMarkdownNodes.ts b/src/converters/obsidian/markdown/postProcessMarkdownNodes.ts index 32bbed7..bf33547 100644 --- a/src/converters/obsidian/markdown/postProcessMarkdownNodes.ts +++ b/src/converters/obsidian/markdown/postProcessMarkdownNodes.ts @@ -1,5 +1,8 @@ import { Hierarchy, HierarchyType } from './extractMarkdownNodes'; +/** + * We remove the parts of the markdown nodes that just signify their type, e.g. "- " for outline nodes. + */ export function postProcessMarkdownNodes(content: string, hierarchy: Hierarchy) { if (hierarchy.type === HierarchyType.OUTLINE) { //remove empty prefix @@ -16,5 +19,9 @@ export function postProcessMarkdownNodes(content: string, hierarchy: Hierarchy) return content.slice(hierarchy.level + 1); //heading symbols and empty space after that } + if (hierarchy.type === HierarchyType.PARAGRAPH) { + return content.trimEnd(); + } + return content; } diff --git a/src/converters/obsidian/tests/markdown.test.ts b/src/converters/obsidian/tests/markdown.test.ts index 8f6362e..f98f238 100644 --- a/src/converters/obsidian/tests/markdown.test.ts +++ b/src/converters/obsidian/tests/markdown.test.ts @@ -4,13 +4,13 @@ import { extractMarkdownNodes, HierarchyType } from '../markdown/extractMarkdown test('headings', () => { expect(extractMarkdownNodes('## Heading')).toStrictEqual([ - { content: '## Heading', level: 2, type: HierarchyType.HEADING }, + { content: 'Heading', level: 2, type: HierarchyType.HEADING }, ]); expect(extractMarkdownNodes('## Heading\n')).toStrictEqual([ - { content: '## Heading', level: 2, type: HierarchyType.HEADING }, + { content: 'Heading', level: 2, type: HierarchyType.HEADING }, ]); expect(extractMarkdownNodes('## Heading\n\n')).toStrictEqual([ - { content: '## Heading', level: 2, type: HierarchyType.HEADING }, + { content: 'Heading', level: 2, type: HierarchyType.HEADING }, ]); }); @@ -26,43 +26,74 @@ test('paragraphs', () => { ]); expect(extractMarkdownNodes('Directly followed by hierachy.\n# Heading')).toStrictEqual([ { content: 'Directly followed by hierachy.', level: 0, type: HierarchyType.PARAGRAPH }, - { content: '# Heading', level: 1, type: HierarchyType.HEADING }, + { content: 'Heading', level: 1, type: HierarchyType.HEADING }, ]); expect(extractMarkdownNodes('# Heading\nPrefixed by hierachy.')).toStrictEqual([ - { content: '# Heading', level: 1, type: HierarchyType.HEADING }, + { content: 'Heading', level: 1, type: HierarchyType.HEADING }, { content: 'Prefixed by hierachy.', level: 0, type: HierarchyType.PARAGRAPH }, ]); expect(extractMarkdownNodes('# Heading\n\nPrefixed by hierachy.')).toStrictEqual([ - { content: '# Heading', level: 1, type: HierarchyType.HEADING }, + { content: 'Heading', level: 1, type: HierarchyType.HEADING }, { content: 'Prefixed by hierachy.', level: 0, type: HierarchyType.PARAGRAPH }, ]); expect(extractMarkdownNodes('Stuff but with\na newline.\n\n')).toStrictEqual([ { content: 'Stuff but with\na newline.', level: 0, type: HierarchyType.PARAGRAPH }, ]); + expect(extractMarkdownNodes('Stuff but with\n> a blockquote.\n\n')).toStrictEqual([ + { content: 'Stuff but with', level: 0, type: HierarchyType.PARAGRAPH }, + { content: '> a blockquote.', level: 0, type: HierarchyType.PARAGRAPH }, + ]); + expect(extractMarkdownNodes('---\nFoo `paragraph-run-style-emphasis-flip.docx` bar')).toStrictEqual([ + { + content: '---\nFoo `paragraph-run-style-emphasis-flip.docx` bar', + level: 0, + type: HierarchyType.PARAGRAPH, + }, + ]); + + expect( + extractMarkdownNodes(`Read this: +https://mek.fyi/posts/why-books-work-and-could-work-better + Interesting: + ![[Screen Shot 2020-08-07 at 07.00.18.png]] + Foo + Bar + ![[Screen Shot 2020-08-01 at 07.35.47.png]]`), + ).toStrictEqual([ + { + content: `Read this: +https://mek.fyi/posts/why-books-work-and-could-work-better + Interesting: + ![[Screen Shot 2020-08-07 at 07.00.18.png]] + Foo + Bar + ![[Screen Shot 2020-08-01 at 07.35.47.png]]`, + level: 0, + type: HierarchyType.PARAGRAPH, + }, + ]); }); test('outliner nodes', () => { - expect(extractMarkdownNodes('- Node')).toStrictEqual([{ content: '- Node', level: 0, type: HierarchyType.OUTLINE }]); - expect(extractMarkdownNodes(' - Node')).toStrictEqual([ - { content: ' - Node', level: 1, type: HierarchyType.OUTLINE }, - ]); + expect(extractMarkdownNodes('- Node')).toStrictEqual([{ content: 'Node', level: 0, type: HierarchyType.OUTLINE }]); + expect(extractMarkdownNodes(' - Node')).toStrictEqual([{ content: 'Node', level: 1, type: HierarchyType.OUTLINE }]); expect( extractMarkdownNodes(`* Text * Foo * Bar`), ).toStrictEqual([ { - content: '* Text', + content: 'Text', level: 0, type: HierarchyType.OUTLINE, }, { - content: ' * Foo', + content: 'Foo', level: 2, type: HierarchyType.OUTLINE, }, { - content: ' * Bar', + content: 'Bar', level: 2, type: HierarchyType.OUTLINE, }, @@ -75,17 +106,17 @@ test('outliner nodes', () => { ), ).toStrictEqual([ { - content: '- Some', + content: 'Some', level: 0, type: HierarchyType.OUTLINE, }, { - content: ' - Node', + content: 'Node', level: 4, type: HierarchyType.OUTLINE, }, { - content: ' - Fun', + content: 'Fun', level: 2, type: HierarchyType.OUTLINE, }, @@ -98,7 +129,7 @@ test('outliner nodes', () => { ), ).toStrictEqual([ { - content: `- Node with multi lines work. + content: `Node with multi lines work. As long as the empty space is equivalent. How many you like.`, level: 0, @@ -110,23 +141,45 @@ test('outliner nodes', () => { test('mixed nodes', () => { expect( extractMarkdownNodes(`## A list - https://some.url/ - 1. Much more foo. - 2. Take modern bar. - 3. Baz. - 4. etc. `), - ).toStrictEqual([{ content: 'Node', level: 0, type: HierarchyType.OUTLINE }]); - +https://some.url/ +1. Much more foo. +2. Take modern bar. +3. Baz. +4. etc. `), + ).toStrictEqual([ + { content: 'A list', level: 2, type: HierarchyType.HEADING }, + { content: 'https://some.url/', level: 0, type: HierarchyType.PARAGRAPH }, + { + content: '1. Much more foo.', + level: 0, + type: HierarchyType.OUTLINE, + }, + { + content: '2. Take modern bar. ', + level: 0, + type: HierarchyType.OUTLINE, + }, + { + content: '3. Baz.', + level: 0, + type: HierarchyType.OUTLINE, + }, + { + content: '4. etc. ', + level: 0, + type: HierarchyType.OUTLINE, + }, + ]); expect( extractMarkdownNodes(readFileSync('./src/converters/obsidian/tests/fixtures/vault/test.md', 'utf-8')), ).toStrictEqual([ { - content: ' Starting without [[heading]].', + content: 'Starting without [[heading]].', level: 0, type: HierarchyType.PARAGRAPH, }, { - content: '# Heading here', + content: 'Heading here', level: 1, type: HierarchyType.HEADING, }, @@ -141,17 +194,17 @@ test('mixed nodes', () => { type: HierarchyType.PARAGRAPH, }, { - content: '## Heading 2', + content: 'Heading 2', level: 2, type: HierarchyType.HEADING, }, { - content: '- Some', + content: 'Some', level: 0, type: HierarchyType.OUTLINE, }, { - content: '- Node with [[Link]] [[Link2]]', + content: 'Node with [[Link]] [[Link2]]', level: 4, type: HierarchyType.OUTLINE, }, From 785ca45cfb686b3685a7fa42aa2bfba783d3fcc6 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Wed, 5 Oct 2022 09:26:57 +0200 Subject: [PATCH 12/94] introduce VaultContext --- .../obsidian/ObsidianSingleFileConverter.ts | 16 +++++++ src/converters/obsidian/VaultContext.ts | 22 +++++++++ src/converters/obsidian/fileConverter.ts | 47 ++++--------------- .../obsidian/markdown/extractMarkdownNodes.ts | 4 +- src/converters/obsidian/vaultConverter.ts | 23 ++++----- src/runner.ts | 2 +- 6 files changed, 60 insertions(+), 54 deletions(-) create mode 100644 src/converters/obsidian/ObsidianSingleFileConverter.ts create mode 100644 src/converters/obsidian/VaultContext.ts diff --git a/src/converters/obsidian/ObsidianSingleFileConverter.ts b/src/converters/obsidian/ObsidianSingleFileConverter.ts new file mode 100644 index 0000000..ad21551 --- /dev/null +++ b/src/converters/obsidian/ObsidianSingleFileConverter.ts @@ -0,0 +1,16 @@ +import { TanaIntermediateFile, TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; +import { convertObsidianFile } from './fileConverter'; + +export function ObsidianSingleFileConverter(fileName: string, fileContent: string): TanaIntermediateFile { + const [node, summary] = convertObsidianFile(fileName, fileContent) as [ + TanaIntermediateNode, + TanaIntermediateSummary, + string[], + ]; + + return { + version: 'TanaIntermediateFile V0.1', + summary, + nodes: [node], + }; +} diff --git a/src/converters/obsidian/VaultContext.ts b/src/converters/obsidian/VaultContext.ts new file mode 100644 index 0000000..ee45a56 --- /dev/null +++ b/src/converters/obsidian/VaultContext.ts @@ -0,0 +1,22 @@ +import { TanaIntermediateSummary } from '../..'; + +export class VaultContext { + summary: TanaIntermediateSummary = { + leafNodes: 0, + topLevelNodes: 0, + totalNodes: 0, + calendarNodes: 0, + fields: 0, + brokenRefs: 0, + }; + + constructor() {} + + /** + * We can not just take the obsidian link because we might already have created a node for that link. + * This function should return the correct Uid. + */ + getUid(obsidianLink: string) { + return obsidianLink; + } +} diff --git a/src/converters/obsidian/fileConverter.ts b/src/converters/obsidian/fileConverter.ts index aa875f8..19f8995 100644 --- a/src/converters/obsidian/fileConverter.ts +++ b/src/converters/obsidian/fileConverter.ts @@ -1,6 +1,7 @@ -import { TanaIntermediateFile, TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; +import { TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; import { getBracketLinks, idgenerator } from '../../utils/utils'; import { HierarchyType, MarkdownNode, extractMarkdownNodes } from './markdown/extractMarkdownNodes'; +import { VaultContext } from './VaultContext'; function createChildNode(obsidianNode: MarkdownNode, today: number, idGenerator: IdGenerator): TanaIntermediateNode { return { @@ -12,46 +13,18 @@ function createChildNode(obsidianNode: MarkdownNode, today: number, idGenerator: }; } -export function createFileNode(displayName: string, today: number, uidFinder: UidFinder): TanaIntermediateNode { - return { uid: uidFinder(displayName), name: displayName, createdAt: today, editedAt: today, type: 'node' }; +export function createFileNode(displayName: string, today: number, context: VaultContext): TanaIntermediateNode { + return { uid: context.getUid(displayName), name: displayName, createdAt: today, editedAt: today, type: 'node' }; } export type IdGenerator = () => string; -/** - * We can not just take the obsidian link because we might already have created a node for that link. - * This function should return the correct Uid. - */ -export type UidFinder = (obsidianLink: string) => string; - -export function ObsidianSingleFileConverter(fileName: string, fileContent: string): TanaIntermediateFile { - const [node, summary] = convertObsidianFile(fileName, fileContent) as [ - TanaIntermediateNode, - TanaIntermediateSummary, - string[], - ]; - - return { - version: 'TanaIntermediateFile V0.1', - summary, - nodes: [node], - }; -} - export function convertObsidianFile( fileName: string, //without ending fileContent: string, - summary: TanaIntermediateSummary = { - leafNodes: 0, - topLevelNodes: 0, - totalNodes: 0, - calendarNodes: 0, - fields: 0, - brokenRefs: 0, - }, + context: VaultContext = new VaultContext(), today: number = Date.now(), idGenerator: IdGenerator = idgenerator, - uidFinder: UidFinder = (link) => link, ): [TanaIntermediateNode, TanaIntermediateSummary, string[]] { let newPages: string[] = []; let obsidianNodes = extractMarkdownNodes(fileContent); @@ -67,11 +40,11 @@ export function convertObsidianFile( obsidianNodes = obsidianNodes.slice(1); } - const rootNode = createFileNode(displayName, today, uidFinder); - summary.topLevelNodes++; + const rootNode = createFileNode(displayName, today, context); + context.summary.topLevelNodes++; - summary.leafNodes += obsidianNodes.length; - summary.totalNodes += 1 + obsidianNodes.length; + context.summary.leafNodes += obsidianNodes.length; + context.summary.totalNodes += 1 + obsidianNodes.length; //TODO: broken refs const lastObsidianNodes: MarkdownNode[] = [{ type: HierarchyType.ROOT, level: -1 } as MarkdownNode]; @@ -86,7 +59,7 @@ export function convertObsidianFile( insertNodeIntoHierarchy(childNode, node, lastObsidianNodes, lastTanaNodes); } - return [rootNode, summary, newPages]; + return [rootNode, context.summary, newPages]; } function processRawTanaNode(tanaNode: TanaIntermediateNode) { diff --git a/src/converters/obsidian/markdown/extractMarkdownNodes.ts b/src/converters/obsidian/markdown/extractMarkdownNodes.ts index 528736a..c7b1fc0 100644 --- a/src/converters/obsidian/markdown/extractMarkdownNodes.ts +++ b/src/converters/obsidian/markdown/extractMarkdownNodes.ts @@ -49,7 +49,7 @@ function isOutlinerNodeStart(content: string, pos: number) { return !isNaN(parseInt(char)) && secondChar === '.' && content[pos + 2] === ' '; } -export function getHierarchy(curChar: string, content: string, curPosition: number): Hierarchy { +function getHierarchy(curChar: string, content: string, curPosition: number): Hierarchy { if (curChar === '#') { let pos = curPosition + 1; let char = content[pos]; @@ -95,7 +95,7 @@ function isHierarchyStart(content: string, pos: number) { /** * Returns the index in the content-string of the endposition of the current obsidian node. */ -export function findEndPosition(content: string, curPosition: number, hierarchy: Hierarchy): number { +function findEndPosition(content: string, curPosition: number, hierarchy: Hierarchy): number { let endPosition = nextNewLine(content, curPosition); let char = content[endPosition]; diff --git a/src/converters/obsidian/vaultConverter.ts b/src/converters/obsidian/vaultConverter.ts index 7bb3e3a..d82e2b0 100644 --- a/src/converters/obsidian/vaultConverter.ts +++ b/src/converters/obsidian/vaultConverter.ts @@ -3,6 +3,7 @@ import path, { resolve } from 'path'; import { TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; import { idgenerator } from '../../utils/utils'; import { convertObsidianFile, IdGenerator, createFileNode } from './fileConverter'; +import { VaultContext } from './VaultContext'; //bobbyhadz.com/blog/javascript-get-difference-between-two-sets#:~:text=To%20get%20the%20difference%20between,array%20back%20to%20a%20Set%20. const getDifference = (setA: any[], setB: any[]) => new Set([...setA].filter((element) => !setB.includes(element))); @@ -45,7 +46,7 @@ export function convertVault(vaultPath: string, today: number = Date.now(), idGe } catch (e) {} appendFileSync(targetFileName, '{\n "version": "TanaIntermediateFile V0.1",\n "nodes": [\n'); - let summary; + let vaultContext: VaultContext = new VaultContext(); let newLinks: string[] = []; let pagesCreated: string[] = []; let addComma = false; @@ -58,33 +59,27 @@ export function convertVault(vaultPath: string, today: number = Date.now(), idGe const [fileNode, updatedSummary, links] = convertObsidianFile( path.basename(filePath).replace('.md', ''), readFileSync(filePath, 'utf-8'), - summary, + vaultContext, today, idGenerator, ) as [TanaIntermediateNode, TanaIntermediateSummary, string[]]; newLinks.push(...links); pagesCreated.push(fileNode.uid); - summary = updatedSummary; + vaultContext.summary = updatedSummary; appendFileSync(targetFileName, JSON.stringify(fileNode, null, 2)); addComma = true; } const pagesToCreate = getDifference(newLinks, pagesCreated); const pagesInTana = [...pagesToCreate] - .map((x) => - JSON.stringify( - createFileNode(maybeDecode(x), today, (link) => link), - null, - 2, - ), - ) + .map((x) => JSON.stringify(createFileNode(maybeDecode(x), today, vaultContext), null, 2)) .join(','); - if (summary) { - summary.topLevelNodes = (summary?.topLevelNodes || 0) + pagesInTana.length; + if (vaultContext.summary) { + vaultContext.summary.topLevelNodes = (vaultContext.summary?.topLevelNodes || 0) + pagesInTana.length; } appendFileSync(targetFileName, ',' + pagesInTana); - appendFileSync(targetFileName, '\n ],\n "summary": \n' + JSON.stringify(summary, null, 2) + '\n}'); + appendFileSync(targetFileName, '\n ],\n "summary": \n' + JSON.stringify(vaultContext.summary, null, 2) + '\n}'); - return summary; + return vaultContext.summary; } diff --git a/src/runner.ts b/src/runner.ts index e4da6df..bfcc9c4 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -5,7 +5,7 @@ import { RoamConverter } from './converters/roam/index'; import { TanaIntermediateFile } from './types/types'; import { WorkflowyConverter } from './converters/workflowy'; import { lstatSync } from 'fs'; -import { ObsidianSingleFileConverter } from './converters/obsidian/fileConverter'; +import { ObsidianSingleFileConverter } from './converters/obsidian/ObsidianSingleFileConverter'; import path from 'path'; import { convertVault } from './converters/obsidian/vaultConverter'; From a77d27ca323d8d63157bb0c7dc939f8c2bbf1d98 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Wed, 5 Oct 2022 17:42:10 +0200 Subject: [PATCH 13/94] reworked the obsidian converter to include the file structure --- .../obsidian/ObsidianSingleFileConverter.ts | 30 ++- .../obsidian/ObsidianVaultConverter.ts | 44 +++++ src/converters/obsidian/VaultContext.ts | 76 +++++++- .../obsidian/convertMarkdownNodeToTanaNode.ts | 50 +++++ ...ileConverter.ts => convertObsidianFile.ts} | 81 +++----- .../obsidian/createUnlinkedNodes.ts | 33 ++++ .../{markdown => }/extractMarkdownNodes.ts | 55 +++++- src/converters/obsidian/index.ts | 4 + .../markdown/postProcessMarkdownNodes.ts | 27 --- .../tests/ObsidianSingleFileConverter.test.ts | 17 ++ ...test.ts => ObsidianVaultConverter.test.ts} | 9 +- .../obsidian/tests/VaultContext.test.ts | 32 ++++ ... => convertMarkdownNodeToTanaNode.test.ts} | 11 +- .../obsidian/tests/fileConverter.test.ts | 68 ------- .../obsidian/tests/fixtures/full.tif.json | 164 ++++++++++++++++ .../obsidian/tests/fixtures/single.tif.json | 75 ++++++++ .../obsidian/tests/fixtures/test.tif.json | 175 ------------------ .../fixtures/vault/folder/folder/test4.md | 0 .../tests/fixtures/vault/folder/test3.md | 0 src/converters/obsidian/tests/testUtils.ts | 9 + src/converters/obsidian/tests/utils.test.ts | 12 -- src/converters/obsidian/utils.ts | 11 -- src/converters/obsidian/vault.ts | 84 +++++++++ src/converters/obsidian/vaultConverter.ts | 85 --------- src/runner.ts | 5 +- 25 files changed, 696 insertions(+), 461 deletions(-) create mode 100644 src/converters/obsidian/ObsidianVaultConverter.ts create mode 100644 src/converters/obsidian/convertMarkdownNodeToTanaNode.ts rename src/converters/obsidian/{fileConverter.ts => convertObsidianFile.ts} (54%) create mode 100644 src/converters/obsidian/createUnlinkedNodes.ts rename src/converters/obsidian/{markdown => }/extractMarkdownNodes.ts (71%) create mode 100644 src/converters/obsidian/index.ts delete mode 100644 src/converters/obsidian/markdown/postProcessMarkdownNodes.ts create mode 100644 src/converters/obsidian/tests/ObsidianSingleFileConverter.test.ts rename src/converters/obsidian/tests/{vaultConverter.test.ts => ObsidianVaultConverter.test.ts} (53%) create mode 100644 src/converters/obsidian/tests/VaultContext.test.ts rename src/converters/obsidian/tests/{markdown.test.ts => convertMarkdownNodeToTanaNode.test.ts} (93%) delete mode 100644 src/converters/obsidian/tests/fileConverter.test.ts create mode 100644 src/converters/obsidian/tests/fixtures/full.tif.json create mode 100644 src/converters/obsidian/tests/fixtures/single.tif.json delete mode 100644 src/converters/obsidian/tests/fixtures/test.tif.json create mode 100644 src/converters/obsidian/tests/fixtures/vault/folder/folder/test4.md create mode 100644 src/converters/obsidian/tests/fixtures/vault/folder/test3.md create mode 100644 src/converters/obsidian/tests/testUtils.ts delete mode 100644 src/converters/obsidian/tests/utils.test.ts delete mode 100644 src/converters/obsidian/utils.ts create mode 100644 src/converters/obsidian/vault.ts delete mode 100644 src/converters/obsidian/vaultConverter.ts diff --git a/src/converters/obsidian/ObsidianSingleFileConverter.ts b/src/converters/obsidian/ObsidianSingleFileConverter.ts index ad21551..be84251 100644 --- a/src/converters/obsidian/ObsidianSingleFileConverter.ts +++ b/src/converters/obsidian/ObsidianSingleFileConverter.ts @@ -1,16 +1,26 @@ -import { TanaIntermediateFile, TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; -import { convertObsidianFile } from './fileConverter'; +import path from 'path'; +import { TanaIntermediateFile } from '../../types/types'; +import { convertObsidianFile } from './convertObsidianFile'; +import { createUnlinkedNodes } from './createUnlinkedNodes'; +import { VaultContext } from './VaultContext'; -export function ObsidianSingleFileConverter(fileName: string, fileContent: string): TanaIntermediateFile { - const [node, summary] = convertObsidianFile(fileName, fileContent) as [ - TanaIntermediateNode, - TanaIntermediateSummary, - string[], - ]; +export function ObsidianSingleFileConverter( + fileName: string, + fileContent: string, + today: number = Date.now(), + vaultContext: VaultContext = new VaultContext(), +): TanaIntermediateFile { + const importName = path.basename(fileName).replace('.md', ''); + const node = convertObsidianFile(importName, fileContent, vaultContext, today); + //the file node needs to be counted as a top level node + vaultContext.summary.leafNodes--; + vaultContext.summary.topLevelNodes++; + + const collectedUnlinkedNodes = createUnlinkedNodes(importName, today, vaultContext); return { version: 'TanaIntermediateFile V0.1', - summary, - nodes: [node], + summary: vaultContext.summary, + nodes: [node, collectedUnlinkedNodes], }; } diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts new file mode 100644 index 0000000..dc129df --- /dev/null +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -0,0 +1,44 @@ +import { appendFileSync, unlinkSync } from 'fs'; +import path from 'path'; +import { createUnlinkedNodes } from './createUnlinkedNodes'; +import { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './vault'; +import { VaultContext } from './VaultContext'; + +/** + * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults. + * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly. + */ +export function ObsidianVaultConverter( + vaultPath: string, + today: number = Date.now(), + vaultContext: VaultContext = new VaultContext(), +) { + if (vaultPath.endsWith('/')) { + vaultPath = vaultPath.slice(0, -1); + } + + const targetPath = `${vaultPath}.tif.json`; + try { + unlinkSync(targetPath); + // eslint-disable-next-line no-empty + } catch (e) {} + appendFileSync(targetPath, '{\n "version": "TanaIntermediateFile V0.1",\n "nodes": [\n'); + + handleVault( + vaultPath, + addParentNodeStart(targetPath, today, vaultContext), + addParentNodeEnd(targetPath), + addFileNode(targetPath, today, vaultContext), + ); + + //the vault-node needs to be counted as a top level node + vaultContext.summary.leafNodes--; + vaultContext.summary.topLevelNodes++; + + const collectedUnlinkedNodes = createUnlinkedNodes(path.basename(vaultPath), today, vaultContext); + appendFileSync(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2)); + + appendFileSync(targetPath, '\n ],\n "summary": \n' + JSON.stringify(vaultContext.summary, null, 2) + '\n}'); + + return vaultContext.summary; +} diff --git a/src/converters/obsidian/VaultContext.ts b/src/converters/obsidian/VaultContext.ts index ee45a56..0ed1382 100644 --- a/src/converters/obsidian/VaultContext.ts +++ b/src/converters/obsidian/VaultContext.ts @@ -1,5 +1,21 @@ import { TanaIntermediateSummary } from '../..'; +import { idgenerator as randomGenerator } from '../../utils/utils'; +export enum UidRequestType { + FILE, + FOLDER, + CONTENT, +} + +type UidData = { + type: UidRequestType; + uid: string; + obsidianLink: string; +}; + +/** + * Contains all information that is used across the whole vault, like which Uids have already been used. + */ export class VaultContext { summary: TanaIntermediateSummary = { leafNodes: 0, @@ -9,14 +25,66 @@ export class VaultContext { fields: 0, brokenRefs: 0, }; + //we will need to expand this to be able to support relative paths + uidMap = new Map(); - constructor() {} + constructor(public idGenerator: () => string = randomGenerator) {} /** - * We can not just take the obsidian link because we might already have created a node for that link. + * We can not just take the obsidian link because we might already have created a node for that link + * or a folder might have the same link as a file. + * * This function should return the correct Uid. + * + * A side-effect is the collection of the summary. */ - getUid(obsidianLink: string) { - return obsidianLink; + uidRequest(obsidianLink: string, requestType: UidRequestType) { + //TODO: need to collect unlinked nodes + their obsidian name to create them later + + if (requestType === UidRequestType.FOLDER) { + return this.handleFolder(); + } + + const uidData = this.uidMap.get(obsidianLink); + if (!uidData) { + return this.setInitialUid(obsidianLink, requestType); + } + + //at the end every uiData that has been only accessed from content (so inside the markdown file) + //has no matching file node and is therefore unlinked + if (uidData.type === UidRequestType.CONTENT) { + uidData.type = requestType; + } + + return uidData.uid; + } + + private handleFolder() { + this.incrementSummary(); + //folders get new uids always because they cant be linked + return this.idGenerator(); + } + + private setInitialUid(obsidianLink: string, requestType: UidRequestType) { + this.incrementSummary(); + const uid = this.idGenerator(); + this.uidMap.set(obsidianLink, { uid, obsidianLink, type: requestType }); + return uid; + } + + private incrementSummary() { + this.summary.totalNodes++; + this.summary.leafNodes++; + } + + getUnlinkedNodes() { + const unlinkedNodes = []; + for (const node of this.uidMap.values()) { + if (node.type === UidRequestType.CONTENT) { + unlinkedNodes.push(node); + } + } + + return unlinkedNodes; } } diff --git a/src/converters/obsidian/convertMarkdownNodeToTanaNode.ts b/src/converters/obsidian/convertMarkdownNodeToTanaNode.ts new file mode 100644 index 0000000..b5887f5 --- /dev/null +++ b/src/converters/obsidian/convertMarkdownNodeToTanaNode.ts @@ -0,0 +1,50 @@ +import { NodeType, TanaIntermediateNode } from '../../types/types'; +import { getBracketLinks } from '../../utils/utils'; +import { MarkdownNode } from './extractMarkdownNodes'; +import { UidRequestType, VaultContext } from './VaultContext'; + +export function convertMarkdownNodeToTanaNode( + obsidianNode: MarkdownNode, + today: number, + context: VaultContext, +): TanaIntermediateNode { + const childNode = { + uid: context.idGenerator(), + name: obsidianNode.content, + createdAt: today, + editedAt: today, + type: 'node' as NodeType, + }; + + processRawTanaNode(childNode, context); + + return childNode; +} + +function processRawTanaNode(tanaNode: TanaIntermediateNode, vaultContext: VaultContext) { + //TODO: links to headings [[..#..]] / blocks [[filename#^dcf64c]] + //TODO: aliases + //TODO: convert to different node types, remove markdown formatting etc. + const n = tanaNode.name; + tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim(); + // links with alias + tanaNode.name = tanaNode.name.replace(/\[\[([^|]+)\|([^\]]+)\]\]/g, '[$1]([[$2]])'); + // links with anchor, just remove anchor for now + tanaNode.name = tanaNode.name.replace(/\[\[([^#]+)#([^#\]]+)\]\]/g, '[[$1]]'); + // tags, convert to links for now + tanaNode.name = tanaNode.name.replace(/(?:\s|^)(#([^\[]]+?))(?:(?=\s)|$)/g, ' #[[$2]]'); + + const foundUids = getBracketLinks(tanaNode.name, true).map((link) => [ + link, + vaultContext.uidRequest(link, UidRequestType.CONTENT), + ]); + + if (foundUids.length > 0 && !tanaNode.refs) { + tanaNode.refs = []; + } + + for (const [link, uid] of foundUids) { + tanaNode.refs?.push(uid); + tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', '[[' + uid + ']]'); + } +} diff --git a/src/converters/obsidian/fileConverter.ts b/src/converters/obsidian/convertObsidianFile.ts similarity index 54% rename from src/converters/obsidian/fileConverter.ts rename to src/converters/obsidian/convertObsidianFile.ts index 19f8995..83da412 100644 --- a/src/converters/obsidian/fileConverter.ts +++ b/src/converters/obsidian/convertObsidianFile.ts @@ -1,32 +1,14 @@ -import { TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; -import { getBracketLinks, idgenerator } from '../../utils/utils'; -import { HierarchyType, MarkdownNode, extractMarkdownNodes } from './markdown/extractMarkdownNodes'; -import { VaultContext } from './VaultContext'; - -function createChildNode(obsidianNode: MarkdownNode, today: number, idGenerator: IdGenerator): TanaIntermediateNode { - return { - uid: idGenerator(), - name: obsidianNode.content, - createdAt: today, - editedAt: today, - type: 'node', - }; -} - -export function createFileNode(displayName: string, today: number, context: VaultContext): TanaIntermediateNode { - return { uid: context.getUid(displayName), name: displayName, createdAt: today, editedAt: today, type: 'node' }; -} - -export type IdGenerator = () => string; +import { TanaIntermediateNode } from '../../types/types'; +import { convertMarkdownNodeToTanaNode } from './convertMarkdownNodeToTanaNode'; +import { HierarchyType, MarkdownNode, extractMarkdownNodes } from './extractMarkdownNodes'; +import { UidRequestType, VaultContext } from './VaultContext'; export function convertObsidianFile( fileName: string, //without ending fileContent: string, - context: VaultContext = new VaultContext(), + context: VaultContext, today: number = Date.now(), - idGenerator: IdGenerator = idgenerator, -): [TanaIntermediateNode, TanaIntermediateSummary, string[]] { - let newPages: string[] = []; +) { let obsidianNodes = extractMarkdownNodes(fileContent); let displayName = fileName; const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/); @@ -40,47 +22,30 @@ export function convertObsidianFile( obsidianNodes = obsidianNodes.slice(1); } - const rootNode = createFileNode(displayName, today, context); - context.summary.topLevelNodes++; + const fileNode = createFileNode(displayName, today, context); context.summary.leafNodes += obsidianNodes.length; - context.summary.totalNodes += 1 + obsidianNodes.length; + context.summary.totalNodes += obsidianNodes.length; //TODO: broken refs const lastObsidianNodes: MarkdownNode[] = [{ type: HierarchyType.ROOT, level: -1 } as MarkdownNode]; - const lastTanaNodes = [rootNode]; - + const lastTanaNodes = [fileNode]; for (const node of obsidianNodes) { - const childNode = createChildNode(node, today, idGenerator); - processRawTanaNode(childNode); - if (childNode.refs) { - newPages.push(...childNode.refs); - } + const childNode = convertMarkdownNodeToTanaNode(node, today, context); insertNodeIntoHierarchy(childNode, node, lastObsidianNodes, lastTanaNodes); } - return [rootNode, context.summary, newPages]; + return fileNode; } -function processRawTanaNode(tanaNode: TanaIntermediateNode) { - //TODO: links to headings [[..#..]] / blocks [[filename#^dcf64c]] - //TODO: aliases - //TODO: convert to different node types, remove markdown formatting etc. - const n = tanaNode.name; - tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim(); - // links with alias - tanaNode.name = tanaNode.name.replace(/\[\[([^|]+)\|([^\]]+)\]\]/g, '[$1]([[$2]])'); - // links with anchor, just remove anchor for now - tanaNode.name = tanaNode.name.replace(/\[\[([^#]+)#([^#\]]+)\]\]/g, '[[$1]]'); - // tags, convert to links for now - tanaNode.name = tanaNode.name.replace(/(?:\s|^)(#([^\[]]+?))(?:(?=\s)|$)/g, ' #[[$2]]'); - - //TODO: replace with correct UIDs - const foundUids = getBracketLinks(tanaNode.name, true); - - if (foundUids.length > 0) { - tanaNode.refs = foundUids; - } +function createFileNode(displayName: string, today: number, context: VaultContext): TanaIntermediateNode { + return { + uid: context.uidRequest(displayName, UidRequestType.FILE), + name: displayName, + createdAt: today, + editedAt: today, + type: 'node', + }; } function insertNodeIntoHierarchy( @@ -91,8 +56,8 @@ function insertNodeIntoHierarchy( ) { //once the non-parent nodes are removed, the next one is the parent removeNonParentNodes(obsidianNode, lastObsidianNodes, lastTanaNodes); - let lastObsidianNode = lastObsidianNodes[lastObsidianNodes.length - 1]; - let lastTanaNode = lastTanaNodes[lastTanaNodes.length - 1]; + const lastObsidianNode = lastObsidianNodes[lastObsidianNodes.length - 1]; + const lastTanaNode = lastTanaNodes[lastTanaNodes.length - 1]; if (lastObsidianNode && lastTanaNode) { lastTanaNode.children = lastTanaNode.children ?? []; lastTanaNode.children.push(tanaNode); @@ -117,7 +82,9 @@ function removeNonParentNodes( } function isChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) { - if (potentialParent.type === HierarchyType.ROOT) return true; + if (potentialParent.type === HierarchyType.ROOT) { + return true; + } //HEADING is always a parent of non-headings if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) { diff --git a/src/converters/obsidian/createUnlinkedNodes.ts b/src/converters/obsidian/createUnlinkedNodes.ts new file mode 100644 index 0000000..b9ead5a --- /dev/null +++ b/src/converters/obsidian/createUnlinkedNodes.ts @@ -0,0 +1,33 @@ +import { NodeType, TanaIntermediateNode } from '../../types/types'; +import { UidRequestType, VaultContext } from './VaultContext'; + +export function createUnlinkedNodes( + importName: string, + today: number, + vaultContext: VaultContext, +): TanaIntermediateNode { + const rootNodeName = 'Missing Nodes for ' + importName; + const rootNode: TanaIntermediateNode = { + //type here does not matter anymore + uid: vaultContext.uidRequest(rootNodeName, UidRequestType.FOLDER), + name: rootNodeName, + createdAt: today, + editedAt: today, + type: 'node' as NodeType, + }; + + const unlinkedNodes = vaultContext + .getUnlinkedNodes() + .sort((a, b) => a.obsidianLink.localeCompare(b.obsidianLink)) + .map((node) => ({ + uid: node.uid, + name: node.obsidianLink, + createdAt: today, + editedAt: today, + type: 'node' as NodeType, + })); + + rootNode.children = unlinkedNodes; + + return rootNode; +} diff --git a/src/converters/obsidian/markdown/extractMarkdownNodes.ts b/src/converters/obsidian/extractMarkdownNodes.ts similarity index 71% rename from src/converters/obsidian/markdown/extractMarkdownNodes.ts rename to src/converters/obsidian/extractMarkdownNodes.ts index c7b1fc0..b7efc9e 100644 --- a/src/converters/obsidian/markdown/extractMarkdownNodes.ts +++ b/src/converters/obsidian/extractMarkdownNodes.ts @@ -1,6 +1,3 @@ -import { countEmptySpace, nextNewLine } from '../utils'; -import { postProcessMarkdownNodes } from './postProcessMarkdownNodes'; - export enum HierarchyType { ROOT = 'Root', HEADING = 'Heading', @@ -25,7 +22,9 @@ export function extractMarkdownNodes(content: string): MarkdownNode[] { for (let index = 0; index < content.length; index++) { const element = content[index]; - if (element == '\n') continue; + if (element == '\n') { + continue; + } const hierarchy = getHierarchy(element, content, index); const endPos = findEndPosition(content, index, hierarchy); nodeDescs.push({ @@ -76,7 +75,9 @@ function getHierarchy(curChar: string, content: string, curPosition: number): Hi function isHeadingStart(content: string, pos: number) { //yeah yeah RegEx and all, but I really want this to be fast - if (content[pos] !== '#') return false; + if (content[pos] !== '#') { + return false; + } let curPos = pos + 1; while (content[curPos] === '#') { curPos++; @@ -102,6 +103,7 @@ function findEndPosition(content: string, curPosition: number, hierarchy: Hierar if (char === undefined || hierarchy.type === HierarchyType.HEADING) { endPosition = endPosition - 1; } else if (hierarchy.type === HierarchyType.OUTLINE) { + // eslint-disable-next-line no-constant-condition while (true) { //new lines that start with the number of empty spaces of the level+1 are considered part of the node const emptySpaces = countEmptySpace(content, endPosition + 1); @@ -122,6 +124,7 @@ function findEndPosition(content: string, curPosition: number, hierarchy: Hierar endPosition++; char = content[endPosition]; //paragraphs end with double newlines or a new hierarchy + // eslint-disable-next-line no-constant-condition while (true) { if (char === undefined) { endPosition = endPosition - 1; @@ -140,3 +143,45 @@ function findEndPosition(content: string, curPosition: number, hierarchy: Hierar return endPosition; } + +export function countEmptySpace(content: string, curPosition: number, count = 0): number { + //we count tab as one empty space + if (content[curPosition] !== ' ' && content[curPosition] !== '\t') { + return count; + } + return countEmptySpace(content, curPosition + 1, count + 1); +} + +export function nextNewLine(content: string, curPosition: number, count = 0): number { + //end of file is also counted as newline for simplicity + if (content[curPosition + count] === undefined || content[curPosition + count] === '\n') { + return curPosition + count; + } + return nextNewLine(content, curPosition, count + 1); +} + +/** + * We remove the parts of the markdown nodes that just signify their type or have no semantic meaning, e.g. "- " for outline nodes. + */ +export function postProcessMarkdownNodes(content: string, hierarchy: Hierarchy) { + if (hierarchy.type === HierarchyType.OUTLINE) { + //remove empty prefix + const processed = content.trimStart(); + if (!isNaN(parseInt(processed[0]))) { + //if it starts with e.g. "1." we keep the numbering because Tana does not support numbered lists right now + return processed; + } + //remove "* " + return processed.slice(2); + } + + if (hierarchy.type === HierarchyType.HEADING) { + return content.slice(hierarchy.level + 1); //heading symbols and empty space after that + } + + if (hierarchy.type === HierarchyType.PARAGRAPH) { + return content.trimEnd(); + } + + return content; +} diff --git a/src/converters/obsidian/index.ts b/src/converters/obsidian/index.ts new file mode 100644 index 0000000..9afab17 --- /dev/null +++ b/src/converters/obsidian/index.ts @@ -0,0 +1,4 @@ +import { ObsidianSingleFileConverter } from './ObsidianSingleFileConverter'; +import { ObsidianVaultConverter } from './ObsidianVaultConverter'; + +export { ObsidianSingleFileConverter, ObsidianVaultConverter }; diff --git a/src/converters/obsidian/markdown/postProcessMarkdownNodes.ts b/src/converters/obsidian/markdown/postProcessMarkdownNodes.ts deleted file mode 100644 index bf33547..0000000 --- a/src/converters/obsidian/markdown/postProcessMarkdownNodes.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Hierarchy, HierarchyType } from './extractMarkdownNodes'; - -/** - * We remove the parts of the markdown nodes that just signify their type, e.g. "- " for outline nodes. - */ -export function postProcessMarkdownNodes(content: string, hierarchy: Hierarchy) { - if (hierarchy.type === HierarchyType.OUTLINE) { - //remove empty prefix - const processed = content.trimStart(); - if (!isNaN(parseInt(processed[0]))) { - //if it starts with e.g. "1." we keep the numbering because Tana does not support numbered lists right now - return processed; - } - //remove "* " - return processed.slice(2); - } - - if (hierarchy.type === HierarchyType.HEADING) { - return content.slice(hierarchy.level + 1); //heading symbols and empty space after that - } - - if (hierarchy.type === HierarchyType.PARAGRAPH) { - return content.trimEnd(); - } - - return content; -} diff --git a/src/converters/obsidian/tests/ObsidianSingleFileConverter.test.ts b/src/converters/obsidian/tests/ObsidianSingleFileConverter.test.ts new file mode 100644 index 0000000..924ed82 --- /dev/null +++ b/src/converters/obsidian/tests/ObsidianSingleFileConverter.test.ts @@ -0,0 +1,17 @@ +import { expect, test } from '@jest/globals'; +import { readFileSync } from 'fs'; +import { ObsidianSingleFileConverter } from '../ObsidianSingleFileConverter'; +import { VaultContext } from '../VaultContext'; +import { deterministicGenerator } from './testUtils'; + +test('obsidian file converter', () => { + const vaultContext = new VaultContext(deterministicGenerator()); + const result = ObsidianSingleFileConverter( + './src/converters/obsidian/tests/fixtures/vault/test.md', + readFileSync('./src/converters/obsidian/tests/fixtures/vault/test.md', 'utf-8'), + 1, + vaultContext, + ); + const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/single.tif.json', 'utf-8')); + expect(result).toStrictEqual(expected); +}); diff --git a/src/converters/obsidian/tests/vaultConverter.test.ts b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts similarity index 53% rename from src/converters/obsidian/tests/vaultConverter.test.ts rename to src/converters/obsidian/tests/ObsidianVaultConverter.test.ts index 8c1c684..383b95b 100644 --- a/src/converters/obsidian/tests/vaultConverter.test.ts +++ b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts @@ -1,11 +1,14 @@ import { expect, test } from '@jest/globals'; import { readFileSync, unlinkSync } from 'fs'; -import { convertVault } from '../vaultConverter'; +import { ObsidianVaultConverter } from '../ObsidianVaultConverter'; +import { VaultContext } from '../VaultContext'; +import { deterministicGenerator } from './testUtils'; test('obsidian vault converter', () => { - convertVault('./src/converters/obsidian/tests/fixtures/vault', 1, () => 'uid'); + const vaultContext = new VaultContext(deterministicGenerator()); + ObsidianVaultConverter('./src/converters/obsidian/tests/fixtures/vault', 1, vaultContext); const result = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/vault.tif.json', 'utf-8')); unlinkSync('./src/converters/obsidian/tests/fixtures/vault.tif.json'); - const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/test.tif.json', 'utf-8')); + const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/full.tif.json', 'utf-8')); expect(result).toStrictEqual(expected); }); diff --git a/src/converters/obsidian/tests/VaultContext.test.ts b/src/converters/obsidian/tests/VaultContext.test.ts new file mode 100644 index 0000000..4123ccf --- /dev/null +++ b/src/converters/obsidian/tests/VaultContext.test.ts @@ -0,0 +1,32 @@ +import { expect, test } from '@jest/globals'; +import { UidRequestType, VaultContext } from '../VaultContext'; +import { deterministicGenerator } from './testUtils'; + +test('VaultContext uid test', () => { + const vaultContext = new VaultContext(deterministicGenerator()); + expect(vaultContext.uidRequest('link', UidRequestType.CONTENT)).toBe('0'); + //no change on second call + expect(vaultContext.uidRequest('link', UidRequestType.CONTENT)).toBe('0'); + expect(vaultContext.summary).toEqual({ + leafNodes: 1, + topLevelNodes: 0, + totalNodes: 1, + calendarNodes: 0, + fields: 0, + brokenRefs: 0, + }); + //folders get different uids + expect(vaultContext.uidRequest('link', UidRequestType.FOLDER)).toBe('1'); + expect(vaultContext.summary).toEqual({ + leafNodes: 2, + topLevelNodes: 0, + totalNodes: 2, + calendarNodes: 0, + fields: 0, + brokenRefs: 0, + }); + //folders always have fresh uids, so folders with the same name work + expect(vaultContext.uidRequest('link', UidRequestType.FOLDER)).toBe('2'); + //having folder uids does not change other uids + expect(vaultContext.uidRequest('link', UidRequestType.CONTENT)).toBe('0'); +}); diff --git a/src/converters/obsidian/tests/markdown.test.ts b/src/converters/obsidian/tests/convertMarkdownNodeToTanaNode.test.ts similarity index 93% rename from src/converters/obsidian/tests/markdown.test.ts rename to src/converters/obsidian/tests/convertMarkdownNodeToTanaNode.test.ts index f98f238..f614f81 100644 --- a/src/converters/obsidian/tests/markdown.test.ts +++ b/src/converters/obsidian/tests/convertMarkdownNodeToTanaNode.test.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; import { readFileSync } from 'fs'; -import { extractMarkdownNodes, HierarchyType } from '../markdown/extractMarkdownNodes'; +import { extractMarkdownNodes, HierarchyType, countEmptySpace, nextNewLine } from '../extractMarkdownNodes'; test('headings', () => { expect(extractMarkdownNodes('## Heading')).toStrictEqual([ @@ -220,3 +220,12 @@ https://some.url/ }, ]); }); +test('empty space util', () => { + expect(countEmptySpace('a b c', 1)).toBe(3); + expect(countEmptySpace('a b c', 5)).toBe(1); +}); + +test('next newline util', () => { + expect(nextNewLine('\nfoo bar foobar', 2)).toBe('\nfoo bar foobar'.length); + expect(nextNewLine('foo \n\n bar', 2)).toBe(4); +}); diff --git a/src/converters/obsidian/tests/fileConverter.test.ts b/src/converters/obsidian/tests/fileConverter.test.ts deleted file mode 100644 index 8a612ea..0000000 --- a/src/converters/obsidian/tests/fileConverter.test.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { expect, test } from '@jest/globals'; -import { readFileSync } from 'fs'; -import { convertObsidianFile } from '../fileConverter'; - -test('obsidian file converter', () => { - const fileContent = readFileSync('./src/converters/obsidian/tests/fixtures/vault/test.md', 'utf-8'); - const result = convertObsidianFile('test', fileContent, undefined, 1, () => 'uid'); - - expect(result).toStrictEqual([ - { - createdAt: 1, - editedAt: 1, - name: 'test', - type: 'node', - uid: 'test', - children: [ - { - createdAt: 1, - editedAt: 1, - name: 'Starting without [[heading]].', - refs: ['heading'], - type: 'node', - uid: 'uid', - }, - { - children: [ - { createdAt: 1, editedAt: 1, name: '[[Some]]', refs: ['Some'], type: 'node', uid: 'uid' }, - { createdAt: 1, editedAt: 1, name: 'Stuff but with\na newline.', type: 'node', uid: 'uid' }, - { - children: [ - { - children: [ - { - createdAt: 1, - editedAt: 1, - name: 'Node with [[Link]] [[Link2]]', - refs: ['Link', 'Link2'], - type: 'node', - uid: 'uid', - }, - { createdAt: 1, editedAt: 1, name: 'Fun', type: 'node', uid: 'uid' }, - ], - createdAt: 1, - editedAt: 1, - name: 'Some', - type: 'node', - uid: 'uid', - }, - { createdAt: 1, editedAt: 1, name: 'Out of Level', type: 'node', uid: 'uid' }, - ], - createdAt: 1, - editedAt: 1, - name: 'Heading 2', - type: 'node', - uid: 'uid', - }, - ], - createdAt: 1, - editedAt: 1, - name: 'Heading here', - type: 'node', - uid: 'uid', - }, - ], - }, - { brokenRefs: 0, calendarNodes: 0, fields: 0, leafNodes: 9, topLevelNodes: 1, totalNodes: 10 }, - ]); -}); diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json new file mode 100644 index 0000000..14b4cc5 --- /dev/null +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -0,0 +1,164 @@ +{ + "version": "TanaIntermediateFile V0.1", + "nodes": [ + { + "uid": "0", + "name": "vault", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "1", + "name": "folder", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "2", + "name": "folder", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [{ "uid": "3", "name": "test4", "createdAt": 1, "editedAt": 1, "type": "node" }] + }, + { + "uid": "4", + "name": "test2", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "5", + "name": "Starting without [[6]] 2.", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["6"] + }, + { + "uid": "7", + "name": "Heading here", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { "uid": "8", "name": "[[9]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["9"] }, + { + "uid": "10", + "name": "Stuff but with\na newline.", + "createdAt": 1, + "editedAt": 1, + "type": "node" + }, + { + "uid": "11", + "name": "Heading 2", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "12", + "name": "Some", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "13", + "name": "Node with [[14]] [[15]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["14", "15"] + }, + { "uid": "16", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } + ] + }, + { "uid": "17", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } + ] + } + ] + } + ] + }, + { "uid": "18", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } + ] + }, + { + "uid": "19", + "name": "test", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "20", + "name": "Starting without [[6]].", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["6"] + }, + { + "uid": "21", + "name": "Heading here", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { "uid": "22", "name": "[[9]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["9"] }, + { "uid": "23", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, + { + "uid": "24", + "name": "Heading 2", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "25", + "name": "Some", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "26", + "name": "Node with [[14]] [[15]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["14", "15"] + }, + { "uid": "27", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } + ] + }, + { "uid": "28", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } + ] + } + ] + } + ] + } + ] + }, + { + "uid": "29", + "name": "Missing Nodes for vault", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { "uid": "6", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "14", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "15", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "9", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" } + ] + } + ], + "summary": { "leafNodes": 29, "topLevelNodes": 1, "totalNodes": 30, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } +} diff --git a/src/converters/obsidian/tests/fixtures/single.tif.json b/src/converters/obsidian/tests/fixtures/single.tif.json new file mode 100644 index 0000000..b62abbf --- /dev/null +++ b/src/converters/obsidian/tests/fixtures/single.tif.json @@ -0,0 +1,75 @@ +{ + "version": "TanaIntermediateFile V0.1", + "summary": { + "leafNodes": 14, + "topLevelNodes": 1, + "totalNodes": 15, + "calendarNodes": 0, + "fields": 0, + "brokenRefs": 0 + }, + "nodes": [ + { + "uid": "0", + "name": "test", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { "uid": "1", "name": "Starting without [[2]].", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["2"] }, + { + "uid": "3", + "name": "Heading here", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { "uid": "4", "name": "[[5]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["5"] }, + { "uid": "6", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, + { + "uid": "7", + "name": "Heading 2", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "8", + "name": "Some", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "9", + "name": "Node with [[10]] [[11]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["10", "11"] + }, + { "uid": "12", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } + ] + }, + { "uid": "13", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } + ] + } + ] + } + ] + }, + { + "uid": "14", + "name": "Missing Nodes for test", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { "uid": "2", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "10", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "11", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "5", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" } + ] + } + ] +} diff --git a/src/converters/obsidian/tests/fixtures/test.tif.json b/src/converters/obsidian/tests/fixtures/test.tif.json deleted file mode 100644 index 271d299..0000000 --- a/src/converters/obsidian/tests/fixtures/test.tif.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "version": "TanaIntermediateFile V0.1", - "nodes": [ - { - "uid": "test2", - "name": "test2", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { - "uid": "uid", - "name": "Starting without [[heading]] 2.", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "refs": ["heading"] - }, - { - "uid": "uid", - "name": "Heading here", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { - "uid": "uid", - "name": "[[Some]]", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "refs": ["Some"] - }, - { - "uid": "uid", - "name": "Stuff but with\na newline.", - "createdAt": 1, - "editedAt": 1, - "type": "node" - }, - { - "uid": "uid", - "name": "Heading 2", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { - "uid": "uid", - "name": "Some", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { - "uid": "uid", - "name": "Node with [[Link]] [[Link2]]", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "refs": ["Link", "Link2"] - }, - { - "uid": "uid", - "name": "Fun", - "createdAt": 1, - "editedAt": 1, - "type": "node" - } - ] - }, - { - "uid": "uid", - "name": "Out of Level", - "createdAt": 1, - "editedAt": 1, - "type": "node" - } - ] - } - ] - } - ] - }, - { - "uid": "test", - "name": "test", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { - "uid": "uid", - "name": "Starting without [[heading]].", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "refs": ["heading"] - }, - { - "uid": "uid", - "name": "Heading here", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { - "uid": "uid", - "name": "[[Some]]", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "refs": ["Some"] - }, - { - "uid": "uid", - "name": "Stuff but with\na newline.", - "createdAt": 1, - "editedAt": 1, - "type": "node" - }, - { - "uid": "uid", - "name": "Heading 2", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { - "uid": "uid", - "name": "Some", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { - "uid": "uid", - "name": "Node with [[Link]] [[Link2]]", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "refs": ["Link", "Link2"] - }, - { - "uid": "uid", - "name": "Fun", - "createdAt": 1, - "editedAt": 1, - "type": "node" - } - ] - }, - { - "uid": "uid", - "name": "Out of Level", - "createdAt": 1, - "editedAt": 1, - "type": "node" - } - ] - } - ] - } - ] - } - ], - "summary": { - "leafNodes": 18, - "topLevelNodes": 2, - "totalNodes": 20, - "calendarNodes": 0, - "fields": 0, - "brokenRefs": 0 - } -} diff --git a/src/converters/obsidian/tests/fixtures/vault/folder/folder/test4.md b/src/converters/obsidian/tests/fixtures/vault/folder/folder/test4.md new file mode 100644 index 0000000..e69de29 diff --git a/src/converters/obsidian/tests/fixtures/vault/folder/test3.md b/src/converters/obsidian/tests/fixtures/vault/folder/test3.md new file mode 100644 index 0000000..e69de29 diff --git a/src/converters/obsidian/tests/testUtils.ts b/src/converters/obsidian/tests/testUtils.ts new file mode 100644 index 0000000..bb3f2b8 --- /dev/null +++ b/src/converters/obsidian/tests/testUtils.ts @@ -0,0 +1,9 @@ +export function deterministicGenerator() { + let uid = 0; + + return () => { + const uidStr = uid.toString(); + uid++; + return uidStr; + }; +} diff --git a/src/converters/obsidian/tests/utils.test.ts b/src/converters/obsidian/tests/utils.test.ts deleted file mode 100644 index 806a70a..0000000 --- a/src/converters/obsidian/tests/utils.test.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { expect, test } from '@jest/globals'; -import { countEmptySpace, nextNewLine } from '../utils'; - -test('empty space util', () => { - expect(countEmptySpace('a b c', 1)).toBe(3); - expect(countEmptySpace('a b c', 5)).toBe(1); -}); - -test('next newline util', () => { - expect(nextNewLine('\nfoo bar foobar', 2)).toBe('\nfoo bar foobar'.length); - expect(nextNewLine('foo \n\n bar', 2)).toBe(4); -}); diff --git a/src/converters/obsidian/utils.ts b/src/converters/obsidian/utils.ts deleted file mode 100644 index 07f7d2b..0000000 --- a/src/converters/obsidian/utils.ts +++ /dev/null @@ -1,11 +0,0 @@ -export function countEmptySpace(content: string, curPosition: number, count = 0): number { - //we count tab as one empty space - if (content[curPosition] !== ' ' && content[curPosition] !== '\t') return count; - return countEmptySpace(content, curPosition + 1, count + 1); -} - -export function nextNewLine(content: string, curPosition: number, count = 0): number { - //end of file is also counted as newline for simplicity - if (content[curPosition + count] === undefined || content[curPosition + count] === '\n') return curPosition + count; - return nextNewLine(content, curPosition, count + 1); -} diff --git a/src/converters/obsidian/vault.ts b/src/converters/obsidian/vault.ts new file mode 100644 index 0000000..e664284 --- /dev/null +++ b/src/converters/obsidian/vault.ts @@ -0,0 +1,84 @@ +import { appendFileSync, Dirent, readdirSync, readFileSync } from 'fs'; +import path, { resolve } from 'path'; +import { convertObsidianFile } from './convertObsidianFile'; +import { UidRequestType, VaultContext } from './VaultContext'; + +enum ChildrenPosition { + NOT_LAST = 'NOT_LAST', + LAST = 'LAST', +} + +function getChildrenPosition(index: number, dirents: Dirent[]) { + if (index === dirents.length - 1) { + return ChildrenPosition.LAST; + } + + return ChildrenPosition.NOT_LAST; +} + +export function handleVault( + dir: string, + handleDirStart: ReturnType, + handleDirEnd: ReturnType, + handleFile: ReturnType, + childrenPosition: ChildrenPosition = ChildrenPosition.LAST, +) { + handleDirStart(dir); + const dirents = readdirSync(dir, { withFileTypes: true }); + for (let index = 0; index < dirents.length; index++) { + const dirent = dirents[index]; + const res = resolve(dir, dirent.name); + if (dirent.isDirectory()) { + handleVault(res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents)); + } else if (res.endsWith('.md')) { + handleFile(res, getChildrenPosition(index, dirents)); + } + } + handleDirEnd(childrenPosition); +} + +export function addParentNodeStart(targetPath: string, today: number, vaultContext: VaultContext) { + return (dir: string) => { + const name = path.basename(dir); + const uid = vaultContext.uidRequest(name, UidRequestType.FOLDER); + appendFileSync( + targetPath, + `{ + "uid": "${uid}", + "name": "${name}", + "createdAt": ${today}, + "editedAt": ${today}, + "type": "node", + "children": [ + `, + ); + }; +} + +export function addParentNodeEnd(targetPath: string) { + return (childrenPosition: ChildrenPosition) => { + appendFileSync( + targetPath, + `] + }`, + ); + if (childrenPosition !== ChildrenPosition.LAST) { + appendFileSync(targetPath, ','); + } + }; +} + +export function addFileNode(targetPath: string, today: number, vaultContext: VaultContext) { + return (file: string, childrenPosition: ChildrenPosition) => { + const fileNode = convertObsidianFile( + path.basename(file).replace('.md', ''), + readFileSync(file, 'utf-8'), + vaultContext, + today, + ); + appendFileSync(targetPath, JSON.stringify(fileNode, null, 2)); + if (childrenPosition !== ChildrenPosition.LAST) { + appendFileSync(targetPath, ','); + } + }; +} diff --git a/src/converters/obsidian/vaultConverter.ts b/src/converters/obsidian/vaultConverter.ts deleted file mode 100644 index d82e2b0..0000000 --- a/src/converters/obsidian/vaultConverter.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { appendFileSync, readdirSync, readFileSync, unlinkSync } from 'fs'; -import path, { resolve } from 'path'; -import { TanaIntermediateNode, TanaIntermediateSummary } from '../../types/types'; -import { idgenerator } from '../../utils/utils'; -import { convertObsidianFile, IdGenerator, createFileNode } from './fileConverter'; -import { VaultContext } from './VaultContext'; - -//bobbyhadz.com/blog/javascript-get-difference-between-two-sets#:~:text=To%20get%20the%20difference%20between,array%20back%20to%20a%20Set%20. -const getDifference = (setA: any[], setB: any[]) => new Set([...setA].filter((element) => !setB.includes(element))); - -//source: https://stackoverflow.com/questions/5827612/node-js-fs-readdir-recursive-directory-search -function* getFiles(dir: string): Generator { - const dirents = readdirSync(dir, { withFileTypes: true }); - for (const dirent of dirents) { - const res = resolve(dir, dirent.name); - if (dirent.isDirectory()) { - yield* getFiles(res); - } else { - yield res; - } - } -} - -const maybeDecode = (x: string) => { - try { - return decodeURIComponent(x); - } catch (e) { - return x; - } -}; - -/** - * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults. - * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly. - */ -export function convertVault(vaultPath: string, today: number = Date.now(), idGenerator: IdGenerator = idgenerator) { - const iter = getFiles(vaultPath); - - if (vaultPath.endsWith('/')) { - vaultPath = vaultPath.slice(0, -1); - } - - const targetFileName = `${vaultPath}.tif.json`; - try { - unlinkSync(targetFileName); - } catch (e) {} - appendFileSync(targetFileName, '{\n "version": "TanaIntermediateFile V0.1",\n "nodes": [\n'); - - let vaultContext: VaultContext = new VaultContext(); - let newLinks: string[] = []; - let pagesCreated: string[] = []; - let addComma = false; - for (const filePath of iter) { - if (!filePath.endsWith('.md')) continue; - if (addComma) { - appendFileSync(targetFileName, ',\n'); - } - - const [fileNode, updatedSummary, links] = convertObsidianFile( - path.basename(filePath).replace('.md', ''), - readFileSync(filePath, 'utf-8'), - vaultContext, - today, - idGenerator, - ) as [TanaIntermediateNode, TanaIntermediateSummary, string[]]; - newLinks.push(...links); - pagesCreated.push(fileNode.uid); - vaultContext.summary = updatedSummary; - appendFileSync(targetFileName, JSON.stringify(fileNode, null, 2)); - addComma = true; - } - - const pagesToCreate = getDifference(newLinks, pagesCreated); - const pagesInTana = [...pagesToCreate] - .map((x) => JSON.stringify(createFileNode(maybeDecode(x), today, vaultContext), null, 2)) - .join(','); - if (vaultContext.summary) { - vaultContext.summary.topLevelNodes = (vaultContext.summary?.topLevelNodes || 0) + pagesInTana.length; - } - - appendFileSync(targetFileName, ',' + pagesInTana); - appendFileSync(targetFileName, '\n ],\n "summary": \n' + JSON.stringify(vaultContext.summary, null, 2) + '\n}'); - - return vaultContext.summary; -} diff --git a/src/runner.ts b/src/runner.ts index bfcc9c4..272556e 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -5,9 +5,8 @@ import { RoamConverter } from './converters/roam/index'; import { TanaIntermediateFile } from './types/types'; import { WorkflowyConverter } from './converters/workflowy'; import { lstatSync } from 'fs'; -import { ObsidianSingleFileConverter } from './converters/obsidian/ObsidianSingleFileConverter'; import path from 'path'; -import { convertVault } from './converters/obsidian/vaultConverter'; +import { ObsidianSingleFileConverter, ObsidianVaultConverter } from './converters/obsidian'; const fileType = process.argv[2]; const file = process.argv[3]; @@ -71,7 +70,7 @@ function handleFolderConversion() { let summary; switch (fileType) { case 'obsidian': - summary = convertVault(file); + summary = ObsidianVaultConverter(file); break; default: console.log(`File type ${fileType} is not supported for folders`); From fbd98db0151ea8c613e38059b69deeec7e019202 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Wed, 5 Oct 2022 17:42:22 +0200 Subject: [PATCH 14/94] added a README for the obsidian converter --- src/converters/obsidian/OBSIDIAN_README.md | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/converters/obsidian/OBSIDIAN_README.md diff --git a/src/converters/obsidian/OBSIDIAN_README.md b/src/converters/obsidian/OBSIDIAN_README.md new file mode 100644 index 0000000..1122264 --- /dev/null +++ b/src/converters/obsidian/OBSIDIAN_README.md @@ -0,0 +1,40 @@ +# Vault Converter + +The vault converter works like this: + +* go through the vault folder recursively +* create a node for each folder and append it partially to the target file (we leave the children array open) +* convert each file to a node and append it to the target file (see Markdown Nodes explanation) +* close each folder-node as soon as its done + +Vaults can be quite big, so this append-approach is much more performant. +We use the VaultContext to store all information that is needed across the whole vault, so that we don't need to go back to the created Tana nodes. + +# Concepts + +## Folder Nodes + +In Obsidian vaults the folder structure is important. For example a PARA approach would have at least four top-level folder and these are critical for orientation (at least until a more Tana-native orientation is established). Therefore we nest all the created nodes under "Folder Nodes" which are created for each folder in the vault. + +## Markdown Nodes + +Each markdown file is first parsed into a sequential list of Markdown Nodes by breaking up the file according to hierarchy-indicators like headings. These Markdown Nodes are very similar to Tana IF Nodes but don't yet form a graph and contain additional information about the hierarchy level they come from. + +This "second" intermediate format is much easier to debug than the finalized graph structure. It also is necessary outside of Developer Experience considerations: the markdown file needs to become a nested list and for this we need the hierarchy information. Just parsing it as a flat structure is not going to cut it because it loses valuable semantic information. + +The Markdown Nodes are lightly pre-processed to contain only relevant information. + +## Conversion to the Tana IF + +Markdown Nodes are converted to Tana IF Nodes, which are then used in the resulting JSON file. We use the hierarchy information in the Markdown Nodes to create the appropriate nesting. + +Each Obsidian Link is replaced with a new UID, also each file and folder gets a UID. Via the VaultContext we make sure that the correct UID is used when we replace the Obsidian Links. + +### Missing nodes + +Missing Links (no file exists for these) are collected and saved in a separate node under "Missing nodes for $YOUR_VAULT_NAME". We could of course not save these links but then we would need to take care how to not lose the Obsidian Link-name (because it was converted to a UID). + +## VaultContext + +We need some context information like the summary data that needs to be used across the whole converted vault. The place for this is the VaultContext. + From eb12434dd810507d58bcb641ea68b3937d0ed87d Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Wed, 5 Oct 2022 22:32:01 +0200 Subject: [PATCH 15/94] shorten file names --- src/converters/obsidian/ObsidianSingleFileConverter.ts | 4 ++-- src/converters/obsidian/ObsidianVaultConverter.ts | 4 ++-- ...onvertMarkdownNodeToTanaNode.ts => convertMarkdownNode.ts} | 2 +- src/converters/obsidian/convertObsidianFile.ts | 4 ++-- .../{createUnlinkedNodes.ts => createUnlinkedTanaNodes.ts} | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename src/converters/obsidian/{convertMarkdownNodeToTanaNode.ts => convertMarkdownNode.ts} (97%) rename src/converters/obsidian/{createUnlinkedNodes.ts => createUnlinkedTanaNodes.ts} (95%) diff --git a/src/converters/obsidian/ObsidianSingleFileConverter.ts b/src/converters/obsidian/ObsidianSingleFileConverter.ts index be84251..48f2b5d 100644 --- a/src/converters/obsidian/ObsidianSingleFileConverter.ts +++ b/src/converters/obsidian/ObsidianSingleFileConverter.ts @@ -1,7 +1,7 @@ import path from 'path'; import { TanaIntermediateFile } from '../../types/types'; import { convertObsidianFile } from './convertObsidianFile'; -import { createUnlinkedNodes } from './createUnlinkedNodes'; +import { createUnlinkedTanaNodes } from './createUnlinkedTanaNodes'; import { VaultContext } from './VaultContext'; export function ObsidianSingleFileConverter( @@ -16,7 +16,7 @@ export function ObsidianSingleFileConverter( vaultContext.summary.leafNodes--; vaultContext.summary.topLevelNodes++; - const collectedUnlinkedNodes = createUnlinkedNodes(importName, today, vaultContext); + const collectedUnlinkedNodes = createUnlinkedTanaNodes(importName, today, vaultContext); return { version: 'TanaIntermediateFile V0.1', diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index dc129df..9f7cce1 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -1,6 +1,6 @@ import { appendFileSync, unlinkSync } from 'fs'; import path from 'path'; -import { createUnlinkedNodes } from './createUnlinkedNodes'; +import { createUnlinkedTanaNodes } from './createUnlinkedTanaNodes'; import { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './vault'; import { VaultContext } from './VaultContext'; @@ -35,7 +35,7 @@ export function ObsidianVaultConverter( vaultContext.summary.leafNodes--; vaultContext.summary.topLevelNodes++; - const collectedUnlinkedNodes = createUnlinkedNodes(path.basename(vaultPath), today, vaultContext); + const collectedUnlinkedNodes = createUnlinkedTanaNodes(path.basename(vaultPath), today, vaultContext); appendFileSync(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2)); appendFileSync(targetPath, '\n ],\n "summary": \n' + JSON.stringify(vaultContext.summary, null, 2) + '\n}'); diff --git a/src/converters/obsidian/convertMarkdownNodeToTanaNode.ts b/src/converters/obsidian/convertMarkdownNode.ts similarity index 97% rename from src/converters/obsidian/convertMarkdownNodeToTanaNode.ts rename to src/converters/obsidian/convertMarkdownNode.ts index b5887f5..6a8e20f 100644 --- a/src/converters/obsidian/convertMarkdownNodeToTanaNode.ts +++ b/src/converters/obsidian/convertMarkdownNode.ts @@ -3,7 +3,7 @@ import { getBracketLinks } from '../../utils/utils'; import { MarkdownNode } from './extractMarkdownNodes'; import { UidRequestType, VaultContext } from './VaultContext'; -export function convertMarkdownNodeToTanaNode( +export function convertMarkdownNode( obsidianNode: MarkdownNode, today: number, context: VaultContext, diff --git a/src/converters/obsidian/convertObsidianFile.ts b/src/converters/obsidian/convertObsidianFile.ts index 83da412..0aa2c3f 100644 --- a/src/converters/obsidian/convertObsidianFile.ts +++ b/src/converters/obsidian/convertObsidianFile.ts @@ -1,5 +1,5 @@ import { TanaIntermediateNode } from '../../types/types'; -import { convertMarkdownNodeToTanaNode } from './convertMarkdownNodeToTanaNode'; +import { convertMarkdownNode } from './convertMarkdownNode'; import { HierarchyType, MarkdownNode, extractMarkdownNodes } from './extractMarkdownNodes'; import { UidRequestType, VaultContext } from './VaultContext'; @@ -31,7 +31,7 @@ export function convertObsidianFile( const lastObsidianNodes: MarkdownNode[] = [{ type: HierarchyType.ROOT, level: -1 } as MarkdownNode]; const lastTanaNodes = [fileNode]; for (const node of obsidianNodes) { - const childNode = convertMarkdownNodeToTanaNode(node, today, context); + const childNode = convertMarkdownNode(node, today, context); insertNodeIntoHierarchy(childNode, node, lastObsidianNodes, lastTanaNodes); } diff --git a/src/converters/obsidian/createUnlinkedNodes.ts b/src/converters/obsidian/createUnlinkedTanaNodes.ts similarity index 95% rename from src/converters/obsidian/createUnlinkedNodes.ts rename to src/converters/obsidian/createUnlinkedTanaNodes.ts index b9ead5a..49b4a41 100644 --- a/src/converters/obsidian/createUnlinkedNodes.ts +++ b/src/converters/obsidian/createUnlinkedTanaNodes.ts @@ -1,7 +1,7 @@ import { NodeType, TanaIntermediateNode } from '../../types/types'; import { UidRequestType, VaultContext } from './VaultContext'; -export function createUnlinkedNodes( +export function createUnlinkedTanaNodes( importName: string, today: number, vaultContext: VaultContext, From 7f87f7970858e22e7c61ac67e409aa807fad57d3 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Thu, 6 Oct 2022 23:16:58 +0200 Subject: [PATCH 16/94] helper functions to support handling of heading links in Obsidian --- src/converters/obsidian/VaultContext.ts | 5 + .../obsidian/convertMarkdownNode.ts | 2 + .../obsidian/extractMarkdownNodes.ts | 2 +- src/converters/obsidian/headingTree.ts | 118 ++++++++++++++++++ 4 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 src/converters/obsidian/headingTree.ts diff --git a/src/converters/obsidian/VaultContext.ts b/src/converters/obsidian/VaultContext.ts index 0ed1382..d78be94 100644 --- a/src/converters/obsidian/VaultContext.ts +++ b/src/converters/obsidian/VaultContext.ts @@ -45,6 +45,11 @@ export class VaultContext { return this.handleFolder(); } + if (requestType === UidRequestType.CONTENT) { + //Obsidian ignores whitespace, too many other edge cases to handle but this is the least we can do + obsidianLink = obsidianLink.trim(); + } + const uidData = this.uidMap.get(obsidianLink); if (!uidData) { return this.setInitialUid(obsidianLink, requestType); diff --git a/src/converters/obsidian/convertMarkdownNode.ts b/src/converters/obsidian/convertMarkdownNode.ts index 6a8e20f..ea5a249 100644 --- a/src/converters/obsidian/convertMarkdownNode.ts +++ b/src/converters/obsidian/convertMarkdownNode.ts @@ -22,6 +22,8 @@ export function convertMarkdownNode( } function processRawTanaNode(tanaNode: TanaIntermediateNode, vaultContext: VaultContext) { + //TODO: reuse the regexs + //TODO: links to headings [[..#..]] / blocks [[filename#^dcf64c]] //TODO: aliases //TODO: convert to different node types, remove markdown formatting etc. diff --git a/src/converters/obsidian/extractMarkdownNodes.ts b/src/converters/obsidian/extractMarkdownNodes.ts index b7efc9e..5bca906 100644 --- a/src/converters/obsidian/extractMarkdownNodes.ts +++ b/src/converters/obsidian/extractMarkdownNodes.ts @@ -176,7 +176,7 @@ export function postProcessMarkdownNodes(content: string, hierarchy: Hierarchy) } if (hierarchy.type === HierarchyType.HEADING) { - return content.slice(hierarchy.level + 1); //heading symbols and empty space after that + return content.slice(hierarchy.level).trim(); //heading symbols and empty space } if (hierarchy.type === HierarchyType.PARAGRAPH) { diff --git a/src/converters/obsidian/headingTree.ts b/src/converters/obsidian/headingTree.ts new file mode 100644 index 0000000..f2adfc5 --- /dev/null +++ b/src/converters/obsidian/headingTree.ts @@ -0,0 +1,118 @@ +import { HierarchyType, MarkdownNode } from './extractMarkdownNodes'; +import { VaultContext } from './VaultContext'; + +interface Heading { + /** + * The level is only there if the heading was generated from the markdown nodes. + * We use this knowledge to collect non-existing heading links later and to validate the the positions of the first estimated headings. + */ + level?: number; + uid: string; + content: string; +} + +/** + * If no heading tree exists (so no other heading link was found before this file was processed), + * we create the definitive heading tree from the markdown nodes. + * + * @param headingNodes the heading nodes of the current file + * @param tanaNodeUidMap a map from node content to UID. + * @returns + */ +export function markdownNodesToHeadingTree( + headingNodes: MarkdownNode[], + tanaNodeUidMap: Map, +): Heading[][] { + return headingNodes.map((node, index, arr) => { + let level = node.level; + //normalizing levels for later usage + //its possible for a ###-heading to be the immediate child of a #-heading + if (index != 0 && arr[index - 1].level < level) { + level = arr[index - 1].level + 1; + } + + return [ + { + content: node.content, + level: level, + uid: tanaNodeUidMap.get(node.content) as string, + }, + ]; + }); +} + +export interface FileHeadingTree { + file: string; + headingTree: Heading[]; +} + +/** + * If no heading tree exists, we create a first estimation from the first given heading link. + * + * @param splitHeadingLink is the obisidan link splitted, trimmed and filtered for empty strings. + */ +export function headingLinkToHeadingTree(splitHeadingLink: string[], context: VaultContext): Heading[][] { + return splitHeadingLink.map((link) => [ + { + content: link, + //we know the heading has not been processed yet, so the node has no matching UID + //each heading node needs to look up the corresponding FileHeadingTree to find out if a UID exists, so this does not need to be added to the UID map + uid: context.idGenerator(), + }, + ]); +} + +export function isEstimatedTree(tree: Heading[][]) { + return tree[0][0].level === undefined; +} + +/** + * + * @param estimatedTree a tree generated from a heading link (might contain UIDs that are no) + * @param definitiveTree a tree generated from markdown nodes + * @param reportInvalidLinks function to report invalid reconstructed link (e.g. if headingA#headingC#headingB is found to be impossible) + * @param reportMarkdownNodeUIDChanges function to report if a UID in the definitive tree was changed - this means we need to also change it in the Tana Node + * @param estimatedWasFirst if the estimated tree was generated first, we need to transfer all UIDs from it, otherwise the definitive tree is leading in UIDs + */ +export function mergeEstimatedHeadingTreeWithDefinitiveHeadingTree( + estimatedTree: Heading[][], + definitiveTree: Heading[][], + reportInvalidHeadings: (invalidHeadings: Heading[]) => void, + reportMarkdownNodeUIDChanges: (oldUID: string, newUID: string) => void, + estimatedWasFirst: boolean, +) { + for (let index = 0; index < definitiveTree.length; index++) { + const heading = definitiveTree[index][0]; + const headings = estimatedTree[index]; + if (!headings) { + break; + } + const headingsWithWrongLevel = headings.filter((h) => h.content !== heading.content); + if (!estimatedTree[index + 1]) { + estimatedTree[index + 1] = []; + } + estimatedTree[index + 1].push(...headingsWithWrongLevel); + const sameLevel = headings.filter((h) => h.content === heading.content)[0]; + if (sameLevel && estimatedWasFirst) { + //this is only necessary because the Tana Node is created already if we had an estimated tree at first + //we could input Tana Nodes or Markdown Nodes, but in that case we would need to keep the Tana / Markdown Node around + //until another heading link appears which we dont want for memory reasons + //this way this merge function is reusable no matter which headingTree was created first + reportMarkdownNodeUIDChanges(heading.uid, sameLevel.uid); + heading.uid = sameLevel.uid; + } + } + + //we push non-fitting headings continiously down the tree + //this means if some are at the end here, they are invalid + //we can not reconstruct what the origianl heading link (we only now headingA#headingB => headingB) + //but that should be enough for the user, no need to implement full obsidian link correction + if (estimatedTree.length > definitiveTree.length) { + reportInvalidHeadings(estimatedTree.slice(definitiveTree.length).flat()); + } + + return definitiveTree; +} + +//TODO: count headings that are not found in the statistics +//TODO: include the file in the invalid headings-node From b41db85f9ac492ee004752206f2fa8b58cc53eb5 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sat, 8 Oct 2022 00:29:03 +0200 Subject: [PATCH 17/94] added support for block refs in Obsidian --- .../obsidian/ObsidianSingleFileConverter.ts | 7 +- .../obsidian/ObsidianVaultConverter.ts | 4 +- src/converters/obsidian/VaultContext.ts | 185 +++++++++++++++--- .../obsidian/convertMarkdownNode.ts | 29 ++- .../obsidian/convertObsidianFile.ts | 4 +- .../obsidian/createUnlinkedTanaNodes.ts | 32 +-- src/converters/obsidian/headingTree.ts | 118 ----------- .../obsidian/tests/VaultContext.test.ts | 35 +++- .../convertMarkdownNodeToTanaNode.test.ts | 2 +- .../obsidian/tests/fixtures/full.tif.json | 59 ++++-- .../obsidian/tests/fixtures/single.tif.json | 2 +- .../tests/fixtures/vault/folder/test2.md | 4 +- .../obsidian/tests/fixtures/vault/test.md | 2 +- src/converters/obsidian/vault.ts | 4 +- 14 files changed, 280 insertions(+), 207 deletions(-) delete mode 100644 src/converters/obsidian/headingTree.ts diff --git a/src/converters/obsidian/ObsidianSingleFileConverter.ts b/src/converters/obsidian/ObsidianSingleFileConverter.ts index 48f2b5d..8ab81a9 100644 --- a/src/converters/obsidian/ObsidianSingleFileConverter.ts +++ b/src/converters/obsidian/ObsidianSingleFileConverter.ts @@ -17,10 +17,13 @@ export function ObsidianSingleFileConverter( vaultContext.summary.topLevelNodes++; const collectedUnlinkedNodes = createUnlinkedTanaNodes(importName, today, vaultContext); - + const nodes = [node]; + if (collectedUnlinkedNodes) { + nodes.push(collectedUnlinkedNodes); + } return { version: 'TanaIntermediateFile V0.1', summary: vaultContext.summary, - nodes: [node, collectedUnlinkedNodes], + nodes: nodes, }; } diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index 9f7cce1..4c61e45 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -36,7 +36,9 @@ export function ObsidianVaultConverter( vaultContext.summary.topLevelNodes++; const collectedUnlinkedNodes = createUnlinkedTanaNodes(path.basename(vaultPath), today, vaultContext); - appendFileSync(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2)); + if (collectedUnlinkedNodes) { + appendFileSync(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2)); + } appendFileSync(targetPath, '\n ],\n "summary": \n' + JSON.stringify(vaultContext.summary, null, 2) + '\n}'); diff --git a/src/converters/obsidian/VaultContext.ts b/src/converters/obsidian/VaultContext.ts index d78be94..c7154a5 100644 --- a/src/converters/obsidian/VaultContext.ts +++ b/src/converters/obsidian/VaultContext.ts @@ -3,15 +3,75 @@ import { idgenerator as randomGenerator } from '../../utils/utils'; export enum UidRequestType { FILE, - FOLDER, CONTENT, } -type UidData = { +interface UidData { type: UidRequestType; uid: string; obsidianLink: string; -}; +} + +interface HeadingUidData { + uid: string; + link: string[]; +} + +enum BlockUidRequestType { + LINK, //the request came from using the block ref + BLOCK, //the request came from finding the block ref +} + +interface BlockUidData { + uid: string; + obsidianLink: string; + type: BlockUidRequestType; +} + +enum LinkType { + DEFAULT, + HEADING, + BLOCK, +} + +/** + * + * @param link the link split by "#" and cleaned. + */ +function detectLinkType(link: string[]) { + if (link.length === 2 && link[1].startsWith('^')) { + return LinkType.BLOCK; + } + + if (link.length > 1) { + return LinkType.HEADING; + } + + return LinkType.DEFAULT; +} + +//this is used for easier replacing the Heading Link UIDs in the post processing +//whoever uses this string in his text will be disregarded +export const HEADING_LINK_PREFIX = '$$!HEADING_LINK!$$'; + +export function extractBlockId(content: string): [string, string | undefined] { + let id; + + const cleanedContent = content + .split('\n') + .map((line) => { + const splitLine = line.split(' '); + const lastEle = splitLine[splitLine.length - 1]; + if (lastEle.startsWith('^')) { + //we take the last id, rest will be detected as invalid + id = lastEle; + return splitLine.slice(0, -1).join(' '); + } + }) + .join('\n'); + + return [cleanedContent, id]; +} /** * Contains all information that is used across the whole vault, like which Uids have already been used. @@ -26,10 +86,35 @@ export class VaultContext { brokenRefs: 0, }; //we will need to expand this to be able to support relative paths - uidMap = new Map(); + //all normal ([[fileName]]), file or folder uids: + defaultLinkTracker = new Map(); + //all heading temp-uids: + headingLinkTracker = new Map(); + //all block uids: > + blockLinkTrack = new Map>(); constructor(public idGenerator: () => string = randomGenerator) {} + /** + * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content. + * @returns [uid, cleanedContent] + */ + contentUid(fileName: string, content: string) { + const [cleanedContent, id] = extractBlockId(content); + if (id) { + return [this.handleBlockLink([fileName, id], BlockUidRequestType.BLOCK), cleanedContent]; + } else { + return [this.randomUid(), content]; + } + } + + randomUid() { + this.incrementSummary(); + //folders / "summary unlinked nodes" / content-nodes get new uids always + //because these UIDs either are not in the source or need to be connected later + return this.idGenerator(); + } + /** * We can not just take the obsidian link because we might already have created a node for that link * or a folder might have the same link as a file. @@ -39,24 +124,41 @@ export class VaultContext { * A side-effect is the collection of the summary. */ uidRequest(obsidianLink: string, requestType: UidRequestType) { - //TODO: need to collect unlinked nodes + their obsidian name to create them later - - if (requestType === UidRequestType.FOLDER) { - return this.handleFolder(); + if (requestType === UidRequestType.FILE) { + //we dont use the same split-link because files could contain # + return this.handleDefaultLink(obsidianLink.trim(), requestType); } - if (requestType === UidRequestType.CONTENT) { - //Obsidian ignores whitespace, too many other edge cases to handle but this is the least we can do - obsidianLink = obsidianLink.trim(); + //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do + const cleanLink = obsidianLink + .split('#') + .map((s) => s.trim()) + .filter((s) => s !== ''); + const linkType = detectLinkType(cleanLink); + switch (linkType) { + case LinkType.DEFAULT: + return this.handleDefaultLink(cleanLink[0], requestType); + case LinkType.BLOCK: + return this.handleBlockLink(cleanLink, BlockUidRequestType.LINK); + case LinkType.HEADING: + return this.handleHeadingLink(cleanLink); + default: + throw 'Invalid link type detected: ' + cleanLink; } + } - const uidData = this.uidMap.get(obsidianLink); + private handleDefaultLink(obsidianLink: string, requestType: UidRequestType) { + const uidData = this.defaultLinkTracker.get(obsidianLink); if (!uidData) { - return this.setInitialUid(obsidianLink, requestType); + this.incrementSummary(); + const uid = this.idGenerator(); + this.defaultLinkTracker.set(obsidianLink, { uid, obsidianLink, type: requestType }); + return uid; } - //at the end every uiData that has been only accessed from content (so inside the markdown file) + //at the end every uidData that has been only accessed from content (so inside the markdown file) //has no matching file node and is therefore unlinked + //otherwise during the creation of the file node, it would have accessed the same Uid if (uidData.type === UidRequestType.CONTENT) { uidData.type = requestType; } @@ -64,17 +166,39 @@ export class VaultContext { return uidData.uid; } - private handleFolder() { - this.incrementSummary(); - //folders get new uids always because they cant be linked - return this.idGenerator(); + private handleHeadingLink(link: string[]) { + const fileName = link[0]; + const fileHeadingData = this.headingLinkTracker.get(fileName) ?? []; + this.headingLinkTracker.set(fileName, fileHeadingData); + //TODO: + //these "uids" are replaced and counted later + const uid = HEADING_LINK_PREFIX + fileHeadingData.length; + fileHeadingData.push({ uid, link: link.slice(1) }); + return uid; } - private setInitialUid(obsidianLink: string, requestType: UidRequestType) { - this.incrementSummary(); - const uid = this.idGenerator(); - this.uidMap.set(obsidianLink, { uid, obsidianLink, type: requestType }); - return uid; + private handleBlockLink(link: string[], requestType: BlockUidRequestType) { + const fileName = link[0]; + const blockUidMap = this.blockLinkTrack.get(fileName) ?? new Map(); + this.blockLinkTrack.set(fileName, blockUidMap); + const blockObsidianUid = link[1]; + let blockUidData = blockUidMap.get(blockObsidianUid); + if (!blockUidData) { + blockUidData = { + uid: this.randomUid(), + obsidianLink: link.join('#'), + type: requestType, + }; + } + blockUidMap.set(blockObsidianUid, blockUidData); + + //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid + //because that means we didnt find it in "file" + if (blockUidData.type === BlockUidRequestType.LINK) { + blockUidData.type = requestType; + } + + return blockUidData.uid; } private incrementSummary() { @@ -82,11 +206,18 @@ export class VaultContext { this.summary.leafNodes++; } - getUnlinkedNodes() { - const unlinkedNodes = []; - for (const node of this.uidMap.values()) { + getAllInvalidContentLinks() { + const unlinkedNodes: { uid: string; link: string }[] = []; + for (const node of this.defaultLinkTracker.values()) { if (node.type === UidRequestType.CONTENT) { - unlinkedNodes.push(node); + unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink }); + } + } + for (const fileBlockLinks of this.blockLinkTrack.values()) { + for (const blockLink of fileBlockLinks.values()) { + if (blockLink.type === BlockUidRequestType.LINK) { + unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink }); + } } } diff --git a/src/converters/obsidian/convertMarkdownNode.ts b/src/converters/obsidian/convertMarkdownNode.ts index ea5a249..f76563d 100644 --- a/src/converters/obsidian/convertMarkdownNode.ts +++ b/src/converters/obsidian/convertMarkdownNode.ts @@ -4,37 +4,30 @@ import { MarkdownNode } from './extractMarkdownNodes'; import { UidRequestType, VaultContext } from './VaultContext'; export function convertMarkdownNode( + fileName: string, obsidianNode: MarkdownNode, today: number, - context: VaultContext, + vaultContext: VaultContext, ): TanaIntermediateNode { - const childNode = { - uid: context.idGenerator(), - name: obsidianNode.content, + const [uid, content] = vaultContext.contentUid(fileName, obsidianNode.content); + const tanaNode: TanaIntermediateNode = { + uid, + name: content, createdAt: today, editedAt: today, type: 'node' as NodeType, }; - processRawTanaNode(childNode, context); - - return childNode; -} - -function processRawTanaNode(tanaNode: TanaIntermediateNode, vaultContext: VaultContext) { //TODO: reuse the regexs - //TODO: links to headings [[..#..]] / blocks [[filename#^dcf64c]] //TODO: aliases //TODO: convert to different node types, remove markdown formatting etc. const n = tanaNode.name; tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim(); // links with alias tanaNode.name = tanaNode.name.replace(/\[\[([^|]+)\|([^\]]+)\]\]/g, '[$1]([[$2]])'); - // links with anchor, just remove anchor for now - tanaNode.name = tanaNode.name.replace(/\[\[([^#]+)#([^#\]]+)\]\]/g, '[[$1]]'); // tags, convert to links for now - tanaNode.name = tanaNode.name.replace(/(?:\s|^)(#([^\[]]+?))(?:(?=\s)|$)/g, ' #[[$2]]'); + tanaNode.name = tanaNode.name.replace(/(?:\s|^)(#([^[]]+?))(?:(?=\s)|$)/g, ' #[[$2]]'); const foundUids = getBracketLinks(tanaNode.name, true).map((link) => [ link, @@ -45,8 +38,10 @@ function processRawTanaNode(tanaNode: TanaIntermediateNode, vaultContext: VaultC tanaNode.refs = []; } - for (const [link, uid] of foundUids) { - tanaNode.refs?.push(uid); - tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', '[[' + uid + ']]'); + for (const [link, linkUid] of foundUids) { + tanaNode.refs?.push(linkUid); + tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', '[[' + linkUid + ']]'); } + + return tanaNode; } diff --git a/src/converters/obsidian/convertObsidianFile.ts b/src/converters/obsidian/convertObsidianFile.ts index 0aa2c3f..ed2327a 100644 --- a/src/converters/obsidian/convertObsidianFile.ts +++ b/src/converters/obsidian/convertObsidianFile.ts @@ -24,14 +24,12 @@ export function convertObsidianFile( const fileNode = createFileNode(displayName, today, context); - context.summary.leafNodes += obsidianNodes.length; - context.summary.totalNodes += obsidianNodes.length; //TODO: broken refs const lastObsidianNodes: MarkdownNode[] = [{ type: HierarchyType.ROOT, level: -1 } as MarkdownNode]; const lastTanaNodes = [fileNode]; for (const node of obsidianNodes) { - const childNode = convertMarkdownNode(node, today, context); + const childNode = convertMarkdownNode(fileName, node, today, context); insertNodeIntoHierarchy(childNode, node, lastObsidianNodes, lastTanaNodes); } diff --git a/src/converters/obsidian/createUnlinkedTanaNodes.ts b/src/converters/obsidian/createUnlinkedTanaNodes.ts index 49b4a41..f1a5333 100644 --- a/src/converters/obsidian/createUnlinkedTanaNodes.ts +++ b/src/converters/obsidian/createUnlinkedTanaNodes.ts @@ -1,32 +1,36 @@ import { NodeType, TanaIntermediateNode } from '../../types/types'; -import { UidRequestType, VaultContext } from './VaultContext'; +import { VaultContext } from './VaultContext'; export function createUnlinkedTanaNodes( importName: string, today: number, vaultContext: VaultContext, -): TanaIntermediateNode { +): TanaIntermediateNode | null { + const unlinkedNodes = vaultContext + .getAllInvalidContentLinks() + .sort((a, b) => a.link.localeCompare(b.link)) + .map((node) => ({ + uid: node.uid, + name: node.link, + createdAt: today, + editedAt: today, + type: 'node' as NodeType, + })); + + if (unlinkedNodes.length === 0) { + return null; + } + const rootNodeName = 'Missing Nodes for ' + importName; const rootNode: TanaIntermediateNode = { //type here does not matter anymore - uid: vaultContext.uidRequest(rootNodeName, UidRequestType.FOLDER), + uid: vaultContext.randomUid(), name: rootNodeName, createdAt: today, editedAt: today, type: 'node' as NodeType, }; - const unlinkedNodes = vaultContext - .getUnlinkedNodes() - .sort((a, b) => a.obsidianLink.localeCompare(b.obsidianLink)) - .map((node) => ({ - uid: node.uid, - name: node.obsidianLink, - createdAt: today, - editedAt: today, - type: 'node' as NodeType, - })); - rootNode.children = unlinkedNodes; return rootNode; diff --git a/src/converters/obsidian/headingTree.ts b/src/converters/obsidian/headingTree.ts deleted file mode 100644 index f2adfc5..0000000 --- a/src/converters/obsidian/headingTree.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { HierarchyType, MarkdownNode } from './extractMarkdownNodes'; -import { VaultContext } from './VaultContext'; - -interface Heading { - /** - * The level is only there if the heading was generated from the markdown nodes. - * We use this knowledge to collect non-existing heading links later and to validate the the positions of the first estimated headings. - */ - level?: number; - uid: string; - content: string; -} - -/** - * If no heading tree exists (so no other heading link was found before this file was processed), - * we create the definitive heading tree from the markdown nodes. - * - * @param headingNodes the heading nodes of the current file - * @param tanaNodeUidMap a map from node content to UID. - * @returns - */ -export function markdownNodesToHeadingTree( - headingNodes: MarkdownNode[], - tanaNodeUidMap: Map, -): Heading[][] { - return headingNodes.map((node, index, arr) => { - let level = node.level; - //normalizing levels for later usage - //its possible for a ###-heading to be the immediate child of a #-heading - if (index != 0 && arr[index - 1].level < level) { - level = arr[index - 1].level + 1; - } - - return [ - { - content: node.content, - level: level, - uid: tanaNodeUidMap.get(node.content) as string, - }, - ]; - }); -} - -export interface FileHeadingTree { - file: string; - headingTree: Heading[]; -} - -/** - * If no heading tree exists, we create a first estimation from the first given heading link. - * - * @param splitHeadingLink is the obisidan link splitted, trimmed and filtered for empty strings. - */ -export function headingLinkToHeadingTree(splitHeadingLink: string[], context: VaultContext): Heading[][] { - return splitHeadingLink.map((link) => [ - { - content: link, - //we know the heading has not been processed yet, so the node has no matching UID - //each heading node needs to look up the corresponding FileHeadingTree to find out if a UID exists, so this does not need to be added to the UID map - uid: context.idGenerator(), - }, - ]); -} - -export function isEstimatedTree(tree: Heading[][]) { - return tree[0][0].level === undefined; -} - -/** - * - * @param estimatedTree a tree generated from a heading link (might contain UIDs that are no) - * @param definitiveTree a tree generated from markdown nodes - * @param reportInvalidLinks function to report invalid reconstructed link (e.g. if headingA#headingC#headingB is found to be impossible) - * @param reportMarkdownNodeUIDChanges function to report if a UID in the definitive tree was changed - this means we need to also change it in the Tana Node - * @param estimatedWasFirst if the estimated tree was generated first, we need to transfer all UIDs from it, otherwise the definitive tree is leading in UIDs - */ -export function mergeEstimatedHeadingTreeWithDefinitiveHeadingTree( - estimatedTree: Heading[][], - definitiveTree: Heading[][], - reportInvalidHeadings: (invalidHeadings: Heading[]) => void, - reportMarkdownNodeUIDChanges: (oldUID: string, newUID: string) => void, - estimatedWasFirst: boolean, -) { - for (let index = 0; index < definitiveTree.length; index++) { - const heading = definitiveTree[index][0]; - const headings = estimatedTree[index]; - if (!headings) { - break; - } - const headingsWithWrongLevel = headings.filter((h) => h.content !== heading.content); - if (!estimatedTree[index + 1]) { - estimatedTree[index + 1] = []; - } - estimatedTree[index + 1].push(...headingsWithWrongLevel); - const sameLevel = headings.filter((h) => h.content === heading.content)[0]; - if (sameLevel && estimatedWasFirst) { - //this is only necessary because the Tana Node is created already if we had an estimated tree at first - //we could input Tana Nodes or Markdown Nodes, but in that case we would need to keep the Tana / Markdown Node around - //until another heading link appears which we dont want for memory reasons - //this way this merge function is reusable no matter which headingTree was created first - reportMarkdownNodeUIDChanges(heading.uid, sameLevel.uid); - heading.uid = sameLevel.uid; - } - } - - //we push non-fitting headings continiously down the tree - //this means if some are at the end here, they are invalid - //we can not reconstruct what the origianl heading link (we only now headingA#headingB => headingB) - //but that should be enough for the user, no need to implement full obsidian link correction - if (estimatedTree.length > definitiveTree.length) { - reportInvalidHeadings(estimatedTree.slice(definitiveTree.length).flat()); - } - - return definitiveTree; -} - -//TODO: count headings that are not found in the statistics -//TODO: include the file in the invalid headings-node diff --git a/src/converters/obsidian/tests/VaultContext.test.ts b/src/converters/obsidian/tests/VaultContext.test.ts index 4123ccf..6dfc28a 100644 --- a/src/converters/obsidian/tests/VaultContext.test.ts +++ b/src/converters/obsidian/tests/VaultContext.test.ts @@ -16,7 +16,7 @@ test('VaultContext uid test', () => { brokenRefs: 0, }); //folders get different uids - expect(vaultContext.uidRequest('link', UidRequestType.FOLDER)).toBe('1'); + expect(vaultContext.randomUid()).toBe('1'); expect(vaultContext.summary).toEqual({ leafNodes: 2, topLevelNodes: 0, @@ -26,7 +26,38 @@ test('VaultContext uid test', () => { brokenRefs: 0, }); //folders always have fresh uids, so folders with the same name work - expect(vaultContext.uidRequest('link', UidRequestType.FOLDER)).toBe('2'); + expect(vaultContext.randomUid()).toBe('2'); //having folder uids does not change other uids expect(vaultContext.uidRequest('link', UidRequestType.CONTENT)).toBe('0'); }); + +test('VaultContext uid block link test', () => { + //first reading the file, then encountering the block ref + const vaultContext = new VaultContext(deterministicGenerator()); + const [uid, content] = vaultContext.contentUid('fileName', 'content ^uid'); + expect(uid).toBe('0'); + expect(content).toBe('content'); + const uid2 = vaultContext.uidRequest('fileName#^uid', UidRequestType.CONTENT); + expect(uid2).toBe('0'); + + //first encountering the block ref, then reading the file + const uid3 = vaultContext.uidRequest('fileName#^uid3', UidRequestType.CONTENT); + expect(uid3).toBe('1'); + const [uid4, content2] = vaultContext.contentUid('fileName', 'content ^uid3'); + expect(uid4).toBe('1'); + expect(content2).toBe('content'); + + //different file + const uid5 = vaultContext.uidRequest('fileName2#^uid3', UidRequestType.CONTENT); + expect(uid5).toBe('2'); + const [uid6, content3] = vaultContext.contentUid('fileName2', 'content ^uid3'); + expect(uid6).toBe('2'); + expect(content3).toBe('content'); +}); + +test('VaultContext invalid nodes test', () => { + const vaultContext = new VaultContext(deterministicGenerator()); + //the block link has not been accessed from its source / has not been found - just used + vaultContext.uidRequest('fileName#^uid', UidRequestType.CONTENT); + expect(vaultContext.getAllInvalidContentLinks()).toStrictEqual([{ uid: '0', link: 'fileName#^uid' }]); +}); diff --git a/src/converters/obsidian/tests/convertMarkdownNodeToTanaNode.test.ts b/src/converters/obsidian/tests/convertMarkdownNodeToTanaNode.test.ts index f614f81..8d4ed53 100644 --- a/src/converters/obsidian/tests/convertMarkdownNodeToTanaNode.test.ts +++ b/src/converters/obsidian/tests/convertMarkdownNodeToTanaNode.test.ts @@ -204,7 +204,7 @@ https://some.url/ type: HierarchyType.OUTLINE, }, { - content: 'Node with [[Link]] [[Link2]]', + content: 'Block with [[Link]] [[Link2]] ^BLOCK_UID', level: 4, type: HierarchyType.OUTLINE, }, diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index 14b4cc5..4cf8320 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -75,28 +75,51 @@ "type": "node", "refs": ["14", "15"] }, - { "uid": "16", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } + { + "uid": "16", + "name": "Fun with missing block ref [[17]] [[18]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["17", "18"] + } ] }, - { "uid": "17", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } + { + "uid": "19", + "name": "Out of Level", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "20", + "name": "Referencing a block [[21]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["21"] + } + ] + } ] } ] } ] }, - { "uid": "18", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "22", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, { - "uid": "19", + "uid": "23", "name": "test", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "20", + "uid": "24", "name": "Starting without [[6]].", "createdAt": 1, "editedAt": 1, @@ -104,40 +127,40 @@ "refs": ["6"] }, { - "uid": "21", + "uid": "25", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "22", "name": "[[9]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["9"] }, - { "uid": "23", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "26", "name": "[[9]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["9"] }, + { "uid": "27", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "24", + "uid": "28", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "25", + "uid": "29", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "26", - "name": "Node with [[14]] [[15]]", + "uid": "21", + "name": "Block with [[14]] [[15]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["14", "15"] }, - { "uid": "27", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "30", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, - { "uid": "28", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "31", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ] @@ -147,7 +170,7 @@ ] }, { - "uid": "29", + "uid": "32", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, @@ -156,9 +179,11 @@ { "uid": "6", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "14", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "15", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "9", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "18", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "9", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "17", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ], - "summary": { "leafNodes": 29, "topLevelNodes": 1, "totalNodes": 30, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } + "summary": { "leafNodes": 32, "topLevelNodes": 1, "totalNodes": 33, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/single.tif.json b/src/converters/obsidian/tests/fixtures/single.tif.json index b62abbf..3bbee09 100644 --- a/src/converters/obsidian/tests/fixtures/single.tif.json +++ b/src/converters/obsidian/tests/fixtures/single.tif.json @@ -42,7 +42,7 @@ "children": [ { "uid": "9", - "name": "Node with [[10]] [[11]]", + "name": "Block with [[10]] [[11]]", "createdAt": 1, "editedAt": 1, "type": "node", diff --git a/src/converters/obsidian/tests/fixtures/vault/folder/test2.md b/src/converters/obsidian/tests/fixtures/vault/folder/test2.md index 6910bf5..10412f6 100644 --- a/src/converters/obsidian/tests/fixtures/vault/folder/test2.md +++ b/src/converters/obsidian/tests/fixtures/vault/folder/test2.md @@ -10,6 +10,8 @@ a newline. - Some - Node with [[Link]] [[Link2]] - - Fun + - Fun with missing block ref [[test#^MISSING]] [[missing#^MISSING]] #### Out of Level + +Referencing a block [[test#^BLOCK_UID]] diff --git a/src/converters/obsidian/tests/fixtures/vault/test.md b/src/converters/obsidian/tests/fixtures/vault/test.md index 5c0ef7b..a8c121d 100644 --- a/src/converters/obsidian/tests/fixtures/vault/test.md +++ b/src/converters/obsidian/tests/fixtures/vault/test.md @@ -9,7 +9,7 @@ a newline. ## Heading 2 - Some - - Node with [[Link]] [[Link2]] + - Block with [[Link]] [[Link2]] ^BLOCK_UID - Fun #### Out of Level diff --git a/src/converters/obsidian/vault.ts b/src/converters/obsidian/vault.ts index e664284..18cfd22 100644 --- a/src/converters/obsidian/vault.ts +++ b/src/converters/obsidian/vault.ts @@ -1,7 +1,7 @@ import { appendFileSync, Dirent, readdirSync, readFileSync } from 'fs'; import path, { resolve } from 'path'; import { convertObsidianFile } from './convertObsidianFile'; -import { UidRequestType, VaultContext } from './VaultContext'; +import { VaultContext } from './VaultContext'; enum ChildrenPosition { NOT_LAST = 'NOT_LAST', @@ -40,7 +40,7 @@ export function handleVault( export function addParentNodeStart(targetPath: string, today: number, vaultContext: VaultContext) { return (dir: string) => { const name = path.basename(dir); - const uid = vaultContext.uidRequest(name, UidRequestType.FOLDER); + const uid = vaultContext.randomUid(); appendFileSync( targetPath, `{ From 2ad9e56cb061b593af95350856419c5e32f5f7d9 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sat, 8 Oct 2022 15:16:45 +0200 Subject: [PATCH 18/94] add mapping from temp heading-uid to actual uid for Obsidian --- .../obsidian/ObsidianVaultConverter.ts | 8 +- src/converters/obsidian/VaultContext.ts | 20 ++- .../obsidian/convertObsidianFile.ts | 60 +++---- src/converters/obsidian/createTree.ts | 54 ++++++ src/converters/obsidian/filterHeadingLinks.ts | 48 ++++++ .../obsidian/tests/filterHeadingLinks.test.ts | 38 +++++ .../tests/traverseTreeBreadthFirst.test.ts | 155 ++++++++++++++++++ .../obsidian/traverseTreeBreadthFirst.ts | 35 ++++ src/converters/obsidian/vault.ts | 9 +- 9 files changed, 378 insertions(+), 49 deletions(-) create mode 100644 src/converters/obsidian/createTree.ts create mode 100644 src/converters/obsidian/filterHeadingLinks.ts create mode 100644 src/converters/obsidian/tests/filterHeadingLinks.test.ts create mode 100644 src/converters/obsidian/tests/traverseTreeBreadthFirst.test.ts create mode 100644 src/converters/obsidian/traverseTreeBreadthFirst.ts diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index 4c61e45..4709aea 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -1,6 +1,8 @@ import { appendFileSync, unlinkSync } from 'fs'; import path from 'path'; import { createUnlinkedTanaNodes } from './createUnlinkedTanaNodes'; +import { HeadingTracker } from './filterHeadingLinks'; +import { postProcessTIFFIle } from './postProcessTIFFile'; import { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './vault'; import { VaultContext } from './VaultContext'; @@ -24,11 +26,13 @@ export function ObsidianVaultConverter( } catch (e) {} appendFileSync(targetPath, '{\n "version": "TanaIntermediateFile V0.1",\n "nodes": [\n'); + const headingTracker: HeadingTracker = new Map(); + handleVault( vaultPath, addParentNodeStart(targetPath, today, vaultContext), addParentNodeEnd(targetPath), - addFileNode(targetPath, today, vaultContext), + addFileNode(targetPath, today, vaultContext, headingTracker), ); //the vault-node needs to be counted as a top level node @@ -42,5 +46,7 @@ export function ObsidianVaultConverter( appendFileSync(targetPath, '\n ],\n "summary": \n' + JSON.stringify(vaultContext.summary, null, 2) + '\n}'); + postProcessTIFFIle(targetPath, vaultContext, headingTracker); + return vaultContext.summary; } diff --git a/src/converters/obsidian/VaultContext.ts b/src/converters/obsidian/VaultContext.ts index c7154a5..5e7ae8e 100644 --- a/src/converters/obsidian/VaultContext.ts +++ b/src/converters/obsidian/VaultContext.ts @@ -12,9 +12,9 @@ interface UidData { obsidianLink: string; } -interface HeadingUidData { +export interface HeadingUidData { uid: string; - link: string[]; + link: string[]; //without the fileName } enum BlockUidRequestType { @@ -86,12 +86,14 @@ export class VaultContext { brokenRefs: 0, }; //we will need to expand this to be able to support relative paths + //all normal ([[fileName]]), file or folder uids: defaultLinkTracker = new Map(); //all heading temp-uids: headingLinkTracker = new Map(); //all block uids: > - blockLinkTrack = new Map>(); + blockLinkTracker = new Map>(); + invalidLinks: { uid: string; link: string }[] = []; constructor(public idGenerator: () => string = randomGenerator) {} @@ -179,8 +181,8 @@ export class VaultContext { private handleBlockLink(link: string[], requestType: BlockUidRequestType) { const fileName = link[0]; - const blockUidMap = this.blockLinkTrack.get(fileName) ?? new Map(); - this.blockLinkTrack.set(fileName, blockUidMap); + const blockUidMap = this.blockLinkTracker.get(fileName) ?? new Map(); + this.blockLinkTracker.set(fileName, blockUidMap); const blockObsidianUid = link[1]; let blockUidData = blockUidMap.get(blockObsidianUid); if (!blockUidData) { @@ -206,14 +208,18 @@ export class VaultContext { this.summary.leafNodes++; } + addInvalidLinks(links: { uid: string; link: string }[]) { + this.invalidLinks.push(...links); + } + getAllInvalidContentLinks() { - const unlinkedNodes: { uid: string; link: string }[] = []; + const unlinkedNodes: { uid: string; link: string }[] = [...this.invalidLinks]; for (const node of this.defaultLinkTracker.values()) { if (node.type === UidRequestType.CONTENT) { unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink }); } } - for (const fileBlockLinks of this.blockLinkTrack.values()) { + for (const fileBlockLinks of this.blockLinkTracker.values()) { for (const blockLink of fileBlockLinks.values()) { if (blockLink.type === BlockUidRequestType.LINK) { unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink }); diff --git a/src/converters/obsidian/convertObsidianFile.ts b/src/converters/obsidian/convertObsidianFile.ts index ed2327a..d940c0a 100644 --- a/src/converters/obsidian/convertObsidianFile.ts +++ b/src/converters/obsidian/convertObsidianFile.ts @@ -1,6 +1,8 @@ import { TanaIntermediateNode } from '../../types/types'; import { convertMarkdownNode } from './convertMarkdownNode'; +import { createTree } from './createTree'; import { HierarchyType, MarkdownNode, extractMarkdownNodes } from './extractMarkdownNodes'; +import { HeadingTracker } from './filterHeadingLinks'; import { UidRequestType, VaultContext } from './VaultContext'; export function convertObsidianFile( @@ -8,6 +10,7 @@ export function convertObsidianFile( fileContent: string, context: VaultContext, today: number = Date.now(), + headingTracker?: HeadingTracker, ) { let obsidianNodes = extractMarkdownNodes(fileContent); let displayName = fileName; @@ -22,16 +25,26 @@ export function convertObsidianFile( obsidianNodes = obsidianNodes.slice(1); } + const headingNodes: (MarkdownNode & { uid: string })[] = []; + const fileNode = createFileNode(displayName, today, context); - //TODO: broken refs + createTree( + fileNode, + { type: HierarchyType.ROOT, level: -1 } as MarkdownNode, + obsidianNodes, + isChild, + (markdownNode) => { + return convertMarkdownNode(fileName, markdownNode, today, context); + }, + (tanaNode, markdownNode) => { + if (markdownNode.type === HierarchyType.HEADING) { + headingNodes.push({ ...markdownNode, uid: tanaNode.uid }); + } + }, + ); - const lastObsidianNodes: MarkdownNode[] = [{ type: HierarchyType.ROOT, level: -1 } as MarkdownNode]; - const lastTanaNodes = [fileNode]; - for (const node of obsidianNodes) { - const childNode = convertMarkdownNode(fileName, node, today, context); - insertNodeIntoHierarchy(childNode, node, lastObsidianNodes, lastTanaNodes); - } + headingTracker?.set(fileName, headingNodes); return fileNode; } @@ -46,39 +59,6 @@ function createFileNode(displayName: string, today: number, context: VaultContex }; } -function insertNodeIntoHierarchy( - tanaNode: TanaIntermediateNode, - obsidianNode: MarkdownNode, - lastObsidianNodes: MarkdownNode[], - lastTanaNodes: TanaIntermediateNode[], -) { - //once the non-parent nodes are removed, the next one is the parent - removeNonParentNodes(obsidianNode, lastObsidianNodes, lastTanaNodes); - const lastObsidianNode = lastObsidianNodes[lastObsidianNodes.length - 1]; - const lastTanaNode = lastTanaNodes[lastTanaNodes.length - 1]; - if (lastObsidianNode && lastTanaNode) { - lastTanaNode.children = lastTanaNode.children ?? []; - lastTanaNode.children.push(tanaNode); - } - lastObsidianNodes.push(obsidianNode); - lastTanaNodes.push(tanaNode); -} - -function removeNonParentNodes( - obsidianNode: MarkdownNode, - lastObsidianNodes: MarkdownNode[], - lastTanaNodes: TanaIntermediateNode[], -) { - let lastObsidianNode = lastObsidianNodes[lastObsidianNodes.length - 1]; - let lastTanaNode = lastTanaNodes[lastTanaNodes.length - 1]; - while (lastObsidianNode && lastTanaNode && !isChild(lastObsidianNode, obsidianNode)) { - lastObsidianNodes.pop(); - lastTanaNodes.pop(); - lastObsidianNode = lastObsidianNodes[lastObsidianNodes.length - 1]; - lastTanaNode = lastTanaNodes[lastTanaNodes.length - 1]; - } -} - function isChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) { if (potentialParent.type === HierarchyType.ROOT) { return true; diff --git a/src/converters/obsidian/createTree.ts b/src/converters/obsidian/createTree.ts new file mode 100644 index 0000000..870f72a --- /dev/null +++ b/src/converters/obsidian/createTree.ts @@ -0,0 +1,54 @@ +/** + * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy. + */ +export function createTree( + targetRoot: Target, + sourceRoot: Source, + sources: Source[], + isChildCheck: (a: Source, b: Source) => boolean, + conversion: (a: Source) => Target, + postInsertionHook?: (target: Target, source: Source) => void, +) { + const lastSourceNodes: Source[] = [sourceRoot]; + const lastTargetNodes = [targetRoot]; + for (const node of sources) { + const childNode = conversion(node); + insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck); + postInsertionHook?.(childNode, node); + } +} + +function insertNodeIntoHierarchy( + targetNode: Target, + sourceNode: Source, + lastSourceNodes: Source[], + lastTargetNodes: Target[], + isChildCheck: (a: Source, b: Source) => boolean, +) { + //once the non-parent nodes are removed, the next one is the parent + removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck); + const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1]; + const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1]; + if (lastSourceNode && lastTargetNode) { + lastTargetNode.children = lastTargetNode.children ?? []; + lastTargetNode.children.push(targetNode); + } + lastSourceNodes.push(sourceNode); + lastTargetNodes.push(targetNode); +} + +function removeNonParentNodes( + sourceNode: Source, + lastSourceNodes: Source[], + lastTargetNodes: Target[], + isChildCheck: (a: Source, b: Source) => boolean, +) { + let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1]; + let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1]; + while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) { + lastSourceNodes.pop(); + lastTargetNodes.pop(); + lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1]; + lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1]; + } +} diff --git a/src/converters/obsidian/filterHeadingLinks.ts b/src/converters/obsidian/filterHeadingLinks.ts new file mode 100644 index 0000000..0c3e88d --- /dev/null +++ b/src/converters/obsidian/filterHeadingLinks.ts @@ -0,0 +1,48 @@ +import { HeadingUidData } from './VaultContext'; +import { traverseTreeBreadthFirst } from './traverseTreeBreadthFirst'; +import { createTree } from './createTree'; + +//children are sorted like in file, important to detect valid heading links +export type HeadingNode = { uid: string; content: string; children?: HeadingNode[] }; + +export type HeadingData = { uid: string; content: string; level: number }; + +export type HeadingTracker = Map; + +export type HeadingLinks = Map; + +export function filterHeadingLinks( + headingLinks: HeadingLinks, + tracker: HeadingTracker, +): [{ old: string; new: string }[], HeadingUidData[]] { + const missingHeadingLinks = []; + const validHeadingLinks = []; + for (const [fileName, headingUidData] of headingLinks.entries()) { + const potentiallyMatchingNodes = tracker.get(fileName); + if (potentiallyMatchingNodes) { + //we use a dummy because the tree function needs one root node + const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 }; + const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' }; + createTree( + dummyTargetRoot, + dummySourceRoot, + potentiallyMatchingNodes, + (potentialParent, potentialChild) => potentialParent.level < potentialChild.level, + (data) => ({ uid: data.uid, content: data.content, children: undefined }), + ); + const headingTree = dummyTargetRoot.children ?? []; + + for (const data of headingUidData) { + const matchingHeadingNode = traverseTreeBreadthFirst(headingTree, data.link); + if (matchingHeadingNode) { + validHeadingLinks.push({ old: data.uid, new: matchingHeadingNode.uid }); + } else { + missingHeadingLinks.push(data); + } + } + } else { + missingHeadingLinks.push(...headingUidData); + } + } + return [validHeadingLinks, missingHeadingLinks]; +} diff --git a/src/converters/obsidian/tests/filterHeadingLinks.test.ts b/src/converters/obsidian/tests/filterHeadingLinks.test.ts new file mode 100644 index 0000000..ea711fb --- /dev/null +++ b/src/converters/obsidian/tests/filterHeadingLinks.test.ts @@ -0,0 +1,38 @@ +import { expect, test } from '@jest/globals'; +import { filterHeadingLinks, HeadingLinks, HeadingTracker } from '../filterHeadingLinks'; + +test('filterHeadingLinks test', () => { + const headingTracker: HeadingTracker = new Map(); + headingTracker.set('fileName', [ + { uid: '1', level: 1, content: '1' }, + { uid: '2', level: 2, content: '2' }, + { uid: '3', level: 3, content: '3' }, + { uid: '4', level: 3, content: '4' }, + { uid: '1_2', level: 1, content: '1_2' }, + { uid: '4_2', level: 3, content: '4' }, + ]); + headingTracker.set('fileName2', [ + { uid: '3', level: 3, content: '3' }, + { uid: '1', level: 1, content: '1' }, + ]); + headingTracker.set('fileName3', []); //empty is handled fine + const headingLinks: HeadingLinks = new Map(); + headingLinks.set('fileName', [ + { uid: 'OLD_2', link: ['1', '2'] }, + { uid: 'OLD_3', link: ['1', '2', '3'] }, + { uid: 'OLD_4', link: ['4'] }, + { uid: 'DIRECT_3', link: ['3'] }, + { uid: 'INVALID_ORDER', link: ['3', '1'] }, //only exists in the other file + { uid: 'INVALID_SUBTREES', link: ['1', '2', '3', '4'] }, + { uid: 'INVALID_LEVELS', link: ['1', '2', '1_2'] }, + ]); + + const [valid, invalid] = filterHeadingLinks(headingLinks, headingTracker); + expect(valid).toStrictEqual([ + { old: 'OLD_2', new: '2' }, + { old: 'OLD_3', new: '3' }, //same target heading leads to same UID + { old: 'OLD_4', new: '4' }, //first subtree is taken, because logically it is the first heading on the page + { old: 'DIRECT_3', new: '3' }, + ]); + expect(invalid.map((data) => data.uid)).toStrictEqual(['INVALID_ORDER', 'INVALID_SUBTREES', 'INVALID_LEVELS']); +}); diff --git a/src/converters/obsidian/tests/traverseTreeBreadthFirst.test.ts b/src/converters/obsidian/tests/traverseTreeBreadthFirst.test.ts new file mode 100644 index 0000000..567bb16 --- /dev/null +++ b/src/converters/obsidian/tests/traverseTreeBreadthFirst.test.ts @@ -0,0 +1,155 @@ +import { expect, test } from '@jest/globals'; +import { HeadingNode } from '../filterHeadingLinks'; +import { traverseTreeBreadthFirst } from '../traverseTreeBreadthFirst'; + +test('traverseTreeBreadthFirst test', () => { + //sinlge heading works + const singleNode = { + uid: '1', + content: '1', + }; + expect(traverseTreeBreadthFirst([singleNode], ['1'])).toBe(singleNode); + + //simple 1-2 headings work + let targetNode: HeadingNode = { + uid: '2', + content: '2', + }; + let tree: HeadingNode = { + uid: '1', + content: '1', + children: [targetNode], + }; + expect(traverseTreeBreadthFirst([tree], ['1', '2'])).toBe(targetNode); + expect(traverseTreeBreadthFirst([tree], ['1', '2', '3'])).toBe(null); + expect(traverseTreeBreadthFirst([tree], ['2', '1'])).toBe(null); + + //skipping a node works + targetNode = { + uid: '3', + content: '3', + }; + tree = { + uid: '1', + content: '1', + children: [{ uid: '2', content: '2', children: [targetNode] }], + }; + expect(traverseTreeBreadthFirst([tree], ['1', '3'])).toBe(targetNode); + + //parallel node with same content but not first in array works + targetNode = { + uid: '3', + content: '3', + }; + tree = { + uid: '1', + content: '1', + children: [{ uid: '2', content: '2', children: [targetNode, { uid: 'NOT_THIS', content: '3' }] }], + }; + expect(traverseTreeBreadthFirst([tree], ['1', '3'])).toBe(targetNode); + + //parallel node with same partial part but in different subtree works + targetNode = { + uid: '4', + content: '4', + }; + tree = { + uid: '1', + content: '1', + children: [ + //the first child will be preferred + { + uid: '2', + content: '2', + children: [ + { + uid: '3', + content: '3', + children: [targetNode], + }, + ], + }, + { + uid: 'NOT_THIS', + content: 'NOT_2', + children: [ + { + uid: 'NOT_3', + content: '3', + children: [ + { + uid: 'NOT_4', + content: '4', + }, + ], + }, + ], + }, + ], + }; + expect(traverseTreeBreadthFirst([tree], ['1', '3', '4'])).toBe(targetNode); + + //similar path that is one level higher is prefered (1-2-3-4 vs 1-3-4) + targetNode = { + uid: 'REAL_4', + content: '4', + }; + tree = { + uid: '1', + content: '1', + children: [ + { + uid: '2', + content: '2', + children: [ + { + uid: '3', + content: '3', + children: [ + { + uid: '4', + content: '4', + }, + ], + }, + ], + }, + { + uid: 'REAL_3', + content: '3', + children: [targetNode], + }, + ], + }; + expect(traverseTreeBreadthFirst([tree], ['1', '3', '4'])).toBe(targetNode); + + //skipping levels multiple times works + targetNode = { + uid: '5', + content: '5', + }; + tree = { + uid: '1', + content: '1', + children: [ + { + uid: '2', + content: '2', + children: [ + { + uid: '3', + content: '3', + children: [ + { + uid: '4', + content: '4', + children: [targetNode], + }, + ], + }, + ], + }, + ], + }; + expect(traverseTreeBreadthFirst([tree], ['1', '3', '5'])).toBe(targetNode); +}); diff --git a/src/converters/obsidian/traverseTreeBreadthFirst.ts b/src/converters/obsidian/traverseTreeBreadthFirst.ts new file mode 100644 index 0000000..ae32d6c --- /dev/null +++ b/src/converters/obsidian/traverseTreeBreadthFirst.ts @@ -0,0 +1,35 @@ +/** + * Traverses the given tree by following the content-path. Supports skipping levels in the path. + */ +export function traverseTreeBreadthFirst( + nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples + contentPath: string[], +) { + for (const node of nodes) { + if (node.content === contentPath[0]) { + return bfsHelper(node, contentPath.slice(1)); + } + } + for (const node of nodes) { + const foundNode = bfsHelper(node, contentPath.slice()); + if (foundNode) { + return foundNode; + } + } + return null; +} + +function bfsHelper( + node: Node, + contentPath: string[], +): Node | null { + if (contentPath.length === 0) { + return node; + } + + if (node.children) { + return traverseTreeBreadthFirst(node.children, contentPath.slice()); + } + + return null; +} diff --git a/src/converters/obsidian/vault.ts b/src/converters/obsidian/vault.ts index 18cfd22..36418bf 100644 --- a/src/converters/obsidian/vault.ts +++ b/src/converters/obsidian/vault.ts @@ -1,6 +1,7 @@ import { appendFileSync, Dirent, readdirSync, readFileSync } from 'fs'; import path, { resolve } from 'path'; import { convertObsidianFile } from './convertObsidianFile'; +import { HeadingTracker } from './filterHeadingLinks'; import { VaultContext } from './VaultContext'; enum ChildrenPosition { @@ -68,13 +69,19 @@ export function addParentNodeEnd(targetPath: string) { }; } -export function addFileNode(targetPath: string, today: number, vaultContext: VaultContext) { +export function addFileNode( + targetPath: string, + today: number, + vaultContext: VaultContext, + headingTracker: HeadingTracker, +) { return (file: string, childrenPosition: ChildrenPosition) => { const fileNode = convertObsidianFile( path.basename(file).replace('.md', ''), readFileSync(file, 'utf-8'), vaultContext, today, + headingTracker, ); appendFileSync(targetPath, JSON.stringify(fileNode, null, 2)); if (childrenPosition !== ChildrenPosition.LAST) { From 01c526f08fb29605327e87fd20f0f7ee65be9c2f Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sun, 9 Oct 2022 00:44:20 +0200 Subject: [PATCH 19/94] fix missing function --- src/converters/obsidian/ObsidianVaultConverter.ts | 8 ++++---- src/converters/obsidian/convertMarkdownNode.ts | 1 - .../obsidian/tests/ObsidianVaultConverter.test.ts | 5 +++-- src/runner.ts | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index 4709aea..72ba11f 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -1,8 +1,8 @@ -import { appendFileSync, unlinkSync } from 'fs'; +import { appendFileSync, readFileSync, unlinkSync } from 'fs'; import path from 'path'; import { createUnlinkedTanaNodes } from './createUnlinkedTanaNodes'; import { HeadingTracker } from './filterHeadingLinks'; -import { postProcessTIFFIle } from './postProcessTIFFile'; +// import { postProcessTIFFIle } from './postProcessTIFFile'; import { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './vault'; import { VaultContext } from './VaultContext'; @@ -10,7 +10,7 @@ import { VaultContext } from './VaultContext'; * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults. * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly. */ -export function ObsidianVaultConverter( +export async function ObsidianVaultConverter( vaultPath: string, today: number = Date.now(), vaultContext: VaultContext = new VaultContext(), @@ -46,7 +46,7 @@ export function ObsidianVaultConverter( appendFileSync(targetPath, '\n ],\n "summary": \n' + JSON.stringify(vaultContext.summary, null, 2) + '\n}'); - postProcessTIFFIle(targetPath, vaultContext, headingTracker); + // await postProcessTIFFIle(targetPath, vaultContext, headingTracker); return vaultContext.summary; } diff --git a/src/converters/obsidian/convertMarkdownNode.ts b/src/converters/obsidian/convertMarkdownNode.ts index f76563d..2f74828 100644 --- a/src/converters/obsidian/convertMarkdownNode.ts +++ b/src/converters/obsidian/convertMarkdownNode.ts @@ -22,7 +22,6 @@ export function convertMarkdownNode( //TODO: aliases //TODO: convert to different node types, remove markdown formatting etc. - const n = tanaNode.name; tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim(); // links with alias tanaNode.name = tanaNode.name.replace(/\[\[([^|]+)\|([^\]]+)\]\]/g, '[$1]([[$2]])'); diff --git a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts index 383b95b..bb54fa9 100644 --- a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts +++ b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts @@ -4,10 +4,11 @@ import { ObsidianVaultConverter } from '../ObsidianVaultConverter'; import { VaultContext } from '../VaultContext'; import { deterministicGenerator } from './testUtils'; -test('obsidian vault converter', () => { +test('obsidian vault converter', async () => { const vaultContext = new VaultContext(deterministicGenerator()); - ObsidianVaultConverter('./src/converters/obsidian/tests/fixtures/vault', 1, vaultContext); + await ObsidianVaultConverter('./src/converters/obsidian/tests/fixtures/vault', 1, vaultContext); const result = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/vault.tif.json', 'utf-8')); + // console.log(JSON.stringify(result)); unlinkSync('./src/converters/obsidian/tests/fixtures/vault.tif.json'); const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/full.tif.json', 'utf-8')); expect(result).toStrictEqual(expected); diff --git a/src/runner.ts b/src/runner.ts index 272556e..523bcc0 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -65,12 +65,12 @@ function handleSingleFileConversion() { saveFile(file, tanaIntermediteFile); } -function handleFolderConversion() { +async function handleFolderConversion() { console.log(`\n\nReading folder: ${file} for import as: ${fileType}`); let summary; switch (fileType) { case 'obsidian': - summary = ObsidianVaultConverter(file); + summary = await ObsidianVaultConverter(file); break; default: console.log(`File type ${fileType} is not supported for folders`); From 351fff38c6c2f0c67ac4b74d24584fdcd814b03d Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sun, 9 Oct 2022 01:38:13 +0200 Subject: [PATCH 20/94] support for Obsidian heading link conversion --- .../obsidian/ObsidianSingleFileConverter.ts | 6 ++ .../obsidian/ObsidianVaultConverter.ts | 8 ++- src/converters/obsidian/VaultContext.ts | 13 ++-- src/converters/obsidian/postProcessTIFFile.ts | 35 ++++++++++ .../tests/ObsidianSingleFileConverter.test.ts | 1 + .../convertMarkdownNodeToTanaNode.test.ts | 2 +- .../obsidian/tests/fixtures/full.tif.json | 65 ++++++++++--------- .../obsidian/tests/fixtures/single.tif.json | 24 +++---- .../tests/fixtures/vault/folder/test2.md | 2 +- .../obsidian/tests/fixtures/vault/test.md | 2 +- 10 files changed, 103 insertions(+), 55 deletions(-) create mode 100644 src/converters/obsidian/postProcessTIFFile.ts diff --git a/src/converters/obsidian/ObsidianSingleFileConverter.ts b/src/converters/obsidian/ObsidianSingleFileConverter.ts index 8ab81a9..73af3bb 100644 --- a/src/converters/obsidian/ObsidianSingleFileConverter.ts +++ b/src/converters/obsidian/ObsidianSingleFileConverter.ts @@ -16,6 +16,12 @@ export function ObsidianSingleFileConverter( vaultContext.summary.leafNodes--; vaultContext.summary.topLevelNodes++; + //by definition all heading links to other files are invalid because we only process one file + //TODO: support for same file-links + const missingHeadingLinks = Array.from(vaultContext.headingLinkTracker.entries()) + .filter((entry) => entry[0] !== fileName)?.[0]?.[1] + .map((headingLink) => ({ uid: headingLink.uid, link: headingLink.link.join('#') })); + vaultContext.addInvalidLinks(missingHeadingLinks); const collectedUnlinkedNodes = createUnlinkedTanaNodes(importName, today, vaultContext); const nodes = [node]; if (collectedUnlinkedNodes) { diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index 72ba11f..6b2d136 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -2,7 +2,7 @@ import { appendFileSync, readFileSync, unlinkSync } from 'fs'; import path from 'path'; import { createUnlinkedTanaNodes } from './createUnlinkedTanaNodes'; import { HeadingTracker } from './filterHeadingLinks'; -// import { postProcessTIFFIle } from './postProcessTIFFile'; +import { postProcessTIFFIle } from './postProcessTIFFile'; import { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './vault'; import { VaultContext } from './VaultContext'; @@ -39,6 +39,10 @@ export async function ObsidianVaultConverter( vaultContext.summary.leafNodes--; vaultContext.summary.topLevelNodes++; + //post processing can be done before unlinked (it will add unlinked headings) + //because the unlinked summary nodes are just created by the converter and have no connection to the rest + await postProcessTIFFIle(targetPath, vaultContext, headingTracker); + const collectedUnlinkedNodes = createUnlinkedTanaNodes(path.basename(vaultPath), today, vaultContext); if (collectedUnlinkedNodes) { appendFileSync(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2)); @@ -46,7 +50,5 @@ export async function ObsidianVaultConverter( appendFileSync(targetPath, '\n ],\n "summary": \n' + JSON.stringify(vaultContext.summary, null, 2) + '\n}'); - // await postProcessTIFFIle(targetPath, vaultContext, headingTracker); - return vaultContext.summary; } diff --git a/src/converters/obsidian/VaultContext.ts b/src/converters/obsidian/VaultContext.ts index 5e7ae8e..ca9609e 100644 --- a/src/converters/obsidian/VaultContext.ts +++ b/src/converters/obsidian/VaultContext.ts @@ -50,10 +50,6 @@ function detectLinkType(link: string[]) { return LinkType.DEFAULT; } -//this is used for easier replacing the Heading Link UIDs in the post processing -//whoever uses this string in his text will be disregarded -export const HEADING_LINK_PREFIX = '$$!HEADING_LINK!$$'; - export function extractBlockId(content: string): [string, string | undefined] { let id; @@ -172,9 +168,9 @@ export class VaultContext { const fileName = link[0]; const fileHeadingData = this.headingLinkTracker.get(fileName) ?? []; this.headingLinkTracker.set(fileName, fileHeadingData); - //TODO: //these "uids" are replaced and counted later - const uid = HEADING_LINK_PREFIX + fileHeadingData.length; + //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end + const uid = this.idGenerator(); fileHeadingData.push({ uid, link: link.slice(1) }); return uid; } @@ -209,7 +205,10 @@ export class VaultContext { } addInvalidLinks(links: { uid: string; link: string }[]) { - this.invalidLinks.push(...links); + links.forEach((link) => { + this.invalidLinks.push(link); + this.incrementSummary(); + }); } getAllInvalidContentLinks() { diff --git a/src/converters/obsidian/postProcessTIFFile.ts b/src/converters/obsidian/postProcessTIFFile.ts new file mode 100644 index 0000000..bef03b7 --- /dev/null +++ b/src/converters/obsidian/postProcessTIFFile.ts @@ -0,0 +1,35 @@ +import { VaultContext } from './VaultContext'; +import * as readline from 'node:readline/promises'; +import { appendFileSync, createReadStream, renameSync, unlinkSync } from 'node:fs'; +import { filterHeadingLinks, HeadingTracker } from './filterHeadingLinks'; + +/** + * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases. + * E.g. heading#heading2#heading5 is valid. + * + * We replace the dummy heading link UIDs with the actual ones from where we found the heading. + */ +export async function postProcessTIFFIle(filePath: string, context: VaultContext, tracker: HeadingTracker) { + const [validHeadingLinks, missingHeadingLinks] = filterHeadingLinks(context.headingLinkTracker, tracker); + context.addInvalidLinks( + missingHeadingLinks.map((headingLink) => ({ uid: headingLink.uid, link: headingLink.link.join('#') })), + ); + + const tempPath = filePath + '_TEMP'; + //the converter is build to append to the file, so we dont want to load the whole file into memory at the end, that would be counter to the whole idea + const readStream = createReadStream(filePath, 'utf-8'); + const readlineInterface = readline.createInterface(readStream); + const regexes = validHeadingLinks.map((link) => ({ + old: new RegExp(link.old, 'g'), + new: link.new, + })); + for await (const line of readlineInterface) { + let updatedLine = line; + regexes.forEach((regEx) => { + updatedLine = updatedLine.replace(regEx.old, regEx.new); + }); + appendFileSync(tempPath, updatedLine); + } + unlinkSync(filePath); + renameSync(tempPath, filePath); +} diff --git a/src/converters/obsidian/tests/ObsidianSingleFileConverter.test.ts b/src/converters/obsidian/tests/ObsidianSingleFileConverter.test.ts index 924ed82..091dac9 100644 --- a/src/converters/obsidian/tests/ObsidianSingleFileConverter.test.ts +++ b/src/converters/obsidian/tests/ObsidianSingleFileConverter.test.ts @@ -12,6 +12,7 @@ test('obsidian file converter', () => { 1, vaultContext, ); + // console.log(JSON.stringify(result)); const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/single.tif.json', 'utf-8')); expect(result).toStrictEqual(expected); }); diff --git a/src/converters/obsidian/tests/convertMarkdownNodeToTanaNode.test.ts b/src/converters/obsidian/tests/convertMarkdownNodeToTanaNode.test.ts index 8d4ed53..4320726 100644 --- a/src/converters/obsidian/tests/convertMarkdownNodeToTanaNode.test.ts +++ b/src/converters/obsidian/tests/convertMarkdownNodeToTanaNode.test.ts @@ -199,7 +199,7 @@ https://some.url/ type: HierarchyType.HEADING, }, { - content: 'Some', + content: 'Invalid Heading [[test2#Heading 2#Heading here]]', level: 0, type: HierarchyType.OUTLINE, }, diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index 4cf8320..6825afd 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -62,43 +62,44 @@ "children": [ { "uid": "12", - "name": "Some", + "name": "Valid Heading [[33]]", "createdAt": 1, "editedAt": 1, "type": "node", + "refs": ["33"], "children": [ { - "uid": "13", - "name": "Node with [[14]] [[15]]", + "uid": "14", + "name": "Node with [[15]] [[16]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["14", "15"] + "refs": ["15", "16"] }, { - "uid": "16", - "name": "Fun with missing block ref [[17]] [[18]]", + "uid": "17", + "name": "Fun with missing block ref [[18]] [[19]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["17", "18"] + "refs": ["18", "19"] } ] }, { - "uid": "19", + "uid": "20", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "20", - "name": "Referencing a block [[21]]", + "uid": "21", + "name": "Referencing a block [[22]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["21"] + "refs": ["22"] } ] } @@ -108,18 +109,18 @@ } ] }, - { "uid": "22", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "23", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, { - "uid": "23", + "uid": "24", "name": "test", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "24", + "uid": "25", "name": "Starting without [[6]].", "createdAt": 1, "editedAt": 1, @@ -127,40 +128,41 @@ "refs": ["6"] }, { - "uid": "25", + "uid": "26", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "26", "name": "[[9]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["9"] }, - { "uid": "27", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "27", "name": "[[9]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["9"] }, + { "uid": "28", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "28", + "uid": "29", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "29", - "name": "Some", + "uid": "30", + "name": "Invalid Heading [[31]]", "createdAt": 1, "editedAt": 1, "type": "node", + "refs": ["31"], "children": [ { - "uid": "21", - "name": "Block with [[14]] [[15]]", + "uid": "22", + "name": "Block with [[15]] [[16]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["14", "15"] + "refs": ["15", "16"] }, - { "uid": "30", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "32", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, - { "uid": "31", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "33", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ] @@ -170,20 +172,21 @@ ] }, { - "uid": "32", + "uid": "34", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { "uid": "6", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "14", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "15", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "18", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "31", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "15", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "16", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "19", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "9", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "17", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "18", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ], - "summary": { "leafNodes": 32, "topLevelNodes": 1, "totalNodes": 33, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } + "summary": { "leafNodes": 33, "topLevelNodes": 1, "totalNodes": 34, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/single.tif.json b/src/converters/obsidian/tests/fixtures/single.tif.json index 3bbee09..a26f74a 100644 --- a/src/converters/obsidian/tests/fixtures/single.tif.json +++ b/src/converters/obsidian/tests/fixtures/single.tif.json @@ -1,9 +1,9 @@ { "version": "TanaIntermediateFile V0.1", "summary": { - "leafNodes": 14, + "leafNodes": 15, "topLevelNodes": 1, - "totalNodes": 15, + "totalNodes": 16, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 @@ -35,23 +35,24 @@ "children": [ { "uid": "8", - "name": "Some", + "name": "Invalid Heading [[9]]", "createdAt": 1, "editedAt": 1, "type": "node", + "refs": ["9"], "children": [ { - "uid": "9", - "name": "Block with [[10]] [[11]]", + "uid": "10", + "name": "Block with [[11]] [[12]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["10", "11"] + "refs": ["11", "12"] }, - { "uid": "12", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "13", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, - { "uid": "13", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "14", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ] @@ -59,15 +60,16 @@ ] }, { - "uid": "14", + "uid": "15", "name": "Missing Nodes for test", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { "uid": "2", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "10", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "11", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "9", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "11", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "12", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "5", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" } ] } diff --git a/src/converters/obsidian/tests/fixtures/vault/folder/test2.md b/src/converters/obsidian/tests/fixtures/vault/folder/test2.md index 10412f6..b375e1c 100644 --- a/src/converters/obsidian/tests/fixtures/vault/folder/test2.md +++ b/src/converters/obsidian/tests/fixtures/vault/folder/test2.md @@ -8,7 +8,7 @@ a newline. ## Heading 2 -- Some +- Valid Heading [[test#Heading 2#Out of Level]] - Node with [[Link]] [[Link2]] - Fun with missing block ref [[test#^MISSING]] [[missing#^MISSING]] diff --git a/src/converters/obsidian/tests/fixtures/vault/test.md b/src/converters/obsidian/tests/fixtures/vault/test.md index a8c121d..5a2aaca 100644 --- a/src/converters/obsidian/tests/fixtures/vault/test.md +++ b/src/converters/obsidian/tests/fixtures/vault/test.md @@ -8,7 +8,7 @@ a newline. ## Heading 2 -- Some +- Invalid Heading [[test2#Heading 2#Heading here]] - Block with [[Link]] [[Link2]] ^BLOCK_UID - Fun From 079d6d912c2966d04da2e6571fb97942650c5af2 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sun, 9 Oct 2022 10:17:45 +0200 Subject: [PATCH 21/94] add readline types --- package-lock.json | 11688 ++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- yarn.lock | 1016 ++-- 3 files changed, 12197 insertions(+), 509 deletions(-) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..f2ddde9 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,11688 @@ +{ + "name": "tana-import-tools", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "tana-import-tools", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "opml": "^0.4.24" + }, + "devDependencies": { + "@babel/preset-env": "^7.18.6", + "@babel/preset-typescript": "^7.18.6", + "@jest/globals": "^28.1.2", + "@types/jest": "^28.1.4", + "@types/node": "^18.8.3", + "@typescript-eslint/eslint-plugin": "^5.32.0", + "@typescript-eslint/parser": "^5.32.0", + "eslint": "^8.21.0", + "jest": "^28.1.2", + "prettier": "^2.7.1", + "typescript": "^4.7.4" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@ampproject/remapping/node_modules/@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.6.tgz", + "integrity": "sha512-tzulrgDT0QD6U7BJ4TKVk2SDDg7wlP39P9yAx1RfLy7vP/7rsDRlWVfbWxElslu56+r7QOhB2NSDsabYYruoZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.6.tgz", + "integrity": "sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.18.6", + "@babel/helper-compilation-targets": "^7.18.6", + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helpers": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/template": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.18.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.7.tgz", + "integrity": "sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.18.7", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.6.tgz", + "integrity": "sha512-KT10c1oWEpmrIRYnthbzHgoOf6B+Xd6a5yhdbNtdhtG7aO1or5HViuf1TQR36xY/QprXA5nvxO6nAjhJ4y38jw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-explode-assignable-expression": "^7.18.6", + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz", + "integrity": "sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.18.6", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.20.2", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.6.tgz", + "integrity": "sha512-YfDzdnoxHGV8CzqHGyCbFvXg5QESPFkXlHtvdCkesLjjVMT2Adxe4FGUR5ChIb3DxSaXO12iIOCWoXdsUVwnqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-function-name": "^7.18.6", + "@babel/helper-member-expression-to-functions": "^7.18.6", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz", + "integrity": "sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "regexpu-core": "^5.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz", + "integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-compilation-targets": "^7.13.0", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/traverse": "^7.13.0", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0-0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz", + "integrity": "sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-explode-assignable-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", + "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz", + "integrity": "sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.18.6", + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.6.tgz", + "integrity": "sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.6.tgz", + "integrity": "sha512-L//phhB4al5uucwzlimruukHB3jRd5JGClwRMD/ROrVjXfLqovYnvQrK/JK36WYyVwGGO7OD3kMyVTjx+WVPhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", + "@babel/template": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", + "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz", + "integrity": "sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.6.tgz", + "integrity": "sha512-z5wbmV55TveUPZlCLZvxWHtrjuJd+8inFhk7DG0WW87/oJuGDcjDiu7HIvGcpf5464L6xKCg3vNkmlVVz9hwyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-wrap-function": "^7.18.6", + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.18.6.tgz", + "integrity": "sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-member-expression-to-functions": "^7.18.6", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", + "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.6.tgz", + "integrity": "sha512-4KoLhwGS9vGethZpAhYnMejWkX64wsnHPDwvOsKWU6Fg4+AlK2Jz3TyjQLMEPvz+1zemi/WBdkYxCD0bAfIkiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", + "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.18.6.tgz", + "integrity": "sha512-I5/LZfozwMNbwr/b1vhhuYD+J/mU+gfGAj5td7l5Rv9WYmH6i3Om69WGKNmlIpsVW/mF6O5bvTKbvDQZVgjqOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-function-name": "^7.18.6", + "@babel/template": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.6.tgz", + "integrity": "sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.6.tgz", + "integrity": "sha512-uQVSa9jJUe/G/304lXspfWVpKpK4euFLgGiMQFOCpM/bgcAdeoHwi/OQz23O9GK2osz26ZiXRRV9aV+Yl1O8tw==", + "dev": true, + "license": "MIT", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", + "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.6.tgz", + "integrity": "sha512-Udgu8ZRgrBrttVz6A0EVL0SJ1z+RLbIeqsu632SA1hf0awEppD6TvdznoH+orIF8wtFFAV/Enmw9Y+9oV8TQcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" + } + }, + "node_modules/@babel/plugin-proposal-async-generator-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.6.tgz", + "integrity": "sha512-WAz4R9bvozx4qwf74M+sfqPMKfSqwM0phxPTR6iJIi8robgzXwkEgmeJG1gEKhm6sDqT/U9aV3lfcqybIpev8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-remap-async-to-generator": "^7.18.6", + "@babel/plugin-syntax-async-generators": "^7.8.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", + "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-static-block": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", + "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-proposal-dynamic-import": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", + "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-export-namespace-from": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.6.tgz", + "integrity": "sha512-zr/QcUlUo7GPo6+X1wC98NJADqmy5QTFWWhqeQWiki4XHafJtLl/YMGkmRB2szDD2IYJCCdBTd4ElwhId9T7Xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-json-strings": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", + "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-json-strings": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.6.tgz", + "integrity": "sha512-zMo66azZth/0tVd7gmkxOkOjs2rpHyhpcFo565PUP37hSp6hSd9uUKIfTDFMz58BwqgQKhJ9YxtM5XddjXVn+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", + "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-numeric-separator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", + "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.6.tgz", + "integrity": "sha512-9yuM6wr4rIsKa1wlUAbZEazkCrgw2sMPEXCr4Rnwetu7cEW1NydkCWytLuYletbf8vFxdJxFhwEZqMpOx2eZyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.18.6", + "@babel/helper-compilation-targets": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-catch-binding": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", + "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-chaining": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.6.tgz", + "integrity": "sha512-PatI6elL5eMzoypFAiYDpYQyMtXTn+iMhuxxQt5mAXD4fEmKorpSI3PHd+i3JXBJN3xyA6MvJv7at23HffFHwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-methods": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", + "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", + "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-unicode-property-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz", + "integrity": "sha512-/DU3RXad9+bZwrgWJQKbr39gYbJpLJHezqEzRzi/BHRlJ9zsQb4CK2CA/5apllXNomwA1qHwzvHl+AdEmC5krQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", + "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz", + "integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz", + "integrity": "sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-remap-async-to-generator": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", + "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.6.tgz", + "integrity": "sha512-pRqwb91C42vs1ahSAWJkxOxU1RHWDn16XAa6ggQ72wjLlWyYeAcLvTtE0aM8ph3KNydy9CQF2nLYcjq1WysgxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.6.tgz", + "integrity": "sha512-XTg8XW/mKpzAF3actL554Jl/dOYoJtv3l8fxaEczpgz84IeeVf+T1u2CSvPHuZbt0w3JkIx4rdn/MRQI7mo0HQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-function-name": "^7.18.6", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.6.tgz", + "integrity": "sha512-9repI4BhNrR0KenoR9vm3/cIc1tSBIo+u1WVjKCAynahj25O8zfbiE6JtAtHPGQSs4yZ+bA8mRasRP+qc+2R5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.6.tgz", + "integrity": "sha512-tgy3u6lRp17ilY8r1kP4i2+HDUwxlVqq3RTc943eAWSzGgpU1qhiKpqZ5CMyHReIYPHdo3Kg8v8edKtDqSVEyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", + "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.6.tgz", + "integrity": "sha512-NJU26U/208+sxYszf82nmGYqVF9QN8py2HFTblPT9hbawi8+1C5a9JubODLTGFuT0qlkqVinmkwOD13s0sZktg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", + "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.6.tgz", + "integrity": "sha512-WAjoMf4wIiSsy88KmG7tgj2nFdEK7E46tArVtcgED7Bkj6Fg/tG5SbvNIOKxbFS2VFgNh6+iaPswBeQZm4ox8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.6.tgz", + "integrity": "sha512-kJha/Gbs5RjzIu0CxZwf5e3aTTSlhZnHMT8zPWnJMjNpLOUgqevg+PN5oMH68nMCXnfiMo4Bhgxqj59KHTlAnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-compilation-targets": "^7.18.6", + "@babel/helper-function-name": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.6.tgz", + "integrity": "sha512-x3HEw0cJZVDoENXOp20HlypIHfl0zMIhMVZEBVTfmqbObIpsMxMbmU5nOEO8R7LYT+z5RORKPlTI5Hj4OsO9/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", + "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz", + "integrity": "sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz", + "integrity": "sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.6.tgz", + "integrity": "sha512-UbPYpXxLjTw6w6yXX2BYNxF3p6QY225wcTkfQCy3OMnSlS/C3xGtwUjEzGkldb/sy6PWLiCQ3NbYfjWUTI3t4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", + "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz", + "integrity": "sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", + "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", + "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.6.tgz", + "integrity": "sha512-FjdqgMv37yVl/gwvzkcB+wfjRI8HQmc5EgOG9iGNvUY1ok+TjsoaMP7IqCDZBhkFcM5f3OPVMs6Dmp03C5k4/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", + "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", + "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "regenerator-transform": "^0.15.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", + "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", + "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-spread": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.6.tgz", + "integrity": "sha512-ayT53rT/ENF8WWexIRg9AiV9h0aIteyWn5ptfZTZQrjk/+f3WdrJGCY4c9wcgl2+MKkKPhzbYp97FTsquZpDCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", + "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.6.tgz", + "integrity": "sha512-UuqlRrQmT2SWRvahW46cGSany0uTlcj8NYOS5sRGYi8FxPYPoLd5DDmMd32ZXEj2Jq+06uGVQKHxa/hJx2EzKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.6.tgz", + "integrity": "sha512-7m71iS/QhsPk85xSjFPovHPcH3H9qeyzsujhTc+vcdnsXavoWYJ74zx0lP5RhpC5+iDnVLO+PPMHzC11qels1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typescript": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.6.tgz", + "integrity": "sha512-ijHNhzIrLj5lQCnI6aaNVRtGVuUZhOXFLRVFs7lLrkXTHip4FKty5oAuQdk4tywG0/WjXmjTfQCWmuzrvFer1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-typescript": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.6.tgz", + "integrity": "sha512-XNRwQUXYMP7VLuy54cr/KS/WeL3AZeORhrmeZ7iewgu+X2eBqmpaLI/hzqr9ZxCeUoq0ASK4GUzSM0BDhZkLFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", + "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.6.tgz", + "integrity": "sha512-WrthhuIIYKrEFAwttYzgRNQ5hULGmwTj+D6l7Zdfsv5M7IWV/OZbUfbeL++Qrzx1nVJwWROIFhCHRYQV4xbPNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.18.6", + "@babel/helper-compilation-targets": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.6", + "@babel/plugin-proposal-async-generator-functions": "^7.18.6", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-class-static-block": "^7.18.6", + "@babel/plugin-proposal-dynamic-import": "^7.18.6", + "@babel/plugin-proposal-export-namespace-from": "^7.18.6", + "@babel/plugin-proposal-json-strings": "^7.18.6", + "@babel/plugin-proposal-logical-assignment-operators": "^7.18.6", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", + "@babel/plugin-proposal-numeric-separator": "^7.18.6", + "@babel/plugin-proposal-object-rest-spread": "^7.18.6", + "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.6", + "@babel/plugin-proposal-private-methods": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.18.6", + "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.18.6", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.18.6", + "@babel/plugin-transform-async-to-generator": "^7.18.6", + "@babel/plugin-transform-block-scoped-functions": "^7.18.6", + "@babel/plugin-transform-block-scoping": "^7.18.6", + "@babel/plugin-transform-classes": "^7.18.6", + "@babel/plugin-transform-computed-properties": "^7.18.6", + "@babel/plugin-transform-destructuring": "^7.18.6", + "@babel/plugin-transform-dotall-regex": "^7.18.6", + "@babel/plugin-transform-duplicate-keys": "^7.18.6", + "@babel/plugin-transform-exponentiation-operator": "^7.18.6", + "@babel/plugin-transform-for-of": "^7.18.6", + "@babel/plugin-transform-function-name": "^7.18.6", + "@babel/plugin-transform-literals": "^7.18.6", + "@babel/plugin-transform-member-expression-literals": "^7.18.6", + "@babel/plugin-transform-modules-amd": "^7.18.6", + "@babel/plugin-transform-modules-commonjs": "^7.18.6", + "@babel/plugin-transform-modules-systemjs": "^7.18.6", + "@babel/plugin-transform-modules-umd": "^7.18.6", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.18.6", + "@babel/plugin-transform-new-target": "^7.18.6", + "@babel/plugin-transform-object-super": "^7.18.6", + "@babel/plugin-transform-parameters": "^7.18.6", + "@babel/plugin-transform-property-literals": "^7.18.6", + "@babel/plugin-transform-regenerator": "^7.18.6", + "@babel/plugin-transform-reserved-words": "^7.18.6", + "@babel/plugin-transform-shorthand-properties": "^7.18.6", + "@babel/plugin-transform-spread": "^7.18.6", + "@babel/plugin-transform-sticky-regex": "^7.18.6", + "@babel/plugin-transform-template-literals": "^7.18.6", + "@babel/plugin-transform-typeof-symbol": "^7.18.6", + "@babel/plugin-transform-unicode-escapes": "^7.18.6", + "@babel/plugin-transform-unicode-regex": "^7.18.6", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.18.6", + "babel-plugin-polyfill-corejs2": "^0.3.1", + "babel-plugin-polyfill-corejs3": "^0.5.2", + "babel-plugin-polyfill-regenerator": "^0.3.1", + "core-js-compat": "^3.22.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-typescript": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz", + "integrity": "sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-transform-typescript": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.6.tgz", + "integrity": "sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz", + "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.6.tgz", + "integrity": "sha512-zS/OKyqmD7lslOtFqbscH6gMLFYOfG1YPqCKfAW5KrTeolKqvB8UelR49Fpr6y93kYkW2Ik00mT1LOGiAGvizw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-function-name": "^7.18.6", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/types": "^7.18.6", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.18.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.7.tgz", + "integrity": "sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.18.6", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@eslint/eslintrc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", + "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.3.2", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", + "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/gitignore-to-minimatch": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", + "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true, + "license": "Apache-2.0", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.1.tgz", + "integrity": "sha512-0RiUocPVFEm3WRMOStIHbRWllG6iW6E3/gUPnf4lkrVFyXIIDeCe+vlKeYyFOMhB2EPE6FLFCNADSOOQMaqvyA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^28.1.1", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^28.1.1", + "jest-util": "^28.1.1", + "slash": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/core": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.2.tgz", + "integrity": "sha512-Xo4E+Sb/nZODMGOPt2G3cMmCBqL4/W2Ijwr7/mrXlq4jdJwcFQ/9KrrJZT2adQRk2otVBXXOz1GRQ4Z5iOgvRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^28.1.1", + "@jest/reporters": "^28.1.2", + "@jest/test-result": "^28.1.1", + "@jest/transform": "^28.1.2", + "@jest/types": "^28.1.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^28.0.2", + "jest-config": "^28.1.2", + "jest-haste-map": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.1", + "jest-resolve-dependencies": "^28.1.2", + "jest-runner": "^28.1.2", + "jest-runtime": "^28.1.2", + "jest-snapshot": "^28.1.2", + "jest-util": "^28.1.1", + "jest-validate": "^28.1.1", + "jest-watcher": "^28.1.1", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.1", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.2.tgz", + "integrity": "sha512-I0CR1RUMmOzd0tRpz10oUfaChBWs+/Hrvn5xYhMEF/ZqrDaaeHwS8yDBqEWCrEnkH2g+WE/6g90oBv3nKpcm8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^28.1.2", + "@jest/types": "^28.1.1", + "@types/node": "*", + "jest-mock": "^28.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.2.tgz", + "integrity": "sha512-HBzyZBeFBiOelNbBKN0pilWbbrGvwDUwAqMC46NVJmWm8AVkuE58NbG1s7DR4cxFt4U5cVLxofAoHxgvC5MyOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^28.1.1", + "jest-snapshot": "^28.1.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.1.tgz", + "integrity": "sha512-n/ghlvdhCdMI/hTcnn4qV57kQuV9OTsZzH1TTCVARANKhl6hXJqLKUkwX69ftMGpsbpt96SsDD8n8LD2d9+FRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^28.0.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.2.tgz", + "integrity": "sha512-xSYEI7Y0D5FbZN2LsCUj/EKRR1zfQYmGuAUVh6xTqhx7V5JhjgMcK5Pa0iR6WIk0GXiHDe0Ke4A+yERKE9saqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^28.1.1", + "@sinonjs/fake-timers": "^9.1.2", + "@types/node": "*", + "jest-message-util": "^28.1.1", + "jest-mock": "^28.1.1", + "jest-util": "^28.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.2.tgz", + "integrity": "sha512-cz0lkJVDOtDaYhvT3Fv2U1B6FtBnV+OpEyJCzTHM1fdoTsU4QNLAt/H4RkiwEUU+dL4g/MFsoTuHeT2pvbo4Hg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^28.1.2", + "@jest/expect": "^28.1.2", + "@jest/types": "^28.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.2.tgz", + "integrity": "sha512-/whGLhiwAqeCTmQEouSigUZJPVl7sW8V26EiboImL+UyXznnr1a03/YZ2BX8OlFw0n+Zlwu+EZAITZtaeRTxyA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^28.1.1", + "@jest/test-result": "^28.1.1", + "@jest/transform": "^28.1.2", + "@jest/types": "^28.1.1", + "@jridgewell/trace-mapping": "^0.3.13", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^28.1.1", + "jest-util": "^28.1.1", + "jest-worker": "^28.1.1", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/schemas": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.0.2.tgz", + "integrity": "sha512-YVDJZjd4izeTDkij00vHHAymNXQ6WWsdChFRK86qck6Jpr3DCL5W3Is3vslviRlP+bLuMYRLbdp98amMvqudhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.23.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz", + "integrity": "sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.13", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.1.tgz", + "integrity": "sha512-hPmkugBktqL6rRzwWAtp1JtYT4VHwv8OQ+9lE5Gymj6dHzubI/oJHMUpPOt8NrdVWSrz9S7bHjJUmv2ggFoUNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^28.1.1", + "@jest/types": "^28.1.1", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.1.tgz", + "integrity": "sha512-nuL+dNSVMcWB7OOtgb0EGH5AjO4UBCt68SLP08rwmC+iRhyuJWS9MtZ/MpipxFwKAlHFftbMsydXqWre8B0+XA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^28.1.1", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.1", + "slash": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.2.tgz", + "integrity": "sha512-3o+lKF6iweLeJFHBlMJysdaPbpoMmtbHEFsjzSv37HIq/wWt5ijTeO2Yf7MO5yyczCopD507cNwNLeX8Y/CuIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^28.1.1", + "@jridgewell/trace-mapping": "^0.3.13", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.1", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.1", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/types": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.1.tgz", + "integrity": "sha512-vRXVqSg1VhDnB8bWcmvLzmg0Bt9CRKVgHPXqYwvWMX3TvAjeO+nRuK6+VdTKCtWOvYlmkF/HqNAL/z+N3B53Kw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^28.0.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", + "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.23.5.tgz", + "integrity": "sha512-AFBVi/iT4g20DHoujvMH1aEDn8fGJh4xsRGCP6d8RpLPMqsNPvW01Jcn0QysXTsg++/xj25NmJsGyH9xug/wKg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^1.7.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.1.19", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", + "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", + "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.17.1", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.17.1.tgz", + "integrity": "sha512-kVzjari1s2YVi77D3w1yuvohV2idweYXMCDzqBiVNN63TcDWrIlTVOYpqVrvbbyOE/IyzBoTKF0fdnLPEORFxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.3.0" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", + "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "28.1.4", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.4.tgz", + "integrity": "sha512-telv6G5N7zRJiLcI3Rs3o+ipZ28EnE+7EvF0pSrt2pZOMnAVI/f+6/LucDxOvcBcTeTL3JMF744BbVQAVBUQRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-matcher-utils": "^28.0.0", + "pretty-format": "^28.0.0" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "18.8.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.8.3.tgz", + "integrity": "sha512-0os9vz6BpGwxGe9LOhgP/ncvYN5Tx1fNcd2TM3rD/aCGBkysb+ZWpXEocG24h6ZzOi13+VB8HndAQFezsSOw1w==", + "dev": true + }, + "node_modules/@types/prettier": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.6.3.tgz", + "integrity": "sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.32.0.tgz", + "integrity": "sha512-CHLuz5Uz7bHP2WgVlvoZGhf0BvFakBJKAD/43Ty0emn4wXWv5k01ND0C0fHcl/Im8Td2y/7h44E9pca9qAu2ew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "5.32.0", + "@typescript-eslint/type-utils": "5.32.0", + "@typescript-eslint/utils": "5.32.0", + "debug": "^4.3.4", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.2.0", + "regexpp": "^3.2.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.32.0.tgz", + "integrity": "sha512-IxRtsehdGV9GFQ35IGm5oKKR2OGcazUoiNBxhRV160iF9FoyuXxjY+rIqs1gfnd+4eL98OjeGnMpE7RF/NBb3A==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "5.32.0", + "@typescript-eslint/types": "5.32.0", + "@typescript-eslint/typescript-estree": "5.32.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.32.0.tgz", + "integrity": "sha512-KyAE+tUON0D7tNz92p1uetRqVJiiAkeluvwvZOqBmW9z2XApmk5WSMV9FrzOroAcVxJZB3GfUwVKr98Dr/OjOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.32.0", + "@typescript-eslint/visitor-keys": "5.32.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.32.0.tgz", + "integrity": "sha512-0gSsIhFDduBz3QcHJIp3qRCvVYbqzHg8D6bHFsDMrm0rURYDj+skBK2zmYebdCp+4nrd9VWd13egvhYFJj/wZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/utils": "5.32.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.32.0.tgz", + "integrity": "sha512-EBUKs68DOcT/EjGfzywp+f8wG9Zw6gj6BjWu7KV/IYllqKJFPlZlLSYw/PTvVyiRw50t6wVbgv4p9uE2h6sZrQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.32.0.tgz", + "integrity": "sha512-ZVAUkvPk3ITGtCLU5J4atCw9RTxK+SRc6hXqLtllC2sGSeMFWN+YwbiJR9CFrSFJ3w4SJfcWtDwNb/DmUIHdhg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "5.32.0", + "@typescript-eslint/visitor-keys": "5.32.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.32.0.tgz", + "integrity": "sha512-W7lYIAI5Zlc5K082dGR27Fczjb3Q57ECcXefKU/f0ajM5ToM0P+N9NmJWip8GmGu/g6QISNT+K6KYB+iSHjXCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.32.0", + "@typescript-eslint/types": "5.32.0", + "@typescript-eslint/typescript-estree": "5.32.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.32.0.tgz", + "integrity": "sha512-S54xOHZgfThiZ38/ZGTgB2rqx51CMJ5MCfVT2IplK4Q7hgzGfe0nLzLCcenDnc/cSjP568hdeKfeDcBgqNHD/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.32.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "license": "MIT", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "license": "MIT" + }, + "node_modules/babel-jest": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.2.tgz", + "integrity": "sha512-pfmoo6sh4L/+5/G2OOfQrGJgvH7fTa1oChnuYH2G/6gA+JwDvO8PELwvwnofKBMNrQsam0Wy/Rw+QSrBNewq2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "^28.1.2", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^28.1.1", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "object.assign": "^4.1.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.1.tgz", + "integrity": "sha512-NovGCy5Hn25uMJSAU8FaHqzs13cFoOI4lhIujiepssjCKRsAo3TA734RDWSGxuFTsUJXerYOqQQodlxgmtqbzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz", + "integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.3.1", + "semver": "^6.1.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz", + "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.3.1", + "core-js-compat": "^3.21.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz", + "integrity": "sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.3.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.1.tgz", + "integrity": "sha512-FCq9Oud0ReTeWtcneYf/48981aTfXYuB9gbU4rBNNJVBSQ6ssv7E6v/qvbBxtOWwZFXjLZwpg+W3q7J6vhH25g==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "^28.1.1", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "license": "BSD-3-Clause", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.1.tgz", + "integrity": "sha512-Nq8MFCSrnJXSc88yliwlzQe3qNe3VntIjhsArW9IJOEPSHNx23FalwApUVbzAWABLhYJJ7y8AynWI/XM8OdfjQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001359", + "electron-to-chromium": "^1.4.172", + "node-releases": "^2.0.5", + "update-browserslist-db": "^1.0.4" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001363", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001363.tgz", + "integrity": "sha512-HpQhpzTGGPVMnCjIomjt+jvyUu8vNFo3TaDiZ/RcoTrlOq/5+tC8zHdsbgFB6MxmaY+jCpsH09aD80Bb4Ow3Sg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "license": "Apache-2.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz", + "integrity": "sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cjs-module-lexer": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", + "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", + "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/convert-source-map/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/core-js-compat": { + "version": "3.23.3", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.23.3.tgz", + "integrity": "sha512-WSzUs2h2vvmKsacLHNTdpyOC9k43AEhcGoFlVgCY4L7aw98oSBKtPL6vD0/TqZjRWRQYdDSLkzZIni4Crbbiqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "browserslist": "^4.21.0", + "semver": "7.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-js-compat/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/daveutils": { + "version": "0.4.64", + "resolved": "https://registry.npmjs.org/daveutils/-/daveutils-0.4.64.tgz", + "integrity": "sha512-3w41wBnC6t/0ON+MSCk7JvKEzqLkKDMXWLAlPcTVp9YTzXne6MwlgZ2Hgfv3nivIGJ+IhBeC8hD09YdSRciZGw==", + "license": "MIT", + "dependencies": { + "request": "*" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", + "dev": true, + "license": "MIT" + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-properties": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "license": "MIT", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.180", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.180.tgz", + "integrity": "sha512-7at5ash3FD9U5gPa3/wPr6OdiZd/zBjvDZaaHBpcqFOFUhZiWnb7stkqk8xUFL9H9nk7Yok5vCCNK8wyC/+f8A==", + "dev": true, + "license": "ISC" + }, + "node_modules/emittery": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", + "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz", + "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint/eslintrc": "^1.3.0", + "@humanwhocodes/config-array": "^0.10.4", + "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.3", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/globals": { + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/espree": { + "version": "9.3.3", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", + "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.1.tgz", + "integrity": "sha512-/AANEwGL0tWBwzLNOvO0yUdy2D52jVdNXppOqswC49sxMN2cPWsGCQdzuIf9tj6hHoBQzNvx75JUYuQAckPo3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "^28.1.1", + "jest-get-type": "^28.0.2", + "jest-matcher-utils": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-util": "^28.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "license": "MIT" + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "engines": [ + "node >=0.6.0" + ], + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fb-watchman": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", + "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", + "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true, + "license": "MIT" + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "dev": true, + "license": "MIT" + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", + "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true, + "license": "ISC" + }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "license": "ISC", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "license": "MIT", + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-core-module": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "license": "MIT" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", + "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", + "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.2.tgz", + "integrity": "sha512-Tuf05DwLeCh2cfWCQbcz9UxldoDyiR1E9Igaei5khjonKncYdc6LDfynKCEWozK0oLE3GD+xKAo2u8x/0s6GOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^28.1.2", + "@jest/types": "^28.1.1", + "import-local": "^3.0.2", + "jest-cli": "^28.1.2" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.0.2.tgz", + "integrity": "sha512-QX9u+5I2s54ZnGoMEjiM2WeBvJR2J7w/8ZUmH2um/WLAuGAYFQcsVXY9+1YL6k0H/AGUdH8pXUAv6erDqEsvIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "execa": "^5.0.0", + "throat": "^6.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-circus": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.2.tgz", + "integrity": "sha512-E2vdPIJG5/69EMpslFhaA46WkcrN74LI5V/cSJ59L7uS8UNoXbzTxmwhpi9XrIL3zqvMt5T0pl5k2l2u2GwBNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^28.1.2", + "@jest/expect": "^28.1.2", + "@jest/test-result": "^28.1.1", + "@jest/types": "^28.1.1", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^28.1.1", + "jest-matcher-utils": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-runtime": "^28.1.2", + "jest-snapshot": "^28.1.2", + "jest-util": "^28.1.1", + "pretty-format": "^28.1.1", + "slash": "^3.0.0", + "stack-utils": "^2.0.3", + "throat": "^6.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-cli": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.2.tgz", + "integrity": "sha512-l6eoi5Do/IJUXAFL9qRmDiFpBeEJAnjJb1dcd9i/VWfVWbp3mJhuH50dNtX67Ali4Ecvt4eBkWb4hXhPHkAZTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^28.1.2", + "@jest/test-result": "^28.1.1", + "@jest/types": "^28.1.1", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^28.1.2", + "jest-util": "^28.1.1", + "jest-validate": "^28.1.1", + "prompts": "^2.0.1", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.2.tgz", + "integrity": "sha512-g6EfeRqddVbjPVBVY4JWpUY4IvQoFRIZcv4V36QkqzE0IGhEC/VkugFeBMAeUE7PRgC8KJF0yvJNDeQRbamEVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^28.1.1", + "@jest/types": "^28.1.1", + "babel-jest": "^28.1.2", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^28.1.2", + "jest-environment-node": "^28.1.2", + "jest-get-type": "^28.0.2", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.1", + "jest-runner": "^28.1.2", + "jest-util": "^28.1.1", + "jest-validate": "^28.1.1", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^28.1.1", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", + "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^28.1.1", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz", + "integrity": "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-each": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.1.tgz", + "integrity": "sha512-A042rqh17ZvEhRceDMi784ppoXR7MWGDEKTXEZXb4svt0eShMZvijGxzKsx+yIjeE8QYmHPrnHiTSQVhN4nqaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^28.1.1", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.2", + "jest-util": "^28.1.1", + "pretty-format": "^28.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.2.tgz", + "integrity": "sha512-oYsZz9Qw27XKmOgTtnl0jW7VplJkN2oeof+SwAwKFQacq3CLlG9u4kTGuuLWfvu3J7bVutWlrbEQMOCL/jughw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^28.1.2", + "@jest/fake-timers": "^28.1.2", + "@jest/types": "^28.1.1", + "@types/node": "*", + "jest-mock": "^28.1.1", + "jest-util": "^28.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.1.tgz", + "integrity": "sha512-ZrRSE2o3Ezh7sb1KmeLEZRZ4mgufbrMwolcFHNRSjKZhpLa8TdooXOOFlSwoUzlbVs1t0l7upVRW2K7RWGHzbQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^28.1.1", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.1", + "jest-worker": "^28.1.1", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.1.tgz", + "integrity": "sha512-4jvs8V8kLbAaotE+wFR7vfUGf603cwYtFf1/PYEsyX2BAjSzj8hQSVTP6OWzseTl0xL6dyHuKs2JAks7Pfubmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", + "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^28.1.1", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.1.tgz", + "integrity": "sha512-xoDOOT66fLfmTRiqkoLIU7v42mal/SqwDKvfmfiWAdJMSJiU+ozgluO7KbvoAgiwIrrGZsV7viETjc8GNrA/IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^28.1.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.1", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-mock": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.1.tgz", + "integrity": "sha512-bDCb0FjfsmKweAvE09dZT59IMkzgN0fYBH6t5S45NoJfd2DHkS3ySG2K+hucortryhO3fVuXdlxWcbtIuV/Skw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^28.1.1", + "@types/node": "*" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", + "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.1.tgz", + "integrity": "sha512-/d1UbyUkf9nvsgdBildLe6LAD4DalgkgZcKd0nZ8XUGPyA/7fsnaQIlKVnDiuUXv/IeZhPEDrRJubVSulxrShA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.1", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^28.1.1", + "jest-validate": "^28.1.1", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.2.tgz", + "integrity": "sha512-OXw4vbOZuyRTBi3tapWBqdyodU+T33ww5cPZORuTWkg+Y8lmsxQlVu3MWtJh6NMlKRTHQetF96yGPv01Ye7Mbg==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-regex-util": "^28.0.2", + "jest-snapshot": "^28.1.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-runner": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.2.tgz", + "integrity": "sha512-6/k3DlAsAEr5VcptCMdhtRhOoYClZQmxnVMZvZ/quvPGRpN7OBQYPIC32tWSgOnbgqLXNs5RAniC+nkdFZpD4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^28.1.1", + "@jest/environment": "^28.1.2", + "@jest/test-result": "^28.1.1", + "@jest/transform": "^28.1.2", + "@jest/types": "^28.1.1", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "graceful-fs": "^4.2.9", + "jest-docblock": "^28.1.1", + "jest-environment-node": "^28.1.2", + "jest-haste-map": "^28.1.1", + "jest-leak-detector": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-resolve": "^28.1.1", + "jest-runtime": "^28.1.2", + "jest-util": "^28.1.1", + "jest-watcher": "^28.1.1", + "jest-worker": "^28.1.1", + "source-map-support": "0.5.13", + "throat": "^6.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.2.tgz", + "integrity": "sha512-i4w93OsWzLOeMXSi9epmakb2+3z0AchZtUQVF1hesBmcQQy4vtaql5YdVe9KexdJaVRyPDw8DoBR0j3lYsZVYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^28.1.2", + "@jest/fake-timers": "^28.1.2", + "@jest/globals": "^28.1.2", + "@jest/source-map": "^28.1.2", + "@jest/test-result": "^28.1.1", + "@jest/transform": "^28.1.2", + "@jest/types": "^28.1.1", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "execa": "^5.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-mock": "^28.1.1", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.1", + "jest-snapshot": "^28.1.2", + "jest-util": "^28.1.1", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.2.tgz", + "integrity": "sha512-wzrieFttZYfLvrCVRJxX+jwML2YTArOUqFpCoSVy1QUapx+LlV9uLbV/mMEhYj4t7aMeE9aSQFHSvV/oNoDAMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^28.1.1", + "@jest/transform": "^28.1.2", + "@jest/types": "^28.1.1", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^28.1.1", + "graceful-fs": "^4.2.9", + "jest-diff": "^28.1.1", + "jest-get-type": "^28.0.2", + "jest-haste-map": "^28.1.1", + "jest-matcher-utils": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-util": "^28.1.1", + "natural-compare": "^1.4.0", + "pretty-format": "^28.1.1", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-util": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.1.tgz", + "integrity": "sha512-FktOu7ca1DZSyhPAxgxB6hfh2+9zMoJ7aEQA759Z6p45NuO8mWcqujH+UdHlCm/V6JTWwDztM2ITCzU1ijJAfw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^28.1.1", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-validate": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.1.tgz", + "integrity": "sha512-Kpf6gcClqFCIZ4ti5++XemYJWUPCFUW+N2gknn+KgnDf549iLul3cBuKVe1YcWRlaF8tZV8eJCap0eECOEE3Ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^28.1.1", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.2", + "leven": "^3.1.0", + "pretty-format": "^28.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-watcher": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.1.tgz", + "integrity": "sha512-RQIpeZ8EIJMxbQrXpJQYIIlubBnB9imEHsxxE41f54ZwcqWLysL/A0ZcdMirf+XsMn3xfphVQVV4EW0/p7i7Ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^28.1.1", + "@jest/types": "^28.1.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "jest-util": "^28.1.1", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-worker": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.1.tgz", + "integrity": "sha512-Au7slXB08C6h+xbJPp7VIb6U0XX5Kc9uel/WFc6/rcTzGiaVCBRngBExSYuXSLFPULPSYU3cJ3ybS988lNFQhQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "license": "(AFL-2.1 OR BSD-3-Clause)" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "license": "ISC" + }, + "node_modules/json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "license": "MIT", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.5.tgz", + "integrity": "sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/opml": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/opml/-/opml-0.4.24.tgz", + "integrity": "sha512-erqjZzWaSNiu2T3x2aRqNZCGj8d23LbGuk4NSHN0DezVX6DrAzOfa71nm4CstSpK+DGUW15M8JsR2/0jivZR2Q==", + "license": "MIT", + "dependencies": { + "daveutils": "*", + "opmltojs": "*", + "request": "*", + "xml2js": "*" + } + }, + "node_modules/opmltojs": { + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/opmltojs/-/opmltojs-0.4.12.tgz", + "integrity": "sha512-7Up14sOqzrAvSIdbU0PUApIf9cY+olzooaWKo4bfe/gQv6QNy7hmy9+z7OtJhs6wCQmVt4uxTxu4+cteYEdHTg==", + "license": "MIT", + "dependencies": { + "daveutils": "*", + "request": "*", + "xml2js": "*" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-format": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true, + "license": "MIT" + }, + "node_modules/regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true, + "license": "MIT" + }, + "node_modules/regenerate-unicode-properties": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", + "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true, + "license": "MIT" + }, + "node_modules/regenerator-transform": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.0.tgz", + "integrity": "sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.8.4" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/regexpu-core": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.1.0.tgz", + "integrity": "sha512-bb6hk+xWd2PEOkj5It46A16zFMs2mv86Iwpdu94la4S3sJ7C973h2dHpYKwIBGaWSO7cIRJ+UX0IeMaWcO4qwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.0.1", + "regjsgen": "^0.6.0", + "regjsparser": "^0.8.2", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsgen": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", + "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==", + "dev": true, + "license": "MIT" + }, + "node_modules/regjsparser": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", + "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "license": "Apache-2.0", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve.exports": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", + "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "license": "ISC" + }, + "node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "license": "MIT", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stack-utils": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", + "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-hyperlinks": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", + "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT" + }, + "node_modules/throat": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", + "integrity": "sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==", + "dev": true, + "license": "MIT" + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "license": "Unlicense" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", + "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz", + "integrity": "sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true, + "license": "MIT" + }, + "node_modules/v8-to-istanbul": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", + "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/verror/node_modules/extsprintf": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz", + "integrity": "sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==", + "engines": [ + "node >=0.6.0" + ], + "license": "MIT" + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/write-file-atomic": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", + "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" + } + }, + "node_modules/xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "license": "MIT", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "license": "MIT", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/yargs": { + "version": "17.5.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", + "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + }, + "dependencies": { + "@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "dependencies": { + "@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + } + } + }, + "@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dev": true, + "requires": { + "@babel/highlight": "^7.18.6" + } + }, + "@babel/compat-data": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.6.tgz", + "integrity": "sha512-tzulrgDT0QD6U7BJ4TKVk2SDDg7wlP39P9yAx1RfLy7vP/7rsDRlWVfbWxElslu56+r7QOhB2NSDsabYYruoZQ==", + "dev": true + }, + "@babel/core": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.6.tgz", + "integrity": "sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.18.6", + "@babel/helper-compilation-targets": "^7.18.6", + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helpers": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/template": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + } + }, + "@babel/generator": { + "version": "7.18.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.7.tgz", + "integrity": "sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A==", + "dev": true, + "requires": { + "@babel/types": "^7.18.7", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.6.tgz", + "integrity": "sha512-KT10c1oWEpmrIRYnthbzHgoOf6B+Xd6a5yhdbNtdhtG7aO1or5HViuf1TQR36xY/QprXA5nvxO6nAjhJ4y38jw==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.18.6", + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz", + "integrity": "sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.18.6", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.20.2", + "semver": "^6.3.0" + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.6.tgz", + "integrity": "sha512-YfDzdnoxHGV8CzqHGyCbFvXg5QESPFkXlHtvdCkesLjjVMT2Adxe4FGUR5ChIb3DxSaXO12iIOCWoXdsUVwnqw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-function-name": "^7.18.6", + "@babel/helper-member-expression-to-functions": "^7.18.6", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz", + "integrity": "sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "regexpu-core": "^5.1.0" + } + }, + "@babel/helper-define-polyfill-provider": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz", + "integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.13.0", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/traverse": "^7.13.0", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz", + "integrity": "sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q==", + "dev": true + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", + "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-function-name": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz", + "integrity": "sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw==", + "dev": true, + "requires": { + "@babel/template": "^7.18.6", + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.6.tgz", + "integrity": "sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-module-transforms": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.6.tgz", + "integrity": "sha512-L//phhB4al5uucwzlimruukHB3jRd5JGClwRMD/ROrVjXfLqovYnvQrK/JK36WYyVwGGO7OD3kMyVTjx+WVPhw==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", + "@babel/template": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", + "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz", + "integrity": "sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg==", + "dev": true + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.6.tgz", + "integrity": "sha512-z5wbmV55TveUPZlCLZvxWHtrjuJd+8inFhk7DG0WW87/oJuGDcjDiu7HIvGcpf5464L6xKCg3vNkmlVVz9hwyQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-wrap-function": "^7.18.6", + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-replace-supers": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.18.6.tgz", + "integrity": "sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-member-expression-to-functions": "^7.18.6", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-simple-access": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", + "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.6.tgz", + "integrity": "sha512-4KoLhwGS9vGethZpAhYnMejWkX64wsnHPDwvOsKWU6Fg4+AlK2Jz3TyjQLMEPvz+1zemi/WBdkYxCD0bAfIkiw==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", + "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.18.6.tgz", + "integrity": "sha512-I5/LZfozwMNbwr/b1vhhuYD+J/mU+gfGAj5td7l5Rv9WYmH6i3Om69WGKNmlIpsVW/mF6O5bvTKbvDQZVgjqOw==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.18.6", + "@babel/template": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6" + } + }, + "@babel/helpers": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.6.tgz", + "integrity": "sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ==", + "dev": true, + "requires": { + "@babel/template": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6" + } + }, + "@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/parser": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.6.tgz", + "integrity": "sha512-uQVSa9jJUe/G/304lXspfWVpKpK4euFLgGiMQFOCpM/bgcAdeoHwi/OQz23O9GK2osz26ZiXRRV9aV+Yl1O8tw==", + "dev": true + }, + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", + "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.6.tgz", + "integrity": "sha512-Udgu8ZRgrBrttVz6A0EVL0SJ1z+RLbIeqsu632SA1hf0awEppD6TvdznoH+orIF8wtFFAV/Enmw9Y+9oV8TQcw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.6" + } + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.6.tgz", + "integrity": "sha512-WAz4R9bvozx4qwf74M+sfqPMKfSqwM0phxPTR6iJIi8robgzXwkEgmeJG1gEKhm6sDqT/U9aV3lfcqybIpev8w==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-remap-async-to-generator": "^7.18.6", + "@babel/plugin-syntax-async-generators": "^7.8.4" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", + "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-proposal-class-static-block": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", + "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", + "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + } + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.6.tgz", + "integrity": "sha512-zr/QcUlUo7GPo6+X1wC98NJADqmy5QTFWWhqeQWiki4XHafJtLl/YMGkmRB2szDD2IYJCCdBTd4ElwhId9T7Xw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", + "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-json-strings": "^7.8.3" + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.6.tgz", + "integrity": "sha512-zMo66azZth/0tVd7gmkxOkOjs2rpHyhpcFo565PUP37hSp6hSd9uUKIfTDFMz58BwqgQKhJ9YxtM5XddjXVn+Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", + "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", + "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.6.tgz", + "integrity": "sha512-9yuM6wr4rIsKa1wlUAbZEazkCrgw2sMPEXCr4Rnwetu7cEW1NydkCWytLuYletbf8vFxdJxFhwEZqMpOx2eZyw==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.18.6", + "@babel/helper-compilation-targets": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.18.6" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", + "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.6.tgz", + "integrity": "sha512-PatI6elL5eMzoypFAiYDpYQyMtXTn+iMhuxxQt5mAXD4fEmKorpSI3PHd+i3JXBJN3xyA6MvJv7at23HffFHwA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", + "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", + "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-import-assertions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz", + "integrity": "sha512-/DU3RXad9+bZwrgWJQKbr39gYbJpLJHezqEzRzi/BHRlJ9zsQb4CK2CA/5apllXNomwA1qHwzvHl+AdEmC5krQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", + "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz", + "integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz", + "integrity": "sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-remap-async-to-generator": "^7.18.6" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", + "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.6.tgz", + "integrity": "sha512-pRqwb91C42vs1ahSAWJkxOxU1RHWDn16XAa6ggQ72wjLlWyYeAcLvTtE0aM8ph3KNydy9CQF2nLYcjq1WysgxQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.6.tgz", + "integrity": "sha512-XTg8XW/mKpzAF3actL554Jl/dOYoJtv3l8fxaEczpgz84IeeVf+T1u2CSvPHuZbt0w3JkIx4rdn/MRQI7mo0HQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-function-name": "^7.18.6", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.6.tgz", + "integrity": "sha512-9repI4BhNrR0KenoR9vm3/cIc1tSBIo+u1WVjKCAynahj25O8zfbiE6JtAtHPGQSs4yZ+bA8mRasRP+qc+2R5A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.6.tgz", + "integrity": "sha512-tgy3u6lRp17ilY8r1kP4i2+HDUwxlVqq3RTc943eAWSzGgpU1qhiKpqZ5CMyHReIYPHdo3Kg8v8edKtDqSVEyQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", + "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.6.tgz", + "integrity": "sha512-NJU26U/208+sxYszf82nmGYqVF9QN8py2HFTblPT9hbawi8+1C5a9JubODLTGFuT0qlkqVinmkwOD13s0sZktg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", + "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.6.tgz", + "integrity": "sha512-WAjoMf4wIiSsy88KmG7tgj2nFdEK7E46tArVtcgED7Bkj6Fg/tG5SbvNIOKxbFS2VFgNh6+iaPswBeQZm4ox8w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.6.tgz", + "integrity": "sha512-kJha/Gbs5RjzIu0CxZwf5e3aTTSlhZnHMT8zPWnJMjNpLOUgqevg+PN5oMH68nMCXnfiMo4Bhgxqj59KHTlAnA==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.18.6", + "@babel/helper-function-name": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.6.tgz", + "integrity": "sha512-x3HEw0cJZVDoENXOp20HlypIHfl0zMIhMVZEBVTfmqbObIpsMxMbmU5nOEO8R7LYT+z5RORKPlTI5Hj4OsO9/Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", + "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz", + "integrity": "sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz", + "integrity": "sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.6.tgz", + "integrity": "sha512-UbPYpXxLjTw6w6yXX2BYNxF3p6QY225wcTkfQCy3OMnSlS/C3xGtwUjEzGkldb/sy6PWLiCQ3NbYfjWUTI3t4g==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", + "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz", + "integrity": "sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", + "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", + "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.6.tgz", + "integrity": "sha512-FjdqgMv37yVl/gwvzkcB+wfjRI8HQmc5EgOG9iGNvUY1ok+TjsoaMP7IqCDZBhkFcM5f3OPVMs6Dmp03C5k4/A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", + "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", + "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "regenerator-transform": "^0.15.0" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", + "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", + "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.6.tgz", + "integrity": "sha512-ayT53rT/ENF8WWexIRg9AiV9h0aIteyWn5ptfZTZQrjk/+f3WdrJGCY4c9wcgl2+MKkKPhzbYp97FTsquZpDCw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", + "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.6.tgz", + "integrity": "sha512-UuqlRrQmT2SWRvahW46cGSany0uTlcj8NYOS5sRGYi8FxPYPoLd5DDmMd32ZXEj2Jq+06uGVQKHxa/hJx2EzKw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.6.tgz", + "integrity": "sha512-7m71iS/QhsPk85xSjFPovHPcH3H9qeyzsujhTc+vcdnsXavoWYJ74zx0lP5RhpC5+iDnVLO+PPMHzC11qels1g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-typescript": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.6.tgz", + "integrity": "sha512-ijHNhzIrLj5lQCnI6aaNVRtGVuUZhOXFLRVFs7lLrkXTHip4FKty5oAuQdk4tywG0/WjXmjTfQCWmuzrvFer1w==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-typescript": "^7.18.6" + } + }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.6.tgz", + "integrity": "sha512-XNRwQUXYMP7VLuy54cr/KS/WeL3AZeORhrmeZ7iewgu+X2eBqmpaLI/hzqr9ZxCeUoq0ASK4GUzSM0BDhZkLFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", + "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/preset-env": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.6.tgz", + "integrity": "sha512-WrthhuIIYKrEFAwttYzgRNQ5hULGmwTj+D6l7Zdfsv5M7IWV/OZbUfbeL++Qrzx1nVJwWROIFhCHRYQV4xbPNw==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.18.6", + "@babel/helper-compilation-targets": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.6", + "@babel/plugin-proposal-async-generator-functions": "^7.18.6", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-class-static-block": "^7.18.6", + "@babel/plugin-proposal-dynamic-import": "^7.18.6", + "@babel/plugin-proposal-export-namespace-from": "^7.18.6", + "@babel/plugin-proposal-json-strings": "^7.18.6", + "@babel/plugin-proposal-logical-assignment-operators": "^7.18.6", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", + "@babel/plugin-proposal-numeric-separator": "^7.18.6", + "@babel/plugin-proposal-object-rest-spread": "^7.18.6", + "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.6", + "@babel/plugin-proposal-private-methods": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.18.6", + "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.18.6", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.18.6", + "@babel/plugin-transform-async-to-generator": "^7.18.6", + "@babel/plugin-transform-block-scoped-functions": "^7.18.6", + "@babel/plugin-transform-block-scoping": "^7.18.6", + "@babel/plugin-transform-classes": "^7.18.6", + "@babel/plugin-transform-computed-properties": "^7.18.6", + "@babel/plugin-transform-destructuring": "^7.18.6", + "@babel/plugin-transform-dotall-regex": "^7.18.6", + "@babel/plugin-transform-duplicate-keys": "^7.18.6", + "@babel/plugin-transform-exponentiation-operator": "^7.18.6", + "@babel/plugin-transform-for-of": "^7.18.6", + "@babel/plugin-transform-function-name": "^7.18.6", + "@babel/plugin-transform-literals": "^7.18.6", + "@babel/plugin-transform-member-expression-literals": "^7.18.6", + "@babel/plugin-transform-modules-amd": "^7.18.6", + "@babel/plugin-transform-modules-commonjs": "^7.18.6", + "@babel/plugin-transform-modules-systemjs": "^7.18.6", + "@babel/plugin-transform-modules-umd": "^7.18.6", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.18.6", + "@babel/plugin-transform-new-target": "^7.18.6", + "@babel/plugin-transform-object-super": "^7.18.6", + "@babel/plugin-transform-parameters": "^7.18.6", + "@babel/plugin-transform-property-literals": "^7.18.6", + "@babel/plugin-transform-regenerator": "^7.18.6", + "@babel/plugin-transform-reserved-words": "^7.18.6", + "@babel/plugin-transform-shorthand-properties": "^7.18.6", + "@babel/plugin-transform-spread": "^7.18.6", + "@babel/plugin-transform-sticky-regex": "^7.18.6", + "@babel/plugin-transform-template-literals": "^7.18.6", + "@babel/plugin-transform-typeof-symbol": "^7.18.6", + "@babel/plugin-transform-unicode-escapes": "^7.18.6", + "@babel/plugin-transform-unicode-regex": "^7.18.6", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.18.6", + "babel-plugin-polyfill-corejs2": "^0.3.1", + "babel-plugin-polyfill-corejs3": "^0.5.2", + "babel-plugin-polyfill-regenerator": "^0.3.1", + "core-js-compat": "^3.22.1", + "semver": "^6.3.0" + } + }, + "@babel/preset-modules": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/preset-typescript": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz", + "integrity": "sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-transform-typescript": "^7.18.6" + } + }, + "@babel/runtime": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.6.tgz", + "integrity": "sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz", + "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/types": "^7.18.6" + } + }, + "@babel/traverse": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.6.tgz", + "integrity": "sha512-zS/OKyqmD7lslOtFqbscH6gMLFYOfG1YPqCKfAW5KrTeolKqvB8UelR49Fpr6y93kYkW2Ik00mT1LOGiAGvizw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-function-name": "^7.18.6", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/types": "^7.18.6", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.18.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.7.tgz", + "integrity": "sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.18.6", + "to-fast-properties": "^2.0.0" + } + }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "@eslint/eslintrc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", + "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.3.2", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "globals": { + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + } + } + }, + "@humanwhocodes/config-array": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", + "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/gitignore-to-minimatch": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", + "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + } + } + }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@jest/console": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.1.tgz", + "integrity": "sha512-0RiUocPVFEm3WRMOStIHbRWllG6iW6E3/gUPnf4lkrVFyXIIDeCe+vlKeYyFOMhB2EPE6FLFCNADSOOQMaqvyA==", + "dev": true, + "requires": { + "@jest/types": "^28.1.1", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^28.1.1", + "jest-util": "^28.1.1", + "slash": "^3.0.0" + } + }, + "@jest/core": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.2.tgz", + "integrity": "sha512-Xo4E+Sb/nZODMGOPt2G3cMmCBqL4/W2Ijwr7/mrXlq4jdJwcFQ/9KrrJZT2adQRk2otVBXXOz1GRQ4Z5iOgvRQ==", + "dev": true, + "requires": { + "@jest/console": "^28.1.1", + "@jest/reporters": "^28.1.2", + "@jest/test-result": "^28.1.1", + "@jest/transform": "^28.1.2", + "@jest/types": "^28.1.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^28.0.2", + "jest-config": "^28.1.2", + "jest-haste-map": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.1", + "jest-resolve-dependencies": "^28.1.2", + "jest-runner": "^28.1.2", + "jest-runtime": "^28.1.2", + "jest-snapshot": "^28.1.2", + "jest-util": "^28.1.1", + "jest-validate": "^28.1.1", + "jest-watcher": "^28.1.1", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.1", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "@jest/environment": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.2.tgz", + "integrity": "sha512-I0CR1RUMmOzd0tRpz10oUfaChBWs+/Hrvn5xYhMEF/ZqrDaaeHwS8yDBqEWCrEnkH2g+WE/6g90oBv3nKpcm8Q==", + "dev": true, + "requires": { + "@jest/fake-timers": "^28.1.2", + "@jest/types": "^28.1.1", + "@types/node": "*", + "jest-mock": "^28.1.1" + } + }, + "@jest/expect": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.2.tgz", + "integrity": "sha512-HBzyZBeFBiOelNbBKN0pilWbbrGvwDUwAqMC46NVJmWm8AVkuE58NbG1s7DR4cxFt4U5cVLxofAoHxgvC5MyOw==", + "dev": true, + "requires": { + "expect": "^28.1.1", + "jest-snapshot": "^28.1.2" + } + }, + "@jest/expect-utils": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.1.tgz", + "integrity": "sha512-n/ghlvdhCdMI/hTcnn4qV57kQuV9OTsZzH1TTCVARANKhl6hXJqLKUkwX69ftMGpsbpt96SsDD8n8LD2d9+FRw==", + "dev": true, + "requires": { + "jest-get-type": "^28.0.2" + } + }, + "@jest/fake-timers": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.2.tgz", + "integrity": "sha512-xSYEI7Y0D5FbZN2LsCUj/EKRR1zfQYmGuAUVh6xTqhx7V5JhjgMcK5Pa0iR6WIk0GXiHDe0Ke4A+yERKE9saqg==", + "dev": true, + "requires": { + "@jest/types": "^28.1.1", + "@sinonjs/fake-timers": "^9.1.2", + "@types/node": "*", + "jest-message-util": "^28.1.1", + "jest-mock": "^28.1.1", + "jest-util": "^28.1.1" + } + }, + "@jest/globals": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.2.tgz", + "integrity": "sha512-cz0lkJVDOtDaYhvT3Fv2U1B6FtBnV+OpEyJCzTHM1fdoTsU4QNLAt/H4RkiwEUU+dL4g/MFsoTuHeT2pvbo4Hg==", + "dev": true, + "requires": { + "@jest/environment": "^28.1.2", + "@jest/expect": "^28.1.2", + "@jest/types": "^28.1.1" + } + }, + "@jest/reporters": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.2.tgz", + "integrity": "sha512-/whGLhiwAqeCTmQEouSigUZJPVl7sW8V26EiboImL+UyXznnr1a03/YZ2BX8OlFw0n+Zlwu+EZAITZtaeRTxyA==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^28.1.1", + "@jest/test-result": "^28.1.1", + "@jest/transform": "^28.1.2", + "@jest/types": "^28.1.1", + "@jridgewell/trace-mapping": "^0.3.13", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^28.1.1", + "jest-util": "^28.1.1", + "jest-worker": "^28.1.1", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^9.0.1" + } + }, + "@jest/schemas": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.0.2.tgz", + "integrity": "sha512-YVDJZjd4izeTDkij00vHHAymNXQ6WWsdChFRK86qck6Jpr3DCL5W3Is3vslviRlP+bLuMYRLbdp98amMvqudhA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.23.3" + } + }, + "@jest/source-map": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz", + "integrity": "sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.13", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + } + }, + "@jest/test-result": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.1.tgz", + "integrity": "sha512-hPmkugBktqL6rRzwWAtp1JtYT4VHwv8OQ+9lE5Gymj6dHzubI/oJHMUpPOt8NrdVWSrz9S7bHjJUmv2ggFoUNQ==", + "dev": true, + "requires": { + "@jest/console": "^28.1.1", + "@jest/types": "^28.1.1", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.1.tgz", + "integrity": "sha512-nuL+dNSVMcWB7OOtgb0EGH5AjO4UBCt68SLP08rwmC+iRhyuJWS9MtZ/MpipxFwKAlHFftbMsydXqWre8B0+XA==", + "dev": true, + "requires": { + "@jest/test-result": "^28.1.1", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.1", + "slash": "^3.0.0" + } + }, + "@jest/transform": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.2.tgz", + "integrity": "sha512-3o+lKF6iweLeJFHBlMJysdaPbpoMmtbHEFsjzSv37HIq/wWt5ijTeO2Yf7MO5yyczCopD507cNwNLeX8Y/CuIg==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/types": "^28.1.1", + "@jridgewell/trace-mapping": "^0.3.13", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.1", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.1", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.1" + } + }, + "@jest/types": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.1.tgz", + "integrity": "sha512-vRXVqSg1VhDnB8bWcmvLzmg0Bt9CRKVgHPXqYwvWMX3TvAjeO+nRuK6+VdTKCtWOvYlmkF/HqNAL/z+N3B53Kw==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", + "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@sinclair/typebox": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.23.5.tgz", + "integrity": "sha512-AFBVi/iT4g20DHoujvMH1aEDn8fGJh4xsRGCP6d8RpLPMqsNPvW01Jcn0QysXTsg++/xj25NmJsGyH9xug/wKg==", + "dev": true + }, + "@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@types/babel__core": { + "version": "7.1.19", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", + "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "@types/babel__generator": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", + "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@types/babel__template": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@types/babel__traverse": { + "version": "7.17.1", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.17.1.tgz", + "integrity": "sha512-kVzjari1s2YVi77D3w1yuvohV2idweYXMCDzqBiVNN63TcDWrIlTVOYpqVrvbbyOE/IyzBoTKF0fdnLPEORFxA==", + "dev": true, + "requires": { + "@babel/types": "^7.3.0" + } + }, + "@types/graceful-fs": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", + "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "dev": true + }, + "@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "*" + } + }, + "@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "requires": { + "@types/istanbul-lib-report": "*" + } + }, + "@types/jest": { + "version": "28.1.4", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.4.tgz", + "integrity": "sha512-telv6G5N7zRJiLcI3Rs3o+ipZ28EnE+7EvF0pSrt2pZOMnAVI/f+6/LucDxOvcBcTeTL3JMF744BbVQAVBUQRA==", + "dev": true, + "requires": { + "jest-matcher-utils": "^28.0.0", + "pretty-format": "^28.0.0" + } + }, + "@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, + "@types/node": { + "version": "18.8.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.8.3.tgz", + "integrity": "sha512-0os9vz6BpGwxGe9LOhgP/ncvYN5Tx1fNcd2TM3rD/aCGBkysb+ZWpXEocG24h6ZzOi13+VB8HndAQFezsSOw1w==", + "dev": true + }, + "@types/prettier": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.6.3.tgz", + "integrity": "sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg==", + "dev": true + }, + "@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true + }, + "@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "dev": true + }, + "@typescript-eslint/eslint-plugin": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.32.0.tgz", + "integrity": "sha512-CHLuz5Uz7bHP2WgVlvoZGhf0BvFakBJKAD/43Ty0emn4wXWv5k01ND0C0fHcl/Im8Td2y/7h44E9pca9qAu2ew==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "5.32.0", + "@typescript-eslint/type-utils": "5.32.0", + "@typescript-eslint/utils": "5.32.0", + "debug": "^4.3.4", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.2.0", + "regexpp": "^3.2.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "dependencies": { + "semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@typescript-eslint/parser": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.32.0.tgz", + "integrity": "sha512-IxRtsehdGV9GFQ35IGm5oKKR2OGcazUoiNBxhRV160iF9FoyuXxjY+rIqs1gfnd+4eL98OjeGnMpE7RF/NBb3A==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "5.32.0", + "@typescript-eslint/types": "5.32.0", + "@typescript-eslint/typescript-estree": "5.32.0", + "debug": "^4.3.4" + } + }, + "@typescript-eslint/scope-manager": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.32.0.tgz", + "integrity": "sha512-KyAE+tUON0D7tNz92p1uetRqVJiiAkeluvwvZOqBmW9z2XApmk5WSMV9FrzOroAcVxJZB3GfUwVKr98Dr/OjOg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.32.0", + "@typescript-eslint/visitor-keys": "5.32.0" + } + }, + "@typescript-eslint/type-utils": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.32.0.tgz", + "integrity": "sha512-0gSsIhFDduBz3QcHJIp3qRCvVYbqzHg8D6bHFsDMrm0rURYDj+skBK2zmYebdCp+4nrd9VWd13egvhYFJj/wZg==", + "dev": true, + "requires": { + "@typescript-eslint/utils": "5.32.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/types": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.32.0.tgz", + "integrity": "sha512-EBUKs68DOcT/EjGfzywp+f8wG9Zw6gj6BjWu7KV/IYllqKJFPlZlLSYw/PTvVyiRw50t6wVbgv4p9uE2h6sZrQ==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.32.0.tgz", + "integrity": "sha512-ZVAUkvPk3ITGtCLU5J4atCw9RTxK+SRc6hXqLtllC2sGSeMFWN+YwbiJR9CFrSFJ3w4SJfcWtDwNb/DmUIHdhg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.32.0", + "@typescript-eslint/visitor-keys": "5.32.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "dependencies": { + "semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@typescript-eslint/utils": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.32.0.tgz", + "integrity": "sha512-W7lYIAI5Zlc5K082dGR27Fczjb3Q57ECcXefKU/f0ajM5ToM0P+N9NmJWip8GmGu/g6QISNT+K6KYB+iSHjXCQ==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.32.0", + "@typescript-eslint/types": "5.32.0", + "@typescript-eslint/typescript-estree": "5.32.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "dependencies": { + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.32.0.tgz", + "integrity": "sha512-S54xOHZgfThiZ38/ZGTgB2rqx51CMJ5MCfVT2IplK4Q7hgzGfe0nLzLCcenDnc/cSjP568hdeKfeDcBgqNHD/g==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.32.0", + "eslint-visitor-keys": "^3.3.0" + } + }, + "acorn": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "requires": { + "type-fest": "^0.21.3" + }, + "dependencies": { + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true + } + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==" + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "babel-jest": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.2.tgz", + "integrity": "sha512-pfmoo6sh4L/+5/G2OOfQrGJgvH7fTa1oChnuYH2G/6gA+JwDvO8PELwvwnofKBMNrQsam0Wy/Rw+QSrBNewq2Q==", + "dev": true, + "requires": { + "@jest/transform": "^28.1.2", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^28.1.1", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + } + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, + "babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + } + }, + "babel-plugin-jest-hoist": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.1.tgz", + "integrity": "sha512-NovGCy5Hn25uMJSAU8FaHqzs13cFoOI4lhIujiepssjCKRsAo3TA734RDWSGxuFTsUJXerYOqQQodlxgmtqbzw==", + "dev": true, + "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + } + }, + "babel-plugin-polyfill-corejs2": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz", + "integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.3.1", + "semver": "^6.1.1" + } + }, + "babel-plugin-polyfill-corejs3": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz", + "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.3.1", + "core-js-compat": "^3.21.0" + } + }, + "babel-plugin-polyfill-regenerator": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz", + "integrity": "sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.3.1" + } + }, + "babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "requires": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + } + }, + "babel-preset-jest": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.1.tgz", + "integrity": "sha512-FCq9Oud0ReTeWtcneYf/48981aTfXYuB9gbU4rBNNJVBSQ6ssv7E6v/qvbBxtOWwZFXjLZwpg+W3q7J6vhH25g==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "^28.1.1", + "babel-preset-current-node-syntax": "^1.0.0" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browserslist": { + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.1.tgz", + "integrity": "sha512-Nq8MFCSrnJXSc88yliwlzQe3qNe3VntIjhsArW9IJOEPSHNx23FalwApUVbzAWABLhYJJ7y8AynWI/XM8OdfjQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001359", + "electron-to-chromium": "^1.4.172", + "node-releases": "^2.0.5", + "update-browserslist-db": "^1.0.4" + } + }, + "bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "requires": { + "node-int64": "^0.4.0" + } + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001363", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001363.tgz", + "integrity": "sha512-HpQhpzTGGPVMnCjIomjt+jvyUu8vNFo3TaDiZ/RcoTrlOq/5+tC8zHdsbgFB6MxmaY+jCpsH09aD80Bb4Ow3Sg==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true + }, + "ci-info": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz", + "integrity": "sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==", + "dev": true + }, + "cjs-module-lexer": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", + "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "dev": true + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true + }, + "collect-v8-coverage": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", + "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "core-js-compat": { + "version": "3.23.3", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.23.3.tgz", + "integrity": "sha512-WSzUs2h2vvmKsacLHNTdpyOC9k43AEhcGoFlVgCY4L7aw98oSBKtPL6vD0/TqZjRWRQYdDSLkzZIni4Crbbiqw==", + "dev": true, + "requires": { + "browserslist": "^4.21.0", + "semver": "7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true + } + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "daveutils": { + "version": "0.4.64", + "resolved": "https://registry.npmjs.org/daveutils/-/daveutils-0.4.64.tgz", + "integrity": "sha512-3w41wBnC6t/0ON+MSCk7JvKEzqLkKDMXWLAlPcTVp9YTzXne6MwlgZ2Hgfv3nivIGJ+IhBeC8hD09YdSRciZGw==", + "requires": { + "request": "*" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", + "dev": true + }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true + }, + "define-properties": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, + "detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true + }, + "diff-sequences": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", + "dev": true + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "electron-to-chromium": { + "version": "1.4.180", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.180.tgz", + "integrity": "sha512-7at5ash3FD9U5gPa3/wPr6OdiZd/zBjvDZaaHBpcqFOFUhZiWnb7stkqk8xUFL9H9nk7Yok5vCCNK8wyC/+f8A==", + "dev": true + }, + "emittery": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", + "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint": { + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz", + "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", + "dev": true, + "requires": { + "@eslint/eslintrc": "^1.3.0", + "@humanwhocodes/config-array": "^0.10.4", + "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.3", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "globals": { + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + } + } + }, + "eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true + }, + "espree": { + "version": "9.3.3", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", + "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", + "dev": true, + "requires": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true + }, + "expect": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.1.tgz", + "integrity": "sha512-/AANEwGL0tWBwzLNOvO0yUdy2D52jVdNXppOqswC49sxMN2cPWsGCQdzuIf9tj6hHoBQzNvx75JUYuQAckPo3w==", + "dev": true, + "requires": { + "@jest/expect-utils": "^28.1.1", + "jest-get-type": "^28.0.2", + "jest-matcher-utils": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-util": "^28.1.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "fb-watchman": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", + "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", + "dev": true, + "requires": { + "bser": "2.1.1" + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", + "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", + "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, + "ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + } + } + }, + "import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "is-core-module": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, + "istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", + "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + } + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + } + }, + "istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + } + }, + "istanbul-reports": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", + "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jest": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.2.tgz", + "integrity": "sha512-Tuf05DwLeCh2cfWCQbcz9UxldoDyiR1E9Igaei5khjonKncYdc6LDfynKCEWozK0oLE3GD+xKAo2u8x/0s6GOg==", + "dev": true, + "requires": { + "@jest/core": "^28.1.2", + "@jest/types": "^28.1.1", + "import-local": "^3.0.2", + "jest-cli": "^28.1.2" + } + }, + "jest-changed-files": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.0.2.tgz", + "integrity": "sha512-QX9u+5I2s54ZnGoMEjiM2WeBvJR2J7w/8ZUmH2um/WLAuGAYFQcsVXY9+1YL6k0H/AGUdH8pXUAv6erDqEsvIA==", + "dev": true, + "requires": { + "execa": "^5.0.0", + "throat": "^6.0.1" + } + }, + "jest-circus": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.2.tgz", + "integrity": "sha512-E2vdPIJG5/69EMpslFhaA46WkcrN74LI5V/cSJ59L7uS8UNoXbzTxmwhpi9XrIL3zqvMt5T0pl5k2l2u2GwBNQ==", + "dev": true, + "requires": { + "@jest/environment": "^28.1.2", + "@jest/expect": "^28.1.2", + "@jest/test-result": "^28.1.1", + "@jest/types": "^28.1.1", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^28.1.1", + "jest-matcher-utils": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-runtime": "^28.1.2", + "jest-snapshot": "^28.1.2", + "jest-util": "^28.1.1", + "pretty-format": "^28.1.1", + "slash": "^3.0.0", + "stack-utils": "^2.0.3", + "throat": "^6.0.1" + } + }, + "jest-cli": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.2.tgz", + "integrity": "sha512-l6eoi5Do/IJUXAFL9qRmDiFpBeEJAnjJb1dcd9i/VWfVWbp3mJhuH50dNtX67Ali4Ecvt4eBkWb4hXhPHkAZTw==", + "dev": true, + "requires": { + "@jest/core": "^28.1.2", + "@jest/test-result": "^28.1.1", + "@jest/types": "^28.1.1", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^28.1.2", + "jest-util": "^28.1.1", + "jest-validate": "^28.1.1", + "prompts": "^2.0.1", + "yargs": "^17.3.1" + } + }, + "jest-config": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.2.tgz", + "integrity": "sha512-g6EfeRqddVbjPVBVY4JWpUY4IvQoFRIZcv4V36QkqzE0IGhEC/VkugFeBMAeUE7PRgC8KJF0yvJNDeQRbamEVA==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^28.1.1", + "@jest/types": "^28.1.1", + "babel-jest": "^28.1.2", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^28.1.2", + "jest-environment-node": "^28.1.2", + "jest-get-type": "^28.0.2", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.1", + "jest-runner": "^28.1.2", + "jest-util": "^28.1.1", + "jest-validate": "^28.1.1", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^28.1.1", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + } + }, + "jest-diff": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", + "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^28.1.1", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.1" + } + }, + "jest-docblock": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz", + "integrity": "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==", + "dev": true, + "requires": { + "detect-newline": "^3.0.0" + } + }, + "jest-each": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.1.tgz", + "integrity": "sha512-A042rqh17ZvEhRceDMi784ppoXR7MWGDEKTXEZXb4svt0eShMZvijGxzKsx+yIjeE8QYmHPrnHiTSQVhN4nqaw==", + "dev": true, + "requires": { + "@jest/types": "^28.1.1", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.2", + "jest-util": "^28.1.1", + "pretty-format": "^28.1.1" + } + }, + "jest-environment-node": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.2.tgz", + "integrity": "sha512-oYsZz9Qw27XKmOgTtnl0jW7VplJkN2oeof+SwAwKFQacq3CLlG9u4kTGuuLWfvu3J7bVutWlrbEQMOCL/jughw==", + "dev": true, + "requires": { + "@jest/environment": "^28.1.2", + "@jest/fake-timers": "^28.1.2", + "@jest/types": "^28.1.1", + "@types/node": "*", + "jest-mock": "^28.1.1", + "jest-util": "^28.1.1" + } + }, + "jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true + }, + "jest-haste-map": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.1.tgz", + "integrity": "sha512-ZrRSE2o3Ezh7sb1KmeLEZRZ4mgufbrMwolcFHNRSjKZhpLa8TdooXOOFlSwoUzlbVs1t0l7upVRW2K7RWGHzbQ==", + "dev": true, + "requires": { + "@jest/types": "^28.1.1", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.1", + "jest-worker": "^28.1.1", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + } + }, + "jest-leak-detector": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.1.tgz", + "integrity": "sha512-4jvs8V8kLbAaotE+wFR7vfUGf603cwYtFf1/PYEsyX2BAjSzj8hQSVTP6OWzseTl0xL6dyHuKs2JAks7Pfubmw==", + "dev": true, + "requires": { + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.1" + } + }, + "jest-matcher-utils": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", + "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^28.1.1", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.1" + } + }, + "jest-message-util": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.1.tgz", + "integrity": "sha512-xoDOOT66fLfmTRiqkoLIU7v42mal/SqwDKvfmfiWAdJMSJiU+ozgluO7KbvoAgiwIrrGZsV7viETjc8GNrA/IQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^28.1.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.1", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-mock": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.1.tgz", + "integrity": "sha512-bDCb0FjfsmKweAvE09dZT59IMkzgN0fYBH6t5S45NoJfd2DHkS3ySG2K+hucortryhO3fVuXdlxWcbtIuV/Skw==", + "dev": true, + "requires": { + "@jest/types": "^28.1.1", + "@types/node": "*" + } + }, + "jest-pnp-resolver": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "dev": true, + "requires": {} + }, + "jest-regex-util": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", + "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", + "dev": true + }, + "jest-resolve": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.1.tgz", + "integrity": "sha512-/d1UbyUkf9nvsgdBildLe6LAD4DalgkgZcKd0nZ8XUGPyA/7fsnaQIlKVnDiuUXv/IeZhPEDrRJubVSulxrShA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.1", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^28.1.1", + "jest-validate": "^28.1.1", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" + } + }, + "jest-resolve-dependencies": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.2.tgz", + "integrity": "sha512-OXw4vbOZuyRTBi3tapWBqdyodU+T33ww5cPZORuTWkg+Y8lmsxQlVu3MWtJh6NMlKRTHQetF96yGPv01Ye7Mbg==", + "dev": true, + "requires": { + "jest-regex-util": "^28.0.2", + "jest-snapshot": "^28.1.2" + } + }, + "jest-runner": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.2.tgz", + "integrity": "sha512-6/k3DlAsAEr5VcptCMdhtRhOoYClZQmxnVMZvZ/quvPGRpN7OBQYPIC32tWSgOnbgqLXNs5RAniC+nkdFZpD4A==", + "dev": true, + "requires": { + "@jest/console": "^28.1.1", + "@jest/environment": "^28.1.2", + "@jest/test-result": "^28.1.1", + "@jest/transform": "^28.1.2", + "@jest/types": "^28.1.1", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "graceful-fs": "^4.2.9", + "jest-docblock": "^28.1.1", + "jest-environment-node": "^28.1.2", + "jest-haste-map": "^28.1.1", + "jest-leak-detector": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-resolve": "^28.1.1", + "jest-runtime": "^28.1.2", + "jest-util": "^28.1.1", + "jest-watcher": "^28.1.1", + "jest-worker": "^28.1.1", + "source-map-support": "0.5.13", + "throat": "^6.0.1" + } + }, + "jest-runtime": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.2.tgz", + "integrity": "sha512-i4w93OsWzLOeMXSi9epmakb2+3z0AchZtUQVF1hesBmcQQy4vtaql5YdVe9KexdJaVRyPDw8DoBR0j3lYsZVYw==", + "dev": true, + "requires": { + "@jest/environment": "^28.1.2", + "@jest/fake-timers": "^28.1.2", + "@jest/globals": "^28.1.2", + "@jest/source-map": "^28.1.2", + "@jest/test-result": "^28.1.1", + "@jest/transform": "^28.1.2", + "@jest/types": "^28.1.1", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "execa": "^5.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-mock": "^28.1.1", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.1", + "jest-snapshot": "^28.1.2", + "jest-util": "^28.1.1", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + } + }, + "jest-snapshot": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.2.tgz", + "integrity": "sha512-wzrieFttZYfLvrCVRJxX+jwML2YTArOUqFpCoSVy1QUapx+LlV9uLbV/mMEhYj4t7aMeE9aSQFHSvV/oNoDAMA==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^28.1.1", + "@jest/transform": "^28.1.2", + "@jest/types": "^28.1.1", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^28.1.1", + "graceful-fs": "^4.2.9", + "jest-diff": "^28.1.1", + "jest-get-type": "^28.0.2", + "jest-haste-map": "^28.1.1", + "jest-matcher-utils": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-util": "^28.1.1", + "natural-compare": "^1.4.0", + "pretty-format": "^28.1.1", + "semver": "^7.3.5" + }, + "dependencies": { + "semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "jest-util": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.1.tgz", + "integrity": "sha512-FktOu7ca1DZSyhPAxgxB6hfh2+9zMoJ7aEQA759Z6p45NuO8mWcqujH+UdHlCm/V6JTWwDztM2ITCzU1ijJAfw==", + "dev": true, + "requires": { + "@jest/types": "^28.1.1", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "jest-validate": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.1.tgz", + "integrity": "sha512-Kpf6gcClqFCIZ4ti5++XemYJWUPCFUW+N2gknn+KgnDf549iLul3cBuKVe1YcWRlaF8tZV8eJCap0eECOEE3Ug==", + "dev": true, + "requires": { + "@jest/types": "^28.1.1", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.2", + "leven": "^3.1.0", + "pretty-format": "^28.1.1" + } + }, + "jest-watcher": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.1.tgz", + "integrity": "sha512-RQIpeZ8EIJMxbQrXpJQYIIlubBnB9imEHsxxE41f54ZwcqWLysL/A0ZcdMirf+XsMn3xfphVQVV4EW0/p7i7Ug==", + "dev": true, + "requires": { + "@jest/test-result": "^28.1.1", + "@jest/types": "^28.1.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "jest-util": "^28.1.1", + "string-length": "^4.0.1" + } + }, + "jest-worker": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.1.tgz", + "integrity": "sha512-Au7slXB08C6h+xbJPp7VIb6U0XX5Kc9uel/WFc6/rcTzGiaVCBRngBExSYuXSLFPULPSYU3cJ3ybS988lNFQhQ==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "dependencies": { + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, + "json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "dev": true + }, + "jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, + "kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true + }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "requires": { + "tmpl": "1.0.5" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node-releases": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.5.tgz", + "integrity": "sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "opml": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/opml/-/opml-0.4.24.tgz", + "integrity": "sha512-erqjZzWaSNiu2T3x2aRqNZCGj8d23LbGuk4NSHN0DezVX6DrAzOfa71nm4CstSpK+DGUW15M8JsR2/0jivZR2Q==", + "requires": { + "daveutils": "*", + "opmltojs": "*", + "request": "*", + "xml2js": "*" + } + }, + "opmltojs": { + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/opmltojs/-/opmltojs-0.4.12.tgz", + "integrity": "sha512-7Up14sOqzrAvSIdbU0PUApIf9cY+olzooaWKo4bfe/gQv6QNy7hmy9+z7OtJhs6wCQmVt4uxTxu4+cteYEdHTg==", + "requires": { + "daveutils": "*", + "request": "*", + "xml2js": "*" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pirates": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "dev": true + }, + "pretty-format": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "requires": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + } + }, + "psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", + "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", + "dev": true, + "requires": { + "regenerate": "^1.4.2" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "regenerator-transform": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.0.tgz", + "integrity": "sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.4" + } + }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true + }, + "regexpu-core": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.1.0.tgz", + "integrity": "sha512-bb6hk+xWd2PEOkj5It46A16zFMs2mv86Iwpdu94la4S3sJ7C973h2dHpYKwIBGaWSO7cIRJ+UX0IeMaWcO4qwA==", + "dev": true, + "requires": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.0.1", + "regjsgen": "^0.6.0", + "regjsparser": "^0.8.2", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" + } + }, + "regjsgen": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", + "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==", + "dev": true + }, + "regjsparser": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", + "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true + } + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "resolve.exports": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", + "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "dev": true + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-utils": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", + "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "dev": true, + "requires": { + "escape-string-regexp": "^2.0.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + } + } + }, + "string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "requires": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-hyperlinks": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", + "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", + "dev": true, + "requires": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + } + }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "throat": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", + "integrity": "sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==", + "dev": true + }, + "tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, + "typescript": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "dev": true + }, + "unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", + "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", + "dev": true + }, + "update-browserslist-db": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz", + "integrity": "sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==", + "dev": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "v8-to-istanbul": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", + "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + }, + "dependencies": { + "extsprintf": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz", + "integrity": "sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==" + } + } + }, + "walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "requires": { + "makeerror": "1.0.12" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "write-file-atomic": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", + "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + } + }, + "xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } + }, + "xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "yargs": { + "version": "17.5.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", + "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.0.0" + } + }, + "yargs-parser": { + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", + "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + } + } +} diff --git a/package.json b/package.json index 22b21d1..6c49120 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@babel/preset-typescript": "^7.18.6", "@jest/globals": "^28.1.2", "@types/jest": "^28.1.4", - "@types/node": "^18.0.3", + "@types/node": "^18.8.3", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.32.0", "eslint": "^8.21.0", diff --git a/yarn.lock b/yarn.lock index 932e149..9e5a74a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4,7 +4,7 @@ "@ampproject/remapping@^2.1.0": version "2.2.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" + resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz" integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== dependencies: "@jridgewell/gen-mapping" "^0.1.0" @@ -12,19 +12,19 @@ "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz" integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== dependencies: "@babel/highlight" "^7.18.6" "@babel/compat-data@^7.13.11", "@babel/compat-data@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.6.tgz#8b37d24e88e8e21c499d4328db80577d8882fa53" + resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.6.tgz" integrity sha512-tzulrgDT0QD6U7BJ4TKVk2SDDg7wlP39P9yAx1RfLy7vP/7rsDRlWVfbWxElslu56+r7QOhB2NSDsabYYruoZQ== "@babel/core@^7.11.6", "@babel/core@^7.12.3": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.6.tgz#54a107a3c298aee3fe5e1947a6464b9b6faca03d" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.18.6.tgz" integrity sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ== dependencies: "@ampproject/remapping" "^2.1.0" @@ -45,7 +45,7 @@ "@babel/generator@^7.18.6", "@babel/generator@^7.7.2": version "7.18.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.7.tgz#2aa78da3c05aadfc82dbac16c99552fc802284bd" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.18.7.tgz" integrity sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A== dependencies: "@babel/types" "^7.18.7" @@ -54,14 +54,14 @@ "@babel/helper-annotate-as-pure@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" + resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz" integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== dependencies: "@babel/types" "^7.18.6" "@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.6.tgz#f14d640ed1ee9246fb33b8255f08353acfe70e6a" + resolved "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.6.tgz" integrity sha512-KT10c1oWEpmrIRYnthbzHgoOf6B+Xd6a5yhdbNtdhtG7aO1or5HViuf1TQR36xY/QprXA5nvxO6nAjhJ4y38jw== dependencies: "@babel/helper-explode-assignable-expression" "^7.18.6" @@ -69,7 +69,7 @@ "@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz#18d35bfb9f83b1293c22c55b3d576c1315b6ed96" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz" integrity sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg== dependencies: "@babel/compat-data" "^7.18.6" @@ -79,7 +79,7 @@ "@babel/helper-create-class-features-plugin@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.6.tgz#6f15f8459f3b523b39e00a99982e2c040871ed72" + resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.6.tgz" integrity sha512-YfDzdnoxHGV8CzqHGyCbFvXg5QESPFkXlHtvdCkesLjjVMT2Adxe4FGUR5ChIb3DxSaXO12iIOCWoXdsUVwnqw== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" @@ -92,7 +92,7 @@ "@babel/helper-create-regexp-features-plugin@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz#3e35f4e04acbbf25f1b3534a657610a000543d3c" + resolved "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz" integrity sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" @@ -100,7 +100,7 @@ "@babel/helper-define-polyfill-provider@^0.3.1": version "0.3.1" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz#52411b445bdb2e676869e5a74960d2d3826d2665" + resolved "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz" integrity sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA== dependencies: "@babel/helper-compilation-targets" "^7.13.0" @@ -114,19 +114,19 @@ "@babel/helper-environment-visitor@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz#b7eee2b5b9d70602e59d1a6cad7dd24de7ca6cd7" + resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz" integrity sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q== "@babel/helper-explode-assignable-expression@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz#41f8228ef0a6f1a036b8dfdfec7ce94f9a6bc096" + resolved "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz" integrity sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg== dependencies: "@babel/types" "^7.18.6" "@babel/helper-function-name@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz#8334fecb0afba66e6d87a7e8c6bb7fed79926b83" + resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz" integrity sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw== dependencies: "@babel/template" "^7.18.6" @@ -134,28 +134,28 @@ "@babel/helper-hoist-variables@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" + resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz" integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== dependencies: "@babel/types" "^7.18.6" "@babel/helper-member-expression-to-functions@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.6.tgz#44802d7d602c285e1692db0bad9396d007be2afc" + resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.6.tgz" integrity sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng== dependencies: "@babel/types" "^7.18.6" "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" + resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz" integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== dependencies: "@babel/types" "^7.18.6" "@babel/helper-module-transforms@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.6.tgz#57e3ca669e273d55c3cda55e6ebf552f37f483c8" + resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.6.tgz" integrity sha512-L//phhB4al5uucwzlimruukHB3jRd5JGClwRMD/ROrVjXfLqovYnvQrK/JK36WYyVwGGO7OD3kMyVTjx+WVPhw== dependencies: "@babel/helper-environment-visitor" "^7.18.6" @@ -169,19 +169,19 @@ "@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" + resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz" integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== dependencies: "@babel/types" "^7.18.6" "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz#9448974dd4fb1d80fefe72e8a0af37809cd30d6d" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz" integrity sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg== "@babel/helper-remap-async-to-generator@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.6.tgz#fa1f81acd19daee9d73de297c0308783cd3cfc23" + resolved "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.6.tgz" integrity sha512-z5wbmV55TveUPZlCLZvxWHtrjuJd+8inFhk7DG0WW87/oJuGDcjDiu7HIvGcpf5464L6xKCg3vNkmlVVz9hwyQ== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" @@ -191,7 +191,7 @@ "@babel/helper-replace-supers@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.18.6.tgz#efedf51cfccea7b7b8c0f00002ab317e7abfe420" + resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.18.6.tgz" integrity sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g== dependencies: "@babel/helper-environment-visitor" "^7.18.6" @@ -202,38 +202,38 @@ "@babel/helper-simple-access@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea" + resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz" integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g== dependencies: "@babel/types" "^7.18.6" "@babel/helper-skip-transparent-expression-wrappers@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.6.tgz#7dff00a5320ca4cf63270e5a0eca4b268b7380d9" + resolved "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.6.tgz" integrity sha512-4KoLhwGS9vGethZpAhYnMejWkX64wsnHPDwvOsKWU6Fg4+AlK2Jz3TyjQLMEPvz+1zemi/WBdkYxCD0bAfIkiw== dependencies: "@babel/types" "^7.18.6" "@babel/helper-split-export-declaration@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" + resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz" integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== dependencies: "@babel/types" "^7.18.6" "@babel/helper-validator-identifier@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz" integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== "@babel/helper-validator-option@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" + resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz" integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== "@babel/helper-wrap-function@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.18.6.tgz#ec44ea4ad9d8988b90c3e465ba2382f4de81a073" + resolved "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.18.6.tgz" integrity sha512-I5/LZfozwMNbwr/b1vhhuYD+J/mU+gfGAj5td7l5Rv9WYmH6i3Om69WGKNmlIpsVW/mF6O5bvTKbvDQZVgjqOw== dependencies: "@babel/helper-function-name" "^7.18.6" @@ -243,7 +243,7 @@ "@babel/helpers@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.6.tgz#4c966140eaa1fcaa3d5a8c09d7db61077d4debfd" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.6.tgz" integrity sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ== dependencies: "@babel/template" "^7.18.6" @@ -252,7 +252,7 @@ "@babel/highlight@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" + resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz" integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== dependencies: "@babel/helper-validator-identifier" "^7.18.6" @@ -261,19 +261,19 @@ "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.6.tgz#845338edecad65ebffef058d3be851f1d28a63bc" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.18.6.tgz" integrity sha512-uQVSa9jJUe/G/304lXspfWVpKpK4euFLgGiMQFOCpM/bgcAdeoHwi/OQz23O9GK2osz26ZiXRRV9aV+Yl1O8tw== "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" + resolved "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz" integrity sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.6.tgz#b4e4dbc2cd1acd0133479918f7c6412961c9adb8" + resolved "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.6.tgz" integrity sha512-Udgu8ZRgrBrttVz6A0EVL0SJ1z+RLbIeqsu632SA1hf0awEppD6TvdznoH+orIF8wtFFAV/Enmw9Y+9oV8TQcw== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -282,7 +282,7 @@ "@babel/plugin-proposal-async-generator-functions@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.6.tgz#aedac81e6fc12bb643374656dd5f2605bf743d17" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.6.tgz" integrity sha512-WAz4R9bvozx4qwf74M+sfqPMKfSqwM0phxPTR6iJIi8robgzXwkEgmeJG1gEKhm6sDqT/U9aV3lfcqybIpev8w== dependencies: "@babel/helper-environment-visitor" "^7.18.6" @@ -292,7 +292,7 @@ "@babel/plugin-proposal-class-properties@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz" integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== dependencies: "@babel/helper-create-class-features-plugin" "^7.18.6" @@ -300,7 +300,7 @@ "@babel/plugin-proposal-class-static-block@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz#8aa81d403ab72d3962fc06c26e222dacfc9b9020" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz" integrity sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw== dependencies: "@babel/helper-create-class-features-plugin" "^7.18.6" @@ -309,7 +309,7 @@ "@babel/plugin-proposal-dynamic-import@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz#72bcf8d408799f547d759298c3c27c7e7faa4d94" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz" integrity sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -317,7 +317,7 @@ "@babel/plugin-proposal-export-namespace-from@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.6.tgz#1016f0aa5ab383bbf8b3a85a2dcaedf6c8ee7491" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.6.tgz" integrity sha512-zr/QcUlUo7GPo6+X1wC98NJADqmy5QTFWWhqeQWiki4XHafJtLl/YMGkmRB2szDD2IYJCCdBTd4ElwhId9T7Xw== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -325,7 +325,7 @@ "@babel/plugin-proposal-json-strings@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz#7e8788c1811c393aff762817e7dbf1ebd0c05f0b" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz" integrity sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -333,7 +333,7 @@ "@babel/plugin-proposal-logical-assignment-operators@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.6.tgz#3b9cac6f1ffc2aa459d111df80c12020dfc6b665" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.6.tgz" integrity sha512-zMo66azZth/0tVd7gmkxOkOjs2rpHyhpcFo565PUP37hSp6hSd9uUKIfTDFMz58BwqgQKhJ9YxtM5XddjXVn+Q== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -341,7 +341,7 @@ "@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz" integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -349,7 +349,7 @@ "@babel/plugin-proposal-numeric-separator@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz#899b14fbafe87f053d2c5ff05b36029c62e13c75" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz" integrity sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -357,7 +357,7 @@ "@babel/plugin-proposal-object-rest-spread@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.6.tgz#ec93bba06bfb3e15ebd7da73e953d84b094d5daf" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.6.tgz" integrity sha512-9yuM6wr4rIsKa1wlUAbZEazkCrgw2sMPEXCr4Rnwetu7cEW1NydkCWytLuYletbf8vFxdJxFhwEZqMpOx2eZyw== dependencies: "@babel/compat-data" "^7.18.6" @@ -368,7 +368,7 @@ "@babel/plugin-proposal-optional-catch-binding@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz#f9400d0e6a3ea93ba9ef70b09e72dd6da638a2cb" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz" integrity sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -376,7 +376,7 @@ "@babel/plugin-proposal-optional-chaining@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.6.tgz#46d4f2ffc20e87fad1d98bc4fa5d466366f6aa0b" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.6.tgz" integrity sha512-PatI6elL5eMzoypFAiYDpYQyMtXTn+iMhuxxQt5mAXD4fEmKorpSI3PHd+i3JXBJN3xyA6MvJv7at23HffFHwA== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -385,7 +385,7 @@ "@babel/plugin-proposal-private-methods@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz#5209de7d213457548a98436fa2882f52f4be6bea" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz" integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA== dependencies: "@babel/helper-create-class-features-plugin" "^7.18.6" @@ -393,7 +393,7 @@ "@babel/plugin-proposal-private-property-in-object@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz#a64137b232f0aca3733a67eb1a144c192389c503" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz" integrity sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" @@ -403,7 +403,7 @@ "@babel/plugin-proposal-unicode-property-regex@^7.18.6", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz#af613d2cd5e643643b65cded64207b15c85cb78e" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz" integrity sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.18.6" @@ -411,140 +411,140 @@ "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz" integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-bigint@^7.8.3": version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz" integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-class-properties@^7.12.13", "@babel/plugin-syntax-class-properties@^7.8.3": version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== dependencies: "@babel/helper-plugin-utils" "^7.12.13" "@babel/plugin-syntax-class-static-block@^7.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz" integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-dynamic-import@^7.8.3": version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz" integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-export-namespace-from@^7.8.3": version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz" integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== dependencies: "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-import-assertions@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz#cd6190500a4fa2fe31990a963ffab4b63e4505e4" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz" integrity sha512-/DU3RXad9+bZwrgWJQKbr39gYbJpLJHezqEzRzi/BHRlJ9zsQb4CK2CA/5apllXNomwA1qHwzvHl+AdEmC5krQ== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz" integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-json-strings@^7.8.3": version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz" integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz" integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-numeric-separator@^7.10.4", "@babel/plugin-syntax-numeric-separator@^7.8.3": version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz" integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-object-rest-spread@^7.8.3": version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-optional-catch-binding@^7.8.3": version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz" integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-optional-chaining@^7.8.3": version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz" integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-private-property-in-object@^7.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz" integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-top-level-await@^7.14.5", "@babel/plugin-syntax-top-level-await@^7.8.3": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz" integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.18.6", "@babel/plugin-syntax-typescript@^7.7.2": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz#1c09cd25795c7c2b8a4ba9ae49394576d4133285" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz" integrity sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-arrow-functions@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz#19063fcf8771ec7b31d742339dac62433d0611fe" + resolved "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz" integrity sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-async-to-generator@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz#ccda3d1ab9d5ced5265fdb13f1882d5476c71615" + resolved "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz" integrity sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag== dependencies: "@babel/helper-module-imports" "^7.18.6" @@ -553,21 +553,21 @@ "@babel/plugin-transform-block-scoped-functions@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz#9187bf4ba302635b9d70d986ad70f038726216a8" + resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz" integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-block-scoping@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.6.tgz#b5f78318914615397d86a731ef2cc668796a726c" + resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.6.tgz" integrity sha512-pRqwb91C42vs1ahSAWJkxOxU1RHWDn16XAa6ggQ72wjLlWyYeAcLvTtE0aM8ph3KNydy9CQF2nLYcjq1WysgxQ== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-classes@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.6.tgz#3501a8f3f4c7d5697c27a3eedbee71d68312669f" + resolved "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.6.tgz" integrity sha512-XTg8XW/mKpzAF3actL554Jl/dOYoJtv3l8fxaEczpgz84IeeVf+T1u2CSvPHuZbt0w3JkIx4rdn/MRQI7mo0HQ== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" @@ -581,21 +581,21 @@ "@babel/plugin-transform-computed-properties@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.6.tgz#5d15eb90e22e69604f3348344c91165c5395d032" + resolved "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.6.tgz" integrity sha512-9repI4BhNrR0KenoR9vm3/cIc1tSBIo+u1WVjKCAynahj25O8zfbiE6JtAtHPGQSs4yZ+bA8mRasRP+qc+2R5A== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-destructuring@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.6.tgz#a98b0e42c7ffbf5eefcbcf33280430f230895c6f" + resolved "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.6.tgz" integrity sha512-tgy3u6lRp17ilY8r1kP4i2+HDUwxlVqq3RTc943eAWSzGgpU1qhiKpqZ5CMyHReIYPHdo3Kg8v8edKtDqSVEyQ== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-dotall-regex@^7.18.6", "@babel/plugin-transform-dotall-regex@^7.4.4": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz#b286b3e7aae6c7b861e45bed0a2fafd6b1a4fef8" + resolved "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz" integrity sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.18.6" @@ -603,14 +603,14 @@ "@babel/plugin-transform-duplicate-keys@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.6.tgz#e6c94e8cd3c9dd8a88144f7b78ae22975a7ff473" + resolved "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.6.tgz" integrity sha512-NJU26U/208+sxYszf82nmGYqVF9QN8py2HFTblPT9hbawi8+1C5a9JubODLTGFuT0qlkqVinmkwOD13s0sZktg== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-exponentiation-operator@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz#421c705f4521888c65e91fdd1af951bfefd4dacd" + resolved "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz" integrity sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw== dependencies: "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" @@ -618,14 +618,14 @@ "@babel/plugin-transform-for-of@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.6.tgz#e0fdb813be908e91ccc9ec87b30cc2eabf046f7c" + resolved "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.6.tgz" integrity sha512-WAjoMf4wIiSsy88KmG7tgj2nFdEK7E46tArVtcgED7Bkj6Fg/tG5SbvNIOKxbFS2VFgNh6+iaPswBeQZm4ox8w== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-function-name@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.6.tgz#6a7e4ae2893d336fd1b8f64c9f92276391d0f1b4" + resolved "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.6.tgz" integrity sha512-kJha/Gbs5RjzIu0CxZwf5e3aTTSlhZnHMT8zPWnJMjNpLOUgqevg+PN5oMH68nMCXnfiMo4Bhgxqj59KHTlAnA== dependencies: "@babel/helper-compilation-targets" "^7.18.6" @@ -634,21 +634,21 @@ "@babel/plugin-transform-literals@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.6.tgz#9d6af353b5209df72960baf4492722d56f39a205" + resolved "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.6.tgz" integrity sha512-x3HEw0cJZVDoENXOp20HlypIHfl0zMIhMVZEBVTfmqbObIpsMxMbmU5nOEO8R7LYT+z5RORKPlTI5Hj4OsO9/Q== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-member-expression-literals@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz#ac9fdc1a118620ac49b7e7a5d2dc177a1bfee88e" + resolved "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz" integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-modules-amd@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz#8c91f8c5115d2202f277549848874027d7172d21" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz" integrity sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg== dependencies: "@babel/helper-module-transforms" "^7.18.6" @@ -657,7 +657,7 @@ "@babel/plugin-transform-modules-commonjs@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz#afd243afba166cca69892e24a8fd8c9f2ca87883" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz" integrity sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q== dependencies: "@babel/helper-module-transforms" "^7.18.6" @@ -667,7 +667,7 @@ "@babel/plugin-transform-modules-systemjs@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.6.tgz#026511b7657d63bf5d4cf2fd4aeb963139914a54" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.6.tgz" integrity sha512-UbPYpXxLjTw6w6yXX2BYNxF3p6QY225wcTkfQCy3OMnSlS/C3xGtwUjEzGkldb/sy6PWLiCQ3NbYfjWUTI3t4g== dependencies: "@babel/helper-hoist-variables" "^7.18.6" @@ -678,7 +678,7 @@ "@babel/plugin-transform-modules-umd@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz#81d3832d6034b75b54e62821ba58f28ed0aab4b9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz" integrity sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ== dependencies: "@babel/helper-module-transforms" "^7.18.6" @@ -686,7 +686,7 @@ "@babel/plugin-transform-named-capturing-groups-regex@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz#c89bfbc7cc6805d692f3a49bc5fc1b630007246d" + resolved "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz" integrity sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.18.6" @@ -694,14 +694,14 @@ "@babel/plugin-transform-new-target@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz#d128f376ae200477f37c4ddfcc722a8a1b3246a8" + resolved "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz" integrity sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-object-super@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz#fb3c6ccdd15939b6ff7939944b51971ddc35912c" + resolved "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz" integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -709,21 +709,21 @@ "@babel/plugin-transform-parameters@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.6.tgz#cbe03d5a4c6385dd756034ac1baa63c04beab8dc" + resolved "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.6.tgz" integrity sha512-FjdqgMv37yVl/gwvzkcB+wfjRI8HQmc5EgOG9iGNvUY1ok+TjsoaMP7IqCDZBhkFcM5f3OPVMs6Dmp03C5k4/A== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-property-literals@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz#e22498903a483448e94e032e9bbb9c5ccbfc93a3" + resolved "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz" integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-regenerator@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz#585c66cb84d4b4bf72519a34cfce761b8676ca73" + resolved "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz" integrity sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -731,21 +731,21 @@ "@babel/plugin-transform-reserved-words@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz#b1abd8ebf8edaa5f7fe6bbb8d2133d23b6a6f76a" + resolved "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz" integrity sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-shorthand-properties@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz#6d6df7983d67b195289be24909e3f12a8f664dc9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz" integrity sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-spread@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.6.tgz#82b080241965f1689f0a60ecc6f1f6575dbdb9d6" + resolved "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.6.tgz" integrity sha512-ayT53rT/ENF8WWexIRg9AiV9h0aIteyWn5ptfZTZQrjk/+f3WdrJGCY4c9wcgl2+MKkKPhzbYp97FTsquZpDCw== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -753,28 +753,28 @@ "@babel/plugin-transform-sticky-regex@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz#c6706eb2b1524028e317720339583ad0f444adcc" + resolved "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz" integrity sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-template-literals@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.6.tgz#b763f4dc9d11a7cce58cf9a490d82e80547db9c2" + resolved "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.6.tgz" integrity sha512-UuqlRrQmT2SWRvahW46cGSany0uTlcj8NYOS5sRGYi8FxPYPoLd5DDmMd32ZXEj2Jq+06uGVQKHxa/hJx2EzKw== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-typeof-symbol@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.6.tgz#486bb39d5a18047358e0d04dc0d2f322f0b92e92" + resolved "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.6.tgz" integrity sha512-7m71iS/QhsPk85xSjFPovHPcH3H9qeyzsujhTc+vcdnsXavoWYJ74zx0lP5RhpC5+iDnVLO+PPMHzC11qels1g== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-typescript@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.6.tgz#8f4ade1a9cf253e5cf7c7c20173082c2c08a50a7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.6.tgz" integrity sha512-ijHNhzIrLj5lQCnI6aaNVRtGVuUZhOXFLRVFs7lLrkXTHip4FKty5oAuQdk4tywG0/WjXmjTfQCWmuzrvFer1w== dependencies: "@babel/helper-create-class-features-plugin" "^7.18.6" @@ -783,14 +783,14 @@ "@babel/plugin-transform-unicode-escapes@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.6.tgz#0d01fb7fb2243ae1c033f65f6e3b4be78db75f27" + resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.6.tgz" integrity sha512-XNRwQUXYMP7VLuy54cr/KS/WeL3AZeORhrmeZ7iewgu+X2eBqmpaLI/hzqr9ZxCeUoq0ASK4GUzSM0BDhZkLFw== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-unicode-regex@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz#194317225d8c201bbae103364ffe9e2cea36cdca" + resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz" integrity sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.18.6" @@ -798,7 +798,7 @@ "@babel/preset-env@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.18.6.tgz#953422e98a5f66bc56cd0b9074eaea127ec86ace" + resolved "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.6.tgz" integrity sha512-WrthhuIIYKrEFAwttYzgRNQ5hULGmwTj+D6l7Zdfsv5M7IWV/OZbUfbeL++Qrzx1nVJwWROIFhCHRYQV4xbPNw== dependencies: "@babel/compat-data" "^7.18.6" @@ -879,7 +879,7 @@ "@babel/preset-modules@^0.1.5": version "0.1.5" - resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.5.tgz#ef939d6e7f268827e1841638dc6ff95515e115d9" + resolved "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz" integrity sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -890,7 +890,7 @@ "@babel/preset-typescript@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz#ce64be3e63eddc44240c6358daefac17b3186399" + resolved "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz" integrity sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -899,14 +899,14 @@ "@babel/runtime@^7.8.4": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.6.tgz#6a1ef59f838debd670421f8c7f2cbb8da9751580" + resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.6.tgz" integrity sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ== dependencies: regenerator-runtime "^0.13.4" "@babel/template@^7.18.6", "@babel/template@^7.3.3": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.6.tgz#1283f4993e00b929d6e2d3c72fdc9168a2977a31" + resolved "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz" integrity sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw== dependencies: "@babel/code-frame" "^7.18.6" @@ -915,7 +915,7 @@ "@babel/traverse@^7.13.0", "@babel/traverse@^7.18.6", "@babel/traverse@^7.7.2": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.6.tgz#a228562d2f46e89258efa4ddd0416942e2fd671d" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.6.tgz" integrity sha512-zS/OKyqmD7lslOtFqbscH6gMLFYOfG1YPqCKfAW5KrTeolKqvB8UelR49Fpr6y93kYkW2Ik00mT1LOGiAGvizw== dependencies: "@babel/code-frame" "^7.18.6" @@ -931,7 +931,7 @@ "@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.18.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.18.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.7.tgz#a4a2c910c15040ea52cdd1ddb1614a65c8041726" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.18.7.tgz" integrity sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ== dependencies: "@babel/helper-validator-identifier" "^7.18.6" @@ -939,12 +939,12 @@ "@bcoe/v8-coverage@^0.2.3": version "0.2.3" - resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== "@eslint/eslintrc@^1.3.0": version "1.3.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f" + resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz" integrity sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw== dependencies: ajv "^6.12.4" @@ -959,7 +959,7 @@ "@humanwhocodes/config-array@^0.10.4": version "0.10.4" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.10.4.tgz#01e7366e57d2ad104feea63e72248f22015c520c" + resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz" integrity sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw== dependencies: "@humanwhocodes/object-schema" "^1.2.1" @@ -968,17 +968,17 @@ "@humanwhocodes/gitignore-to-minimatch@^1.0.2": version "1.0.2" - resolved "https://registry.yarnpkg.com/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz#316b0a63b91c10e53f242efb4ace5c3b34e8728d" + resolved "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz" integrity sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA== "@humanwhocodes/object-schema@^1.2.1": version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz" integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== dependencies: camelcase "^5.3.1" @@ -989,12 +989,12 @@ "@istanbuljs/schema@^0.1.2": version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== "@jest/console@^28.1.1": version "28.1.1" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-28.1.1.tgz#305f8ca50b6e70413839f54c0e002b60a0f2fd7d" + resolved "https://registry.npmjs.org/@jest/console/-/console-28.1.1.tgz" integrity sha512-0RiUocPVFEm3WRMOStIHbRWllG6iW6E3/gUPnf4lkrVFyXIIDeCe+vlKeYyFOMhB2EPE6FLFCNADSOOQMaqvyA== dependencies: "@jest/types" "^28.1.1" @@ -1006,7 +1006,7 @@ "@jest/core@^28.1.2": version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-28.1.2.tgz#eac519b9acbd154313854b8823a47b5c645f785a" + resolved "https://registry.npmjs.org/@jest/core/-/core-28.1.2.tgz" integrity sha512-Xo4E+Sb/nZODMGOPt2G3cMmCBqL4/W2Ijwr7/mrXlq4jdJwcFQ/9KrrJZT2adQRk2otVBXXOz1GRQ4Z5iOgvRQ== dependencies: "@jest/console" "^28.1.1" @@ -1041,7 +1041,7 @@ "@jest/environment@^28.1.2": version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-28.1.2.tgz#94a052c0c5f9f8c8e6d13ea6da78dbc5d7d9b85b" + resolved "https://registry.npmjs.org/@jest/environment/-/environment-28.1.2.tgz" integrity sha512-I0CR1RUMmOzd0tRpz10oUfaChBWs+/Hrvn5xYhMEF/ZqrDaaeHwS8yDBqEWCrEnkH2g+WE/6g90oBv3nKpcm8Q== dependencies: "@jest/fake-timers" "^28.1.2" @@ -1051,14 +1051,14 @@ "@jest/expect-utils@^28.1.1": version "28.1.1" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-28.1.1.tgz#d84c346025b9f6f3886d02c48a6177e2b0360587" + resolved "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.1.tgz" integrity sha512-n/ghlvdhCdMI/hTcnn4qV57kQuV9OTsZzH1TTCVARANKhl6hXJqLKUkwX69ftMGpsbpt96SsDD8n8LD2d9+FRw== dependencies: jest-get-type "^28.0.2" "@jest/expect@^28.1.2": version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-28.1.2.tgz#0b25acedff46e1e1e5606285306c8a399c12534f" + resolved "https://registry.npmjs.org/@jest/expect/-/expect-28.1.2.tgz" integrity sha512-HBzyZBeFBiOelNbBKN0pilWbbrGvwDUwAqMC46NVJmWm8AVkuE58NbG1s7DR4cxFt4U5cVLxofAoHxgvC5MyOw== dependencies: expect "^28.1.1" @@ -1066,7 +1066,7 @@ "@jest/fake-timers@^28.1.2": version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-28.1.2.tgz#d49e8ee4e02ba85a6e844a52a5e7c59c23e3b76f" + resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.2.tgz" integrity sha512-xSYEI7Y0D5FbZN2LsCUj/EKRR1zfQYmGuAUVh6xTqhx7V5JhjgMcK5Pa0iR6WIk0GXiHDe0Ke4A+yERKE9saqg== dependencies: "@jest/types" "^28.1.1" @@ -1078,7 +1078,7 @@ "@jest/globals@^28.1.2": version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-28.1.2.tgz#92fab296e337c7309c25e4202fb724f62249d83f" + resolved "https://registry.npmjs.org/@jest/globals/-/globals-28.1.2.tgz" integrity sha512-cz0lkJVDOtDaYhvT3Fv2U1B6FtBnV+OpEyJCzTHM1fdoTsU4QNLAt/H4RkiwEUU+dL4g/MFsoTuHeT2pvbo4Hg== dependencies: "@jest/environment" "^28.1.2" @@ -1087,7 +1087,7 @@ "@jest/reporters@^28.1.2": version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-28.1.2.tgz#0327be4ce4d0d9ae49e7908656f89669d0c2a260" + resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.2.tgz" integrity sha512-/whGLhiwAqeCTmQEouSigUZJPVl7sW8V26EiboImL+UyXznnr1a03/YZ2BX8OlFw0n+Zlwu+EZAITZtaeRTxyA== dependencies: "@bcoe/v8-coverage" "^0.2.3" @@ -1118,14 +1118,14 @@ "@jest/schemas@^28.0.2": version "28.0.2" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-28.0.2.tgz#08c30df6a8d07eafea0aef9fb222c5e26d72e613" + resolved "https://registry.npmjs.org/@jest/schemas/-/schemas-28.0.2.tgz" integrity sha512-YVDJZjd4izeTDkij00vHHAymNXQ6WWsdChFRK86qck6Jpr3DCL5W3Is3vslviRlP+bLuMYRLbdp98amMvqudhA== dependencies: "@sinclair/typebox" "^0.23.3" "@jest/source-map@^28.1.2": version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-28.1.2.tgz#7fe832b172b497d6663cdff6c13b0a920e139e24" + resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz" integrity sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww== dependencies: "@jridgewell/trace-mapping" "^0.3.13" @@ -1134,7 +1134,7 @@ "@jest/test-result@^28.1.1": version "28.1.1" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-28.1.1.tgz#c6f18d1bbb01aa88925dd687872a75f8414b317a" + resolved "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.1.tgz" integrity sha512-hPmkugBktqL6rRzwWAtp1JtYT4VHwv8OQ+9lE5Gymj6dHzubI/oJHMUpPOt8NrdVWSrz9S7bHjJUmv2ggFoUNQ== dependencies: "@jest/console" "^28.1.1" @@ -1144,7 +1144,7 @@ "@jest/test-sequencer@^28.1.1": version "28.1.1" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-28.1.1.tgz#f594ee2331df75000afe0d1ae3237630ecec732e" + resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.1.tgz" integrity sha512-nuL+dNSVMcWB7OOtgb0EGH5AjO4UBCt68SLP08rwmC+iRhyuJWS9MtZ/MpipxFwKAlHFftbMsydXqWre8B0+XA== dependencies: "@jest/test-result" "^28.1.1" @@ -1154,7 +1154,7 @@ "@jest/transform@^28.1.2": version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-28.1.2.tgz#b367962c53fd53821269bde050ce373e111327c1" + resolved "https://registry.npmjs.org/@jest/transform/-/transform-28.1.2.tgz" integrity sha512-3o+lKF6iweLeJFHBlMJysdaPbpoMmtbHEFsjzSv37HIq/wWt5ijTeO2Yf7MO5yyczCopD507cNwNLeX8Y/CuIg== dependencies: "@babel/core" "^7.11.6" @@ -1175,7 +1175,7 @@ "@jest/types@^28.1.1": version "28.1.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-28.1.1.tgz#d059bbc80e6da6eda9f081f293299348bd78ee0b" + resolved "https://registry.npmjs.org/@jest/types/-/types-28.1.1.tgz" integrity sha512-vRXVqSg1VhDnB8bWcmvLzmg0Bt9CRKVgHPXqYwvWMX3TvAjeO+nRuK6+VdTKCtWOvYlmkF/HqNAL/z+N3B53Kw== dependencies: "@jest/schemas" "^28.0.2" @@ -1187,7 +1187,7 @@ "@jridgewell/gen-mapping@^0.1.0": version "0.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" + resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz" integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== dependencies: "@jridgewell/set-array" "^1.0.0" @@ -1195,7 +1195,7 @@ "@jridgewell/gen-mapping@^0.3.2": version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" + resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz" integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== dependencies: "@jridgewell/set-array" "^1.0.1" @@ -1204,22 +1204,22 @@ "@jridgewell/resolve-uri@^3.0.3": version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== "@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== "@jridgewell/sourcemap-codec@^1.4.10": version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13", "@jridgewell/trace-mapping@^0.3.9": version "0.3.14" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz" integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== dependencies: "@jridgewell/resolve-uri" "^3.0.3" @@ -1227,7 +1227,7 @@ "@nodelib/fs.scandir@2.1.5": version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== dependencies: "@nodelib/fs.stat" "2.0.5" @@ -1235,12 +1235,12 @@ "@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== "@nodelib/fs.walk@^1.2.3": version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== dependencies: "@nodelib/fs.scandir" "2.1.5" @@ -1248,26 +1248,26 @@ "@sinclair/typebox@^0.23.3": version "0.23.5" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.23.5.tgz#93f7b9f4e3285a7a9ade7557d9a8d36809cbc47d" + resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.23.5.tgz" integrity sha512-AFBVi/iT4g20DHoujvMH1aEDn8fGJh4xsRGCP6d8RpLPMqsNPvW01Jcn0QysXTsg++/xj25NmJsGyH9xug/wKg== "@sinonjs/commons@^1.7.0": version "1.8.3" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" + resolved "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz" integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ== dependencies: type-detect "4.0.8" "@sinonjs/fake-timers@^9.1.2": version "9.1.2" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz#4eaab737fab77332ab132d396a3c0d364bd0ea8c" + resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz" integrity sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw== dependencies: "@sinonjs/commons" "^1.7.0" "@types/babel__core@^7.1.14": version "7.1.19" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.19.tgz#7b497495b7d1b4812bdb9d02804d0576f43ee460" + resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz" integrity sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw== dependencies: "@babel/parser" "^7.1.0" @@ -1278,14 +1278,14 @@ "@types/babel__generator@*": version "7.6.4" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.4.tgz#1f20ce4c5b1990b37900b63f050182d28c2439b7" + resolved "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz" integrity sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg== dependencies: "@babel/types" "^7.0.0" "@types/babel__template@*": version "7.4.1" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969" + resolved "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz" integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== dependencies: "@babel/parser" "^7.1.0" @@ -1293,40 +1293,40 @@ "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": version "7.17.1" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.17.1.tgz#1a0e73e8c28c7e832656db372b779bfd2ef37314" + resolved "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.17.1.tgz" integrity sha512-kVzjari1s2YVi77D3w1yuvohV2idweYXMCDzqBiVNN63TcDWrIlTVOYpqVrvbbyOE/IyzBoTKF0fdnLPEORFxA== dependencies: "@babel/types" "^7.3.0" "@types/graceful-fs@^4.1.3": version "4.1.5" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" + resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz" integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== dependencies: "@types/node" "*" "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.4" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" + resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz" integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== "@types/istanbul-lib-report@*": version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" + resolved "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz" integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== dependencies: "@types/istanbul-lib-coverage" "*" "@types/istanbul-reports@^3.0.0": version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" + resolved "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz" integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== dependencies: "@types/istanbul-lib-report" "*" "@types/jest@^28.1.4": version "28.1.4" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-28.1.4.tgz#a11ee6c8fd0b52c19c9c18138b78bbcc201dad5a" + resolved "https://registry.npmjs.org/@types/jest/-/jest-28.1.4.tgz" integrity sha512-telv6G5N7zRJiLcI3Rs3o+ipZ28EnE+7EvF0pSrt2pZOMnAVI/f+6/LucDxOvcBcTeTL3JMF744BbVQAVBUQRA== dependencies: jest-matcher-utils "^28.0.0" @@ -1334,39 +1334,39 @@ "@types/json-schema@^7.0.9": version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" + resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== -"@types/node@*", "@types/node@^18.0.3": - version "18.0.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.3.tgz#463fc47f13ec0688a33aec75d078a0541a447199" - integrity sha512-HzNRZtp4eepNitP+BD6k2L6DROIDG4Q0fm4x+dwfsr6LGmROENnok75VGw40628xf+iR24WeMFcHuuBDUAzzsQ== +"@types/node@*", "@types/node@^18.8.3": + version "18.8.3" + resolved "https://registry.npmjs.org/@types/node/-/node-18.8.3.tgz" + integrity sha512-0os9vz6BpGwxGe9LOhgP/ncvYN5Tx1fNcd2TM3rD/aCGBkysb+ZWpXEocG24h6ZzOi13+VB8HndAQFezsSOw1w== "@types/prettier@^2.1.5": version "2.6.3" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.3.tgz#68ada76827b0010d0db071f739314fa429943d0a" + resolved "https://registry.npmjs.org/@types/prettier/-/prettier-2.6.3.tgz" integrity sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg== "@types/stack-utils@^2.0.0": version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" + resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== "@types/yargs-parser@*": version "21.0.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" + resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz" integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== "@types/yargs@^17.0.8": version "17.0.10" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.10.tgz#591522fce85d8739bca7b8bb90d048e4478d186a" + resolved "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz" integrity sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA== dependencies: "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^5.32.0": version "5.32.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.32.0.tgz#e27e38cffa4a61226327c874a7be965e9a861624" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.32.0.tgz" integrity sha512-CHLuz5Uz7bHP2WgVlvoZGhf0BvFakBJKAD/43Ty0emn4wXWv5k01ND0C0fHcl/Im8Td2y/7h44E9pca9qAu2ew== dependencies: "@typescript-eslint/scope-manager" "5.32.0" @@ -1381,7 +1381,7 @@ "@typescript-eslint/parser@^5.32.0": version "5.32.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.32.0.tgz#1de243443bc6186fb153b9e395b842e46877ca5d" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.32.0.tgz" integrity sha512-IxRtsehdGV9GFQ35IGm5oKKR2OGcazUoiNBxhRV160iF9FoyuXxjY+rIqs1gfnd+4eL98OjeGnMpE7RF/NBb3A== dependencies: "@typescript-eslint/scope-manager" "5.32.0" @@ -1391,7 +1391,7 @@ "@typescript-eslint/scope-manager@5.32.0": version "5.32.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.32.0.tgz#763386e963a8def470580cc36cf9228864190b95" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.32.0.tgz" integrity sha512-KyAE+tUON0D7tNz92p1uetRqVJiiAkeluvwvZOqBmW9z2XApmk5WSMV9FrzOroAcVxJZB3GfUwVKr98Dr/OjOg== dependencies: "@typescript-eslint/types" "5.32.0" @@ -1399,7 +1399,7 @@ "@typescript-eslint/type-utils@5.32.0": version "5.32.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.32.0.tgz#45a14506fe3fb908600b4cef2f70778f7b5cdc79" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.32.0.tgz" integrity sha512-0gSsIhFDduBz3QcHJIp3qRCvVYbqzHg8D6bHFsDMrm0rURYDj+skBK2zmYebdCp+4nrd9VWd13egvhYFJj/wZg== dependencies: "@typescript-eslint/utils" "5.32.0" @@ -1408,12 +1408,12 @@ "@typescript-eslint/types@5.32.0": version "5.32.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.32.0.tgz#484273021eeeae87ddb288f39586ef5efeb6dcd8" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.32.0.tgz" integrity sha512-EBUKs68DOcT/EjGfzywp+f8wG9Zw6gj6BjWu7KV/IYllqKJFPlZlLSYw/PTvVyiRw50t6wVbgv4p9uE2h6sZrQ== "@typescript-eslint/typescript-estree@5.32.0": version "5.32.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.32.0.tgz#282943f34babf07a4afa7b0ff347a8e7b6030d12" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.32.0.tgz" integrity sha512-ZVAUkvPk3ITGtCLU5J4atCw9RTxK+SRc6hXqLtllC2sGSeMFWN+YwbiJR9CFrSFJ3w4SJfcWtDwNb/DmUIHdhg== dependencies: "@typescript-eslint/types" "5.32.0" @@ -1426,7 +1426,7 @@ "@typescript-eslint/utils@5.32.0": version "5.32.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.32.0.tgz#eccb6b672b94516f1afc6508d05173c45924840c" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.32.0.tgz" integrity sha512-W7lYIAI5Zlc5K082dGR27Fczjb3Q57ECcXefKU/f0ajM5ToM0P+N9NmJWip8GmGu/g6QISNT+K6KYB+iSHjXCQ== dependencies: "@types/json-schema" "^7.0.9" @@ -1438,7 +1438,7 @@ "@typescript-eslint/visitor-keys@5.32.0": version "5.32.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.32.0.tgz#b9715d0b11fdb5dd10fd0c42ff13987470525394" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.32.0.tgz" integrity sha512-S54xOHZgfThiZ38/ZGTgB2rqx51CMJ5MCfVT2IplK4Q7hgzGfe0nLzLCcenDnc/cSjP568hdeKfeDcBgqNHD/g== dependencies: "@typescript-eslint/types" "5.32.0" @@ -1446,17 +1446,17 @@ acorn-jsx@^5.3.2: version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn@^8.8.0: version "8.8.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz" integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: fast-deep-equal "^3.1.1" @@ -1466,38 +1466,38 @@ ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: ansi-escapes@^4.2.1: version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== dependencies: type-fest "^0.21.3" ansi-regex@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-styles@^3.2.1: version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" ansi-styles@^5.0.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== anymatch@^3.0.3: version "3.1.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz" integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== dependencies: normalize-path "^3.0.0" @@ -1505,51 +1505,51 @@ anymatch@^3.0.3: argparse@^1.0.7: version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" argparse@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== array-union@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== asn1@~0.2.3: version "0.2.6" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" + resolved "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz" integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== dependencies: safer-buffer "~2.1.0" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== asynckit@^0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== aws-sign2@~0.7.0: version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + resolved "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz" integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== aws4@^1.8.0: version "1.11.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + resolved "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== babel-jest@^28.1.2: version "28.1.2" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.2.tgz#2b37fb81439f14d34d8b2cc4a4bd7efabf9acbfe" + resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.2.tgz" integrity sha512-pfmoo6sh4L/+5/G2OOfQrGJgvH7fTa1oChnuYH2G/6gA+JwDvO8PELwvwnofKBMNrQsam0Wy/Rw+QSrBNewq2Q== dependencies: "@jest/transform" "^28.1.2" @@ -1562,14 +1562,14 @@ babel-jest@^28.1.2: babel-plugin-dynamic-import-node@^2.3.3: version "2.3.3" - resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" + resolved "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz" integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== dependencies: object.assign "^4.1.0" babel-plugin-istanbul@^6.1.1: version "6.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" + resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz" integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -1580,7 +1580,7 @@ babel-plugin-istanbul@^6.1.1: babel-plugin-jest-hoist@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.1.tgz#5e055cdcc47894f28341f87f5e35aad2df680b11" + resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.1.tgz" integrity sha512-NovGCy5Hn25uMJSAU8FaHqzs13cFoOI4lhIujiepssjCKRsAo3TA734RDWSGxuFTsUJXerYOqQQodlxgmtqbzw== dependencies: "@babel/template" "^7.3.3" @@ -1590,7 +1590,7 @@ babel-plugin-jest-hoist@^28.1.1: babel-plugin-polyfill-corejs2@^0.3.1: version "0.3.1" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz#440f1b70ccfaabc6b676d196239b138f8a2cfba5" + resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz" integrity sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w== dependencies: "@babel/compat-data" "^7.13.11" @@ -1599,7 +1599,7 @@ babel-plugin-polyfill-corejs2@^0.3.1: babel-plugin-polyfill-corejs3@^0.5.2: version "0.5.2" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz#aabe4b2fa04a6e038b688c5e55d44e78cd3a5f72" + resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz" integrity sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ== dependencies: "@babel/helper-define-polyfill-provider" "^0.3.1" @@ -1607,14 +1607,14 @@ babel-plugin-polyfill-corejs3@^0.5.2: babel-plugin-polyfill-regenerator@^0.3.1: version "0.3.1" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz#2c0678ea47c75c8cc2fbb1852278d8fb68233990" + resolved "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz" integrity sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A== dependencies: "@babel/helper-define-polyfill-provider" "^0.3.1" babel-preset-current-node-syntax@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" + resolved "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz" integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== dependencies: "@babel/plugin-syntax-async-generators" "^7.8.4" @@ -1632,7 +1632,7 @@ babel-preset-current-node-syntax@^1.0.0: babel-preset-jest@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-28.1.1.tgz#5b6e5e69f963eb2d70f739c607b8f723c0ee75e4" + resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.1.tgz" integrity sha512-FCq9Oud0ReTeWtcneYf/48981aTfXYuB9gbU4rBNNJVBSQ6ssv7E6v/qvbBxtOWwZFXjLZwpg+W3q7J6vhH25g== dependencies: babel-plugin-jest-hoist "^28.1.1" @@ -1640,19 +1640,19 @@ babel-preset-jest@^28.1.1: balanced-match@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== bcrypt-pbkdf@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + resolved "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz" integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== dependencies: tweetnacl "^0.14.3" brace-expansion@^1.1.7: version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" @@ -1660,14 +1660,14 @@ brace-expansion@^1.1.7: braces@^3.0.2: version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: fill-range "^7.0.1" browserslist@^4.20.2, browserslist@^4.21.0: version "4.21.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.1.tgz#c9b9b0a54c7607e8dc3e01a0d311727188011a00" + resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.1.tgz" integrity sha512-Nq8MFCSrnJXSc88yliwlzQe3qNe3VntIjhsArW9IJOEPSHNx23FalwApUVbzAWABLhYJJ7y8AynWI/XM8OdfjQ== dependencies: caniuse-lite "^1.0.30001359" @@ -1677,19 +1677,19 @@ browserslist@^4.20.2, browserslist@^4.21.0: bser@2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + resolved "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz" integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== dependencies: node-int64 "^0.4.0" buffer-from@^1.0.0: version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== call-bind@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== dependencies: function-bind "^1.1.1" @@ -1697,32 +1697,32 @@ call-bind@^1.0.0: callsites@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== camelcase@^5.3.1: version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== camelcase@^6.2.0: version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001359: version "1.0.30001363" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001363.tgz#26bec2d606924ba318235944e1193304ea7c4f15" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001363.tgz" integrity sha512-HpQhpzTGGPVMnCjIomjt+jvyUu8vNFo3TaDiZ/RcoTrlOq/5+tC8zHdsbgFB6MxmaY+jCpsH09aD80Bb4Ow3Sg== caseless@~0.12.0: version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== chalk@^2.0.0: version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== dependencies: ansi-styles "^3.2.1" @@ -1731,7 +1731,7 @@ chalk@^2.0.0: chalk@^4.0.0: version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" @@ -1739,22 +1739,22 @@ chalk@^4.0.0: char-regex@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" + resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== ci-info@^3.2.0: version "3.3.2" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.2.tgz#6d2967ffa407466481c6c90b6e16b3098f080128" + resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz" integrity sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg== cjs-module-lexer@^1.0.0: version "1.2.2" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" + resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz" integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== cliui@^7.0.2: version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== dependencies: string-width "^4.2.0" @@ -1763,60 +1763,60 @@ cliui@^7.0.2: co@^4.6.0: version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== collect-v8-coverage@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" + resolved "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz" integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg== color-convert@^1.9.0: version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: color-name "1.1.3" color-convert@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== dependencies: color-name "~1.1.4" color-name@1.1.3: version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== color-name@~1.1.4: version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: delayed-stream "~1.0.0" concat-map@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.8.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" + resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz" integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== dependencies: safe-buffer "~5.1.1" core-js-compat@^3.21.0, core-js-compat@^3.22.1: version "3.23.3" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.23.3.tgz#7d8503185be76bb6d8d592c291a4457a8e440aa9" + resolved "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.23.3.tgz" integrity sha512-WSzUs2h2vvmKsacLHNTdpyOC9k43AEhcGoFlVgCY4L7aw98oSBKtPL6vD0/TqZjRWRQYdDSLkzZIni4Crbbiqw== dependencies: browserslist "^4.21.0" @@ -1824,12 +1824,12 @@ core-js-compat@^3.21.0, core-js-compat@^3.22.1: core-util-is@1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== dependencies: path-key "^3.1.0" @@ -1838,43 +1838,43 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: dashdash@^1.12.0: version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + resolved "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz" integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== dependencies: assert-plus "^1.0.0" daveutils@*: version "0.4.64" - resolved "https://registry.yarnpkg.com/daveutils/-/daveutils-0.4.64.tgz#ad5bd18d9cc63ea4ec4544d1629ac5f9d328b646" + resolved "https://registry.npmjs.org/daveutils/-/daveutils-0.4.64.tgz" integrity sha512-3w41wBnC6t/0ON+MSCk7JvKEzqLkKDMXWLAlPcTVp9YTzXne6MwlgZ2Hgfv3nivIGJ+IhBeC8hD09YdSRciZGw== dependencies: request "*" debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" dedent@^0.7.0: version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" + resolved "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz" integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== deep-is@^0.1.3: version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== deepmerge@^4.2.2: version "4.2.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" + resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== define-properties@^1.1.3: version "1.1.4" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" + resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz" integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== dependencies: has-property-descriptors "^1.0.0" @@ -1882,36 +1882,36 @@ define-properties@^1.1.3: delayed-stream@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== detect-newline@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" + resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== diff-sequences@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.1.1.tgz#9989dc731266dc2903457a70e996f3a041913ac6" + resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz" integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw== dir-glob@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== dependencies: path-type "^4.0.0" doctrine@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== dependencies: esutils "^2.0.2" ecc-jsbn@~0.1.1: version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + resolved "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz" integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== dependencies: jsbn "~0.1.0" @@ -1919,49 +1919,49 @@ ecc-jsbn@~0.1.1: electron-to-chromium@^1.4.172: version "1.4.180" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.180.tgz#380b06037836055d12c7de181ee90b8ed911c3e7" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.180.tgz" integrity sha512-7at5ash3FD9U5gPa3/wPr6OdiZd/zBjvDZaaHBpcqFOFUhZiWnb7stkqk8xUFL9H9nk7Yok5vCCNK8wyC/+f8A== emittery@^0.10.2: version "0.10.2" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.2.tgz#902eec8aedb8c41938c46e9385e9db7e03182933" + resolved "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz" integrity sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw== emoji-regex@^8.0.0: version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== error-ex@^1.3.1: version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" escalade@^3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== escape-string-regexp@^1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== escape-string-regexp@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== escape-string-regexp@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== eslint-scope@^5.1.1: version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== dependencies: esrecurse "^4.3.0" @@ -1969,7 +1969,7 @@ eslint-scope@^5.1.1: eslint-scope@^7.1.1: version "7.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz" integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== dependencies: esrecurse "^4.3.0" @@ -1977,24 +1977,24 @@ eslint-scope@^7.1.1: eslint-utils@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz" integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== dependencies: eslint-visitor-keys "^2.0.0" eslint-visitor-keys@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== eslint-visitor-keys@^3.3.0: version "3.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== eslint@^8.21.0: version "8.21.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.21.0.tgz#1940a68d7e0573cef6f50037addee295ff9be9ef" + resolved "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz" integrity sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA== dependencies: "@eslint/eslintrc" "^1.3.0" @@ -2039,7 +2039,7 @@ eslint@^8.21.0: espree@^9.3.2, espree@^9.3.3: version "9.3.3" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.3.tgz#2dd37c4162bb05f433ad3c1a52ddf8a49dc08e9d" + resolved "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz" integrity sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng== dependencies: acorn "^8.8.0" @@ -2048,41 +2048,41 @@ espree@^9.3.2, espree@^9.3.3: esprima@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + resolved "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz" integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== dependencies: estraverse "^5.1.0" esrecurse@^4.3.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== dependencies: estraverse "^5.2.0" estraverse@^4.1.1: version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== esutils@^2.0.2: version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== execa@^5.0.0: version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== dependencies: cross-spawn "^7.0.3" @@ -2097,12 +2097,12 @@ execa@^5.0.0: exit@^0.1.2: version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + resolved "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz" integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== expect@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-28.1.1.tgz#ca6fff65f6517cf7220c2e805a49c19aea30b420" + resolved "https://registry.npmjs.org/expect/-/expect-28.1.1.tgz" integrity sha512-/AANEwGL0tWBwzLNOvO0yUdy2D52jVdNXppOqswC49sxMN2cPWsGCQdzuIf9tj6hHoBQzNvx75JUYuQAckPo3w== dependencies: "@jest/expect-utils" "^28.1.1" @@ -2113,27 +2113,27 @@ expect@^28.1.1: extend@~3.0.2: version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== extsprintf@1.3.0: version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz" integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== extsprintf@^1.2.0: version "1.4.1" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" + resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz" integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-glob@^3.2.9: version "3.2.11" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz" integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== dependencies: "@nodelib/fs.stat" "^2.0.2" @@ -2144,45 +2144,45 @@ fast-glob@^3.2.9: fast-json-stable-stringify@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-levenshtein@^2.0.6: version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: version "1.13.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + resolved "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz" integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== dependencies: reusify "^1.0.4" fb-watchman@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85" + resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz" integrity sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg== dependencies: bser "2.1.1" file-entry-cache@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== dependencies: flat-cache "^3.0.4" fill-range@^7.0.1: version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== dependencies: to-regex-range "^5.0.1" find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== dependencies: locate-path "^5.0.0" @@ -2190,7 +2190,7 @@ find-up@^4.0.0, find-up@^4.1.0: find-up@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== dependencies: locate-path "^6.0.0" @@ -2198,7 +2198,7 @@ find-up@^5.0.0: flat-cache@^3.0.4: version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz" integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== dependencies: flatted "^3.1.0" @@ -2206,17 +2206,17 @@ flat-cache@^3.0.4: flatted@^3.1.0: version "3.2.6" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.6.tgz#022e9218c637f9f3fc9c35ab9c9193f05add60b2" + resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz" integrity sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ== forever-agent@~0.6.1: version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + resolved "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== form-data@~2.3.2: version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + resolved "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz" integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== dependencies: asynckit "^0.4.0" @@ -2225,7 +2225,7 @@ form-data@~2.3.2: fs.realpath@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@^2.3.2: @@ -2235,27 +2235,27 @@ fsevents@^2.3.2: function-bind@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== functional-red-black-tree@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz" integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== gensync@^1.0.0-beta.2: version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== get-caller-file@^2.0.5: version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: version "1.1.2" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz" integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA== dependencies: function-bind "^1.1.1" @@ -2264,38 +2264,38 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: get-package-type@^0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== get-stream@^6.0.0: version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== getpass@^0.1.1: version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + resolved "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz" integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== dependencies: assert-plus "^1.0.0" glob-parent@^5.1.2: version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" glob-parent@^6.0.1: version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== dependencies: is-glob "^4.0.3" glob@^7.1.3, glob@^7.1.4: version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" @@ -2307,19 +2307,19 @@ glob@^7.1.3, glob@^7.1.4: globals@^11.1.0: version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globals@^13.15.0: version "13.17.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" + resolved "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz" integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== dependencies: type-fest "^0.20.2" globby@^11.1.0: version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== dependencies: array-union "^2.1.0" @@ -2331,22 +2331,22 @@ globby@^11.1.0: graceful-fs@^4.2.9: version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== grapheme-splitter@^1.0.4: version "1.0.4" - resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" + resolved "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz" integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== har-schema@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + resolved "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz" integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== har-validator@~5.1.3: version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + resolved "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz" integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== dependencies: ajv "^6.12.3" @@ -2354,41 +2354,41 @@ har-validator@~5.1.3: has-flag@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== has-flag@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== has-property-descriptors@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz" integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== dependencies: get-intrinsic "^1.1.1" has-symbols@^1.0.1, has-symbols@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== has@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== dependencies: function-bind "^1.1.1" html-escaper@^2.0.0: version "2.0.2" - resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== http-signature@~1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz" integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== dependencies: assert-plus "^1.0.0" @@ -2397,17 +2397,17 @@ http-signature@~1.2.0: human-signals@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== ignore@^5.2.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== dependencies: parent-module "^1.0.0" @@ -2415,7 +2415,7 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: import-local@^3.0.2: version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" + resolved "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz" integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== dependencies: pkg-dir "^4.2.0" @@ -2423,12 +2423,12 @@ import-local@^3.0.2: imurmurhash@^0.1.4: version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== inflight@^1.0.4: version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" @@ -2436,76 +2436,76 @@ inflight@^1.0.4: inherits@2: version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== is-arrayish@^0.2.1: version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== is-core-module@^2.9.0: version "2.9.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz" integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== dependencies: has "^1.0.3" is-extglob@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== is-fullwidth-code-point@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== is-generator-fn@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" is-number@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-stream@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== is-typedarray@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== isexe@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== isstream@~0.1.2: version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + resolved "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: version "3.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" + resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz" integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz#31d18bdd127f825dd02ea7bfdfd906f8ab840e9f" + resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz" integrity sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A== dependencies: "@babel/core" "^7.12.3" @@ -2516,7 +2516,7 @@ istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: istanbul-lib-report@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" + resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz" integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== dependencies: istanbul-lib-coverage "^3.0.0" @@ -2525,7 +2525,7 @@ istanbul-lib-report@^3.0.0: istanbul-lib-source-maps@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" + resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz" integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== dependencies: debug "^4.1.1" @@ -2534,7 +2534,7 @@ istanbul-lib-source-maps@^4.0.0: istanbul-reports@^3.1.3: version "3.1.4" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.4.tgz#1b6f068ecbc6c331040aab5741991273e609e40c" + resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz" integrity sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw== dependencies: html-escaper "^2.0.0" @@ -2542,7 +2542,7 @@ istanbul-reports@^3.1.3: jest-changed-files@^28.0.2: version "28.0.2" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-28.0.2.tgz#7d7810660a5bd043af9e9cfbe4d58adb05e91531" + resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.0.2.tgz" integrity sha512-QX9u+5I2s54ZnGoMEjiM2WeBvJR2J7w/8ZUmH2um/WLAuGAYFQcsVXY9+1YL6k0H/AGUdH8pXUAv6erDqEsvIA== dependencies: execa "^5.0.0" @@ -2550,7 +2550,7 @@ jest-changed-files@^28.0.2: jest-circus@^28.1.2: version "28.1.2" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-28.1.2.tgz#0d5a5623eccb244efe87d1edc365696e4fcf80ce" + resolved "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.2.tgz" integrity sha512-E2vdPIJG5/69EMpslFhaA46WkcrN74LI5V/cSJ59L7uS8UNoXbzTxmwhpi9XrIL3zqvMt5T0pl5k2l2u2GwBNQ== dependencies: "@jest/environment" "^28.1.2" @@ -2575,7 +2575,7 @@ jest-circus@^28.1.2: jest-cli@^28.1.2: version "28.1.2" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-28.1.2.tgz#b89012e5bad14135e71b1628b85475d3773a1bbc" + resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.2.tgz" integrity sha512-l6eoi5Do/IJUXAFL9qRmDiFpBeEJAnjJb1dcd9i/VWfVWbp3mJhuH50dNtX67Ali4Ecvt4eBkWb4hXhPHkAZTw== dependencies: "@jest/core" "^28.1.2" @@ -2593,7 +2593,7 @@ jest-cli@^28.1.2: jest-config@^28.1.2: version "28.1.2" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-28.1.2.tgz#ba00ad30caf62286c86e7c1099e915218a0ac8c6" + resolved "https://registry.npmjs.org/jest-config/-/jest-config-28.1.2.tgz" integrity sha512-g6EfeRqddVbjPVBVY4JWpUY4IvQoFRIZcv4V36QkqzE0IGhEC/VkugFeBMAeUE7PRgC8KJF0yvJNDeQRbamEVA== dependencies: "@babel/core" "^7.11.6" @@ -2621,7 +2621,7 @@ jest-config@^28.1.2: jest-diff@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-28.1.1.tgz#1a3eedfd81ae79810931c63a1d0f201b9120106c" + resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz" integrity sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg== dependencies: chalk "^4.0.0" @@ -2631,14 +2631,14 @@ jest-diff@^28.1.1: jest-docblock@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-28.1.1.tgz#6f515c3bf841516d82ecd57a62eed9204c2f42a8" + resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz" integrity sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA== dependencies: detect-newline "^3.0.0" jest-each@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-28.1.1.tgz#ba5238dacf4f31d9fe23ddc2c44c01e7c23885c4" + resolved "https://registry.npmjs.org/jest-each/-/jest-each-28.1.1.tgz" integrity sha512-A042rqh17ZvEhRceDMi784ppoXR7MWGDEKTXEZXb4svt0eShMZvijGxzKsx+yIjeE8QYmHPrnHiTSQVhN4nqaw== dependencies: "@jest/types" "^28.1.1" @@ -2649,7 +2649,7 @@ jest-each@^28.1.1: jest-environment-node@^28.1.2: version "28.1.2" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-28.1.2.tgz#3e2eb47f6d173b0648d5f7c717cb1c26651d5c8a" + resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.2.tgz" integrity sha512-oYsZz9Qw27XKmOgTtnl0jW7VplJkN2oeof+SwAwKFQacq3CLlG9u4kTGuuLWfvu3J7bVutWlrbEQMOCL/jughw== dependencies: "@jest/environment" "^28.1.2" @@ -2661,12 +2661,12 @@ jest-environment-node@^28.1.2: jest-get-type@^28.0.2: version "28.0.2" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-28.0.2.tgz#34622e628e4fdcd793d46db8a242227901fcf203" + resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz" integrity sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA== jest-haste-map@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-28.1.1.tgz#471685f1acd365a9394745bb97c8fc16289adca3" + resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.1.tgz" integrity sha512-ZrRSE2o3Ezh7sb1KmeLEZRZ4mgufbrMwolcFHNRSjKZhpLa8TdooXOOFlSwoUzlbVs1t0l7upVRW2K7RWGHzbQ== dependencies: "@jest/types" "^28.1.1" @@ -2685,7 +2685,7 @@ jest-haste-map@^28.1.1: jest-leak-detector@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-28.1.1.tgz#537f37afd610a4b3f4cab15e06baf60484548efb" + resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.1.tgz" integrity sha512-4jvs8V8kLbAaotE+wFR7vfUGf603cwYtFf1/PYEsyX2BAjSzj8hQSVTP6OWzseTl0xL6dyHuKs2JAks7Pfubmw== dependencies: jest-get-type "^28.0.2" @@ -2693,7 +2693,7 @@ jest-leak-detector@^28.1.1: jest-matcher-utils@^28.0.0, jest-matcher-utils@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz#a7c4653c2b782ec96796eb3088060720f1e29304" + resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz" integrity sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw== dependencies: chalk "^4.0.0" @@ -2703,7 +2703,7 @@ jest-matcher-utils@^28.0.0, jest-matcher-utils@^28.1.1: jest-message-util@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-28.1.1.tgz#60aa0b475cfc08c8a9363ed2fb9108514dd9ab89" + resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.1.tgz" integrity sha512-xoDOOT66fLfmTRiqkoLIU7v42mal/SqwDKvfmfiWAdJMSJiU+ozgluO7KbvoAgiwIrrGZsV7viETjc8GNrA/IQ== dependencies: "@babel/code-frame" "^7.12.13" @@ -2718,7 +2718,7 @@ jest-message-util@^28.1.1: jest-mock@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-28.1.1.tgz#37903d269427fa1ef5b2447be874e1c62a39a371" + resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.1.tgz" integrity sha512-bDCb0FjfsmKweAvE09dZT59IMkzgN0fYBH6t5S45NoJfd2DHkS3ySG2K+hucortryhO3fVuXdlxWcbtIuV/Skw== dependencies: "@jest/types" "^28.1.1" @@ -2726,17 +2726,17 @@ jest-mock@^28.1.1: jest-pnp-resolver@^1.2.2: version "1.2.2" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" + resolved "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz" integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== jest-regex-util@^28.0.2: version "28.0.2" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-28.0.2.tgz#afdc377a3b25fb6e80825adcf76c854e5bf47ead" + resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz" integrity sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw== jest-resolve-dependencies@^28.1.2: version "28.1.2" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.2.tgz#ca528858e0c6642d5a1dda8fc7cda10230c275bc" + resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.2.tgz" integrity sha512-OXw4vbOZuyRTBi3tapWBqdyodU+T33ww5cPZORuTWkg+Y8lmsxQlVu3MWtJh6NMlKRTHQetF96yGPv01Ye7Mbg== dependencies: jest-regex-util "^28.0.2" @@ -2744,7 +2744,7 @@ jest-resolve-dependencies@^28.1.2: jest-resolve@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-28.1.1.tgz#bc2eaf384abdcc1aaf3ba7c50d1adf01e59095e5" + resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.1.tgz" integrity sha512-/d1UbyUkf9nvsgdBildLe6LAD4DalgkgZcKd0nZ8XUGPyA/7fsnaQIlKVnDiuUXv/IeZhPEDrRJubVSulxrShA== dependencies: chalk "^4.0.0" @@ -2759,7 +2759,7 @@ jest-resolve@^28.1.1: jest-runner@^28.1.2: version "28.1.2" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-28.1.2.tgz#f293409592a62234285a71237e38499a3554e350" + resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.2.tgz" integrity sha512-6/k3DlAsAEr5VcptCMdhtRhOoYClZQmxnVMZvZ/quvPGRpN7OBQYPIC32tWSgOnbgqLXNs5RAniC+nkdFZpD4A== dependencies: "@jest/console" "^28.1.1" @@ -2786,7 +2786,7 @@ jest-runner@^28.1.2: jest-runtime@^28.1.2: version "28.1.2" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-28.1.2.tgz#d68f34f814a848555a345ceda23289f14d59a688" + resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.2.tgz" integrity sha512-i4w93OsWzLOeMXSi9epmakb2+3z0AchZtUQVF1hesBmcQQy4vtaql5YdVe9KexdJaVRyPDw8DoBR0j3lYsZVYw== dependencies: "@jest/environment" "^28.1.2" @@ -2814,7 +2814,7 @@ jest-runtime@^28.1.2: jest-snapshot@^28.1.2: version "28.1.2" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-28.1.2.tgz#93d31b87b11b384f5946fe0767541496135f8d52" + resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.2.tgz" integrity sha512-wzrieFttZYfLvrCVRJxX+jwML2YTArOUqFpCoSVy1QUapx+LlV9uLbV/mMEhYj4t7aMeE9aSQFHSvV/oNoDAMA== dependencies: "@babel/core" "^7.11.6" @@ -2843,7 +2843,7 @@ jest-snapshot@^28.1.2: jest-util@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-28.1.1.tgz#ff39e436a1aca397c0ab998db5a51ae2b7080d05" + resolved "https://registry.npmjs.org/jest-util/-/jest-util-28.1.1.tgz" integrity sha512-FktOu7ca1DZSyhPAxgxB6hfh2+9zMoJ7aEQA759Z6p45NuO8mWcqujH+UdHlCm/V6JTWwDztM2ITCzU1ijJAfw== dependencies: "@jest/types" "^28.1.1" @@ -2855,7 +2855,7 @@ jest-util@^28.1.1: jest-validate@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-28.1.1.tgz#59b7b339b3c85b5144bd0c06ad3600f503a4acc8" + resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.1.tgz" integrity sha512-Kpf6gcClqFCIZ4ti5++XemYJWUPCFUW+N2gknn+KgnDf549iLul3cBuKVe1YcWRlaF8tZV8eJCap0eECOEE3Ug== dependencies: "@jest/types" "^28.1.1" @@ -2867,7 +2867,7 @@ jest-validate@^28.1.1: jest-watcher@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-28.1.1.tgz#533597fb3bfefd52b5cd115cd916cffd237fb60c" + resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.1.tgz" integrity sha512-RQIpeZ8EIJMxbQrXpJQYIIlubBnB9imEHsxxE41f54ZwcqWLysL/A0ZcdMirf+XsMn3xfphVQVV4EW0/p7i7Ug== dependencies: "@jest/test-result" "^28.1.1" @@ -2881,7 +2881,7 @@ jest-watcher@^28.1.1: jest-worker@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-28.1.1.tgz#3480c73247171dfd01eda77200f0063ab6a3bf28" + resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.1.tgz" integrity sha512-Au7slXB08C6h+xbJPp7VIb6U0XX5Kc9uel/WFc6/rcTzGiaVCBRngBExSYuXSLFPULPSYU3cJ3ybS988lNFQhQ== dependencies: "@types/node" "*" @@ -2890,7 +2890,7 @@ jest-worker@^28.1.1: jest@^28.1.2: version "28.1.2" - resolved "https://registry.yarnpkg.com/jest/-/jest-28.1.2.tgz#451ff24081ce31ca00b07b60c61add13aa96f8eb" + resolved "https://registry.npmjs.org/jest/-/jest-28.1.2.tgz" integrity sha512-Tuf05DwLeCh2cfWCQbcz9UxldoDyiR1E9Igaei5khjonKncYdc6LDfynKCEWozK0oLE3GD+xKAo2u8x/0s6GOg== dependencies: "@jest/core" "^28.1.2" @@ -2900,12 +2900,12 @@ jest@^28.1.2: js-tokens@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" @@ -2913,59 +2913,59 @@ js-yaml@^3.13.1: js-yaml@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" jsbn@~0.1.0: version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== jsesc@^2.5.1: version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== jsesc@~0.5.0: version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + resolved "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz" integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== json-parse-even-better-errors@^2.3.0: version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== json-schema-traverse@^0.4.1: version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-schema@0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" + resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz" integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== json-stringify-safe@~5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== json5@^2.2.1: version "2.2.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" + resolved "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz" integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== jsprim@^1.2.2: version "1.4.2" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" + resolved "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz" integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== dependencies: assert-plus "1.0.0" @@ -2975,17 +2975,17 @@ jsprim@^1.2.2: kleur@^3.0.3: version "3.0.3" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== leven@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + resolved "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== levn@^0.4.1: version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== dependencies: prelude-ls "^1.2.1" @@ -2993,67 +2993,67 @@ levn@^0.4.1: lines-and-columns@^1.1.6: version "1.2.4" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== locate-path@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== dependencies: p-locate "^4.1.0" locate-path@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== dependencies: p-locate "^5.0.0" lodash.debounce@^4.0.8: version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + resolved "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz" integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== lodash.merge@^4.6.2: version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== lru-cache@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== dependencies: yallist "^4.0.0" make-dir@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + resolved "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== dependencies: semver "^6.0.0" makeerror@1.0.12: version "1.0.12" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" + resolved "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz" integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== dependencies: tmpl "1.0.5" merge-stream@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== micromatch@^4.0.4: version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== dependencies: braces "^3.0.2" @@ -3061,73 +3061,73 @@ micromatch@^4.0.4: mime-db@1.52.0: version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-types@^2.1.12, mime-types@~2.1.19: version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" mimic-fn@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" ms@2.1.2: version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== natural-compare@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== node-int64@^0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== node-releases@^2.0.5: version "2.0.5" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.5.tgz#280ed5bc3eba0d96ce44897d8aee478bfb3d9666" + resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.5.tgz" integrity sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q== normalize-path@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== npm-run-path@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== dependencies: path-key "^3.0.0" oauth-sign@~0.9.0: version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + resolved "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== object-keys@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== object.assign@^4.1.0: version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz" integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== dependencies: call-bind "^1.0.0" @@ -3137,21 +3137,21 @@ object.assign@^4.1.0: once@^1.3.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" onetime@^5.1.2: version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== dependencies: mimic-fn "^2.1.0" opml@^0.4.24: version "0.4.24" - resolved "https://registry.yarnpkg.com/opml/-/opml-0.4.24.tgz#bf8779dd89dc9e69967f472be62132d3788a92fa" + resolved "https://registry.npmjs.org/opml/-/opml-0.4.24.tgz" integrity sha512-erqjZzWaSNiu2T3x2aRqNZCGj8d23LbGuk4NSHN0DezVX6DrAzOfa71nm4CstSpK+DGUW15M8JsR2/0jivZR2Q== dependencies: daveutils "*" @@ -3161,7 +3161,7 @@ opml@^0.4.24: opmltojs@*: version "0.4.12" - resolved "https://registry.yarnpkg.com/opmltojs/-/opmltojs-0.4.12.tgz#f83ad3ad47c13791665fdda8109ebdb21c2c514e" + resolved "https://registry.npmjs.org/opmltojs/-/opmltojs-0.4.12.tgz" integrity sha512-7Up14sOqzrAvSIdbU0PUApIf9cY+olzooaWKo4bfe/gQv6QNy7hmy9+z7OtJhs6wCQmVt4uxTxu4+cteYEdHTg== dependencies: daveutils "*" @@ -3170,7 +3170,7 @@ opmltojs@*: optionator@^0.9.1: version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz" integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== dependencies: deep-is "^0.1.3" @@ -3182,47 +3182,47 @@ optionator@^0.9.1: p-limit@^2.2.0: version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" p-limit@^3.0.2: version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: yocto-queue "^0.1.0" p-locate@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== dependencies: p-limit "^2.2.0" p-locate@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== dependencies: p-limit "^3.0.2" p-try@^2.0.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== parent-module@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: callsites "^3.0.0" parse-json@^5.2.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" @@ -3232,69 +3232,69 @@ parse-json@^5.2.0: path-exists@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== path-is-absolute@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.7: version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-type@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== performance-now@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== picocolors@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== pirates@^4.0.4: version "4.0.5" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" + resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz" integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== pkg-dir@^4.2.0: version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== dependencies: find-up "^4.0.0" prelude-ls@^1.2.1: version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== prettier@^2.7.1: version "2.7.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" + resolved "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== pretty-format@^28.0.0, pretty-format@^28.1.1: version "28.1.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-28.1.1.tgz#f731530394e0f7fcd95aba6b43c50e02d86b95cb" + resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz" integrity sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw== dependencies: "@jest/schemas" "^28.0.2" @@ -3304,7 +3304,7 @@ pretty-format@^28.0.0, pretty-format@^28.1.1: prompts@^2.0.1: version "2.4.2" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + resolved "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz" integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== dependencies: kleur "^3.0.3" @@ -3312,61 +3312,61 @@ prompts@^2.0.1: psl@^1.1.28: version "1.9.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" + resolved "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== qs@~6.5.2: version "6.5.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" + resolved "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz" integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== queue-microtask@^1.2.2: version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== react-is@^18.0.0: version "18.2.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" + resolved "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== regenerate-unicode-properties@^10.0.1: version "10.0.1" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz#7f442732aa7934a3740c779bb9b3340dccc1fb56" + resolved "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz" integrity sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw== dependencies: regenerate "^1.4.2" regenerate@^1.4.2: version "1.4.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" + resolved "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== regenerator-runtime@^0.13.4: version "0.13.9" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz" integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== regenerator-transform@^0.15.0: version "0.15.0" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.0.tgz#cbd9ead5d77fae1a48d957cf889ad0586adb6537" + resolved "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.0.tgz" integrity sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg== dependencies: "@babel/runtime" "^7.8.4" regexpp@^3.2.0: version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== regexpu-core@^5.1.0: version "5.1.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.1.0.tgz#2f8504c3fd0ebe11215783a41541e21c79942c6d" + resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.1.0.tgz" integrity sha512-bb6hk+xWd2PEOkj5It46A16zFMs2mv86Iwpdu94la4S3sJ7C973h2dHpYKwIBGaWSO7cIRJ+UX0IeMaWcO4qwA== dependencies: regenerate "^1.4.2" @@ -3378,19 +3378,19 @@ regexpu-core@^5.1.0: regjsgen@^0.6.0: version "0.6.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.6.0.tgz#83414c5354afd7d6627b16af5f10f41c4e71808d" + resolved "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz" integrity sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA== regjsparser@^0.8.2: version "0.8.4" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.8.4.tgz#8a14285ffcc5de78c5b95d62bbf413b6bc132d5f" + resolved "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz" integrity sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA== dependencies: jsesc "~0.5.0" request@*: version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + resolved "https://registry.npmjs.org/request/-/request-2.88.2.tgz" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== dependencies: aws-sign2 "~0.7.0" @@ -3416,34 +3416,34 @@ request@*: require-directory@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== resolve-cwd@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + resolved "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz" integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== dependencies: resolve-from "^5.0.0" resolve-from@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== resolve-from@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== resolve.exports@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" + resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz" integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== resolve@^1.14.2, resolve@^1.20.0: version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== dependencies: is-core-module "^2.9.0" @@ -3452,90 +3452,90 @@ resolve@^1.14.2, resolve@^1.20.0: reusify@^1.0.4: version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" run-parallel@^1.1.9: version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== dependencies: queue-microtask "^1.2.2" safe-buffer@^5.0.1, safe-buffer@^5.1.2: version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== safe-buffer@~5.1.1: version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== sax@>=0.6.0: version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + resolved "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== semver@7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" + resolved "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== semver@^7.3.5, semver@^7.3.7: version "7.3.7" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz" integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== dependencies: lru-cache "^6.0.0" shebang-command@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== dependencies: shebang-regex "^3.0.0" shebang-regex@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== sisteransi@^1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== slash@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== source-map-support@0.5.13: version "0.5.13" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== dependencies: buffer-from "^1.0.0" @@ -3543,17 +3543,17 @@ source-map-support@0.5.13: source-map@^0.6.0, source-map@^0.6.1: version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== sprintf-js@~1.0.2: version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== sshpk@^1.7.0: version "1.17.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" + resolved "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz" integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== dependencies: asn1 "~0.2.3" @@ -3568,14 +3568,14 @@ sshpk@^1.7.0: stack-utils@^2.0.3: version "2.0.5" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.5.tgz#d25265fca995154659dbbfba3b49254778d2fdd5" + resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz" integrity sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA== dependencies: escape-string-regexp "^2.0.0" string-length@^4.0.1: version "4.0.2" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" + resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== dependencies: char-regex "^1.0.2" @@ -3583,7 +3583,7 @@ string-length@^4.0.1: string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: emoji-regex "^8.0.0" @@ -3592,50 +3592,50 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: ansi-regex "^5.0.1" strip-bom@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== strip-final-newline@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== supports-color@^5.3.0: version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== dependencies: has-flag "^3.0.0" supports-color@^7.0.0, supports-color@^7.1.0: version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" supports-color@^8.0.0: version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: has-flag "^4.0.0" supports-hyperlinks@^2.0.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb" + resolved "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz" integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ== dependencies: has-flag "^4.0.0" @@ -3643,12 +3643,12 @@ supports-hyperlinks@^2.0.0: supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== terminal-link@^2.0.0: version "2.1.1" - resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" + resolved "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz" integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== dependencies: ansi-escapes "^4.2.1" @@ -3656,7 +3656,7 @@ terminal-link@^2.0.0: test-exclude@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== dependencies: "@istanbuljs/schema" "^0.1.2" @@ -3665,34 +3665,34 @@ test-exclude@^6.0.0: text-table@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== throat@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.1.tgz#d514fedad95740c12c2d7fc70ea863eb51ade375" + resolved "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz" integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w== tmpl@1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" + resolved "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz" integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== to-fast-properties@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== to-regex-range@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== dependencies: is-number "^7.0.0" tough-cookie@~2.5.0: version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz" integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== dependencies: psl "^1.1.28" @@ -3700,63 +3700,63 @@ tough-cookie@~2.5.0: tslib@^1.8.1: version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tsutils@^3.21.0: version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz" integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== dependencies: tslib "^1.8.1" tunnel-agent@^0.6.0: version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + resolved "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz" integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== dependencies: safe-buffer "^5.0.1" tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== dependencies: prelude-ls "^1.2.1" type-detect@4.0.8: version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== type-fest@^0.20.2: version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== type-fest@^0.21.3: version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== typescript@^4.7.4: version "4.7.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" + resolved "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz" integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" + resolved "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz" integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== unicode-match-property-ecmascript@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" + resolved "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz" integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== dependencies: unicode-canonical-property-names-ecmascript "^2.0.0" @@ -3764,17 +3764,17 @@ unicode-match-property-ecmascript@^2.0.0: unicode-match-property-value-ecmascript@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz#1a01aa57247c14c568b89775a54938788189a714" + resolved "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz" integrity sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw== unicode-property-aliases-ecmascript@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz#0a36cb9a585c4f6abd51ad1deddb285c165297c8" + resolved "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz" integrity sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ== update-browserslist-db@^1.0.4: version "1.0.4" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz#dbfc5a789caa26b1db8990796c2c8ebbce304824" + resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz" integrity sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA== dependencies: escalade "^3.1.1" @@ -3782,24 +3782,24 @@ update-browserslist-db@^1.0.4: uri-js@^4.2.2: version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" uuid@^3.3.2: version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + resolved "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== v8-compile-cache@^2.0.3: version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" + resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== v8-to-istanbul@^9.0.1: version "9.0.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz#b6f994b0b5d4ef255e17a0d17dc444a9f5132fa4" + resolved "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz" integrity sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w== dependencies: "@jridgewell/trace-mapping" "^0.3.12" @@ -3808,7 +3808,7 @@ v8-to-istanbul@^9.0.1: verror@1.10.0: version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + resolved "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz" integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== dependencies: assert-plus "^1.0.0" @@ -3817,26 +3817,26 @@ verror@1.10.0: walker@^1.0.8: version "1.0.8" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" + resolved "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz" integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== dependencies: makeerror "1.0.12" which@^2.0.1: version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" word-wrap@^1.2.3: version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== wrap-ansi@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: ansi-styles "^4.0.0" @@ -3845,12 +3845,12 @@ wrap-ansi@^7.0.0: wrappy@1: version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== write-file-atomic@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.1.tgz#9faa33a964c1c85ff6f849b80b42a88c2c537c8f" + resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz" integrity sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ== dependencies: imurmurhash "^0.1.4" @@ -3858,7 +3858,7 @@ write-file-atomic@^4.0.1: xml2js@*: version "0.4.23" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66" + resolved "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz" integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug== dependencies: sax ">=0.6.0" @@ -3866,27 +3866,27 @@ xml2js@*: xmlbuilder@~11.0.0: version "11.0.1" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" + resolved "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz" integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== y18n@^5.0.5: version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== yallist@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== yargs-parser@^21.0.0: version "21.0.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz" integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== yargs@^17.3.1: version "17.5.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" + resolved "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz" integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== dependencies: cliui "^7.0.2" @@ -3899,5 +3899,5 @@ yargs@^17.3.1: yocto-queue@^0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From 15549ee2bd38f7f995ea360e8f1b4d2fefb74914 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sun, 9 Oct 2022 12:07:13 +0200 Subject: [PATCH 22/94] exclude github and obsidian folders --- src/converters/obsidian/vault.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/converters/obsidian/vault.ts b/src/converters/obsidian/vault.ts index 36418bf..57fc5fa 100644 --- a/src/converters/obsidian/vault.ts +++ b/src/converters/obsidian/vault.ts @@ -29,7 +29,7 @@ export function handleVault( for (let index = 0; index < dirents.length; index++) { const dirent = dirents[index]; const res = resolve(dir, dirent.name); - if (dirent.isDirectory()) { + if (dirent.isDirectory() && !res.endsWith('.github') && !res.endsWith('.obsidian')) { handleVault(res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents)); } else if (res.endsWith('.md')) { handleFile(res, getChildrenPosition(index, dirents)); From ab9f82791be0fd1b0b1faf9eb4d708f0fcd4043d Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sun, 9 Oct 2022 22:54:59 +0200 Subject: [PATCH 23/94] image link extraction utils --- src/converters/obsidian/extractImageLinks.ts | 69 +++++++++++++++++++ .../obsidian/tests/extractImageLinks.test.ts | 63 +++++++++++++++++ 2 files changed, 132 insertions(+) create mode 100644 src/converters/obsidian/extractImageLinks.ts create mode 100644 src/converters/obsidian/tests/extractImageLinks.test.ts diff --git a/src/converters/obsidian/extractImageLinks.ts b/src/converters/obsidian/extractImageLinks.ts new file mode 100644 index 0000000..77bd10b --- /dev/null +++ b/src/converters/obsidian/extractImageLinks.ts @@ -0,0 +1,69 @@ +export function extractImageLinks(content: string) { + const imageData = []; + let foundData = extractImageLink(content, 0); + while (foundData !== null) { + let nextIndex; + if (Array.isArray(foundData)) { + imageData.push(foundData); + nextIndex = foundData[2]; + } else { + nextIndex = foundData; + } + foundData = extractImageLink(content, nextIndex); + } + return imageData; +} + +/** + * + * Extracts an image-link alt text and link by checking for the ![...](http://...|https://...) pattern manually. + */ +function extractImageLink(content: string, startPositon: number): [string, string, number] | number | null { + let lastFoundImageSignifier; + let altText = ''; + let link = ''; + + for (let index = startPositon; index < content.length; index++) { + const char = content[index]; + if (char === '\n') { + return index + 1; + } + //I will atone for my sins, but you are not making me try to do this with RegEx + if (!lastFoundImageSignifier && char === '!') { + lastFoundImageSignifier = char; + continue; + } + if (lastFoundImageSignifier === '!' && char === '[') { + lastFoundImageSignifier = char; + continue; + } + if (lastFoundImageSignifier === '[' && char !== ']') { + altText += char; + continue; + } + if (lastFoundImageSignifier === '[' && char === ']') { + lastFoundImageSignifier = char; + continue; + } + if (lastFoundImageSignifier === ']' && char !== '(') { + return index + 1; + } + if (lastFoundImageSignifier === ']' && char === '(') { + lastFoundImageSignifier = char; + continue; + } + if (lastFoundImageSignifier === '(' && char !== ')') { + link += char; + continue; + } + if (lastFoundImageSignifier === '(' && char === ')') { + if (link.startsWith('http://') || link.startsWith('https://')) { + return [altText, link, index + 1]; + } else { + return index + 1; + } + } + } + + return null; +} diff --git a/src/converters/obsidian/tests/extractImageLinks.test.ts b/src/converters/obsidian/tests/extractImageLinks.test.ts new file mode 100644 index 0000000..cf47456 --- /dev/null +++ b/src/converters/obsidian/tests/extractImageLinks.test.ts @@ -0,0 +1,63 @@ +import { expect, test } from '@jest/globals'; +import { extractImageLinks } from '../extractImageLinks'; + +test('extractImageLinks test', () => { + const noLinks = [ + '', + ' ', + 'no links here\nand here', + '![this is invalid](because it does not end ![but we start another link and try to end the first one)', + '![this is a link](without an URL)', + '![this is a link](without an URL) ![this is two links](httpp://without an URL)', + //we accept image links with technically invalid characters in them (like []) because why not as long as the urls work, but a linebreak should really be considered invalid + '![\nthis is a link with a linebreak](https://test)', + '![this is a link with a linebreak\n](https://test)', + '![this is a link with a\nlinebreak](https://test)', + '![this is a link with a linebreak](https://\ntest)', + '![this is a link with a linebreak](https://test\n)', + ]; + noLinks.forEach((content) => expect(extractImageLinks(content)).toStrictEqual([])); + + expect(extractImageLinks('![test](http://test)')).toStrictEqual([ + ['test', 'http://test', '![test](http://test)'.length], + ]); + + expect(extractImageLinks('some text ![test](http://test)')).toStrictEqual([ + ['test', 'http://test', 'some text ![test](http://test)'.length], + ]); + + expect(extractImageLinks('some text\n ![test](http://test)')).toStrictEqual([ + ['test', 'http://test', 'some text\n ![test](http://test)'.length], + ]); + + expect(extractImageLinks('![test](http://test) some text')).toStrictEqual([ + ['test', 'http://test', '![test](http://test)'.length], + ]); + + expect(extractImageLinks('![test](http://test) ![test2](https://test2)')).toStrictEqual([ + ['test', 'http://test', '![test](http://test)'.length], + ['test2', 'https://test2', '![test](http://test) ![test2](https://test2)'.length], + ]); + + expect(extractImageLinks('some text ![test](http://test) ![test2](https://test2)')).toStrictEqual([ + ['test', 'http://test', 'some text ![test](http://test)'.length], + ['test2', 'https://test2', 'some text ![test](http://test) ![test2](https://test2)'.length], + ]); + + expect(extractImageLinks('some text ![test](http://test) ![test2](https://test2) some text')).toStrictEqual([ + ['test', 'http://test', 'some text ![test](http://test)'.length], + ['test2', 'https://test2', 'some text ![test](http://test) ![test2](https://test2)'.length], + ]); + + expect(extractImageLinks('![test](http://test) some text ![test2](https://test2)')).toStrictEqual([ + ['test', 'http://test', '![test](http://test)'.length], + ['test2', 'https://test2', '![test](http://test) some text ![test2](https://test2)'.length], + ]); + + expect(extractImageLinks('some text ![test](http://test) some text ![test2](https://test2) some text')).toStrictEqual( + [ + ['test', 'http://test', 'some text ![test](http://test)'.length], + ['test2', 'https://test2', 'some text ![test](http://test) some text ![test2](https://test2)'.length], + ], + ); +}); From 235c17dc5ae58b2a976fabc9c61e6c79817d00f0 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sun, 9 Oct 2022 23:26:32 +0200 Subject: [PATCH 24/94] conversion of Obsidian Markdown Images with URLs --- .../obsidian/ObsidianSingleFileConverter.ts | 2 +- .../obsidian/convertMarkdownNode.ts | 39 ++++++++++ src/converters/obsidian/extractImageLinks.ts | 3 +- ...de.test.ts => convertMarkdownNode.test.ts} | 52 +++++-------- .../obsidian/tests/fixtures/full.tif.json | 72 +++++++++++++++++- .../obsidian/tests/fixtures/single.tif.json | 74 ++++++++++++++++++- .../obsidian/tests/fixtures/vault/test.md | 8 ++ 7 files changed, 208 insertions(+), 42 deletions(-) rename src/converters/obsidian/tests/{convertMarkdownNodeToTanaNode.test.ts => convertMarkdownNode.test.ts} (80%) diff --git a/src/converters/obsidian/ObsidianSingleFileConverter.ts b/src/converters/obsidian/ObsidianSingleFileConverter.ts index 73af3bb..b3f2ff9 100644 --- a/src/converters/obsidian/ObsidianSingleFileConverter.ts +++ b/src/converters/obsidian/ObsidianSingleFileConverter.ts @@ -17,7 +17,7 @@ export function ObsidianSingleFileConverter( vaultContext.summary.topLevelNodes++; //by definition all heading links to other files are invalid because we only process one file - //TODO: support for same file-links + //TODO: support for same file-links, but honestly a single file converter does not make so much sense in the context of obsidian, might remove it const missingHeadingLinks = Array.from(vaultContext.headingLinkTracker.entries()) .filter((entry) => entry[0] !== fileName)?.[0]?.[1] .map((headingLink) => ({ uid: headingLink.uid, link: headingLink.link.join('#') })); diff --git a/src/converters/obsidian/convertMarkdownNode.ts b/src/converters/obsidian/convertMarkdownNode.ts index 2f74828..efa39cd 100644 --- a/src/converters/obsidian/convertMarkdownNode.ts +++ b/src/converters/obsidian/convertMarkdownNode.ts @@ -1,5 +1,6 @@ import { NodeType, TanaIntermediateNode } from '../../types/types'; import { getBracketLinks } from '../../utils/utils'; +import { extractImageLinks } from './extractImageLinks'; import { MarkdownNode } from './extractMarkdownNodes'; import { UidRequestType, VaultContext } from './VaultContext'; @@ -42,5 +43,43 @@ export function convertMarkdownNode( tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', '[[' + linkUid + ']]'); } + handleImages(tanaNode, today, vaultContext); + return tanaNode; } + +function handleImages(tanaNode: TanaIntermediateNode, today: number, vaultContext: VaultContext) { + const imageData = extractImageLinks(tanaNode.name); + if (imageData.length === 0) { + return; + } + if (imageData.length === 1) { + const image = imageData[0]; + tanaNode.type = 'image'; + tanaNode.mediaUrl = image[1].trim(); + tanaNode.name = tanaNode.name.replace('![' + image[0] + '](' + image[1] + ')', image[0].trim()); + return; + } + + //more than one image means we add them as child nodes + const childImageNodes: TanaIntermediateNode[] = []; + + imageData.forEach((image) => { + //filter out duplicate image uses + if (childImageNodes.every((node) => image[0].trim() !== node.name || image[1].trim() !== node.mediaUrl)) { + const oldLink = '![' + image[0] + '](' + image[1] + ')'; + const uid = vaultContext.randomUid(); + tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]'); + childImageNodes.push({ + uid, + name: image[0].trim(), //alt text + createdAt: today, + editedAt: today, + type: 'image' as NodeType, + mediaUrl: image[1].trim(), + }); + } + }); + + tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes]; +} diff --git a/src/converters/obsidian/extractImageLinks.ts b/src/converters/obsidian/extractImageLinks.ts index 77bd10b..f3c1c80 100644 --- a/src/converters/obsidian/extractImageLinks.ts +++ b/src/converters/obsidian/extractImageLinks.ts @@ -1,5 +1,5 @@ export function extractImageLinks(content: string) { - const imageData = []; + const imageData: [string, string, number][] = []; let foundData = extractImageLink(content, 0); while (foundData !== null) { let nextIndex; @@ -11,6 +11,7 @@ export function extractImageLinks(content: string) { } foundData = extractImageLink(content, nextIndex); } + return imageData; } diff --git a/src/converters/obsidian/tests/convertMarkdownNodeToTanaNode.test.ts b/src/converters/obsidian/tests/convertMarkdownNode.test.ts similarity index 80% rename from src/converters/obsidian/tests/convertMarkdownNodeToTanaNode.test.ts rename to src/converters/obsidian/tests/convertMarkdownNode.test.ts index 4320726..f620425 100644 --- a/src/converters/obsidian/tests/convertMarkdownNodeToTanaNode.test.ts +++ b/src/converters/obsidian/tests/convertMarkdownNode.test.ts @@ -173,50 +173,36 @@ https://some.url/ expect( extractMarkdownNodes(readFileSync('./src/converters/obsidian/tests/fixtures/vault/test.md', 'utf-8')), ).toStrictEqual([ + { type: HierarchyType.PARAGRAPH, level: 0, content: 'Starting without [[heading]].' }, + { type: HierarchyType.HEADING, level: 1, content: 'Heading here' }, + { type: HierarchyType.PARAGRAPH, level: 0, content: '[[Some]]' }, + { type: HierarchyType.PARAGRAPH, level: 0, content: 'Stuff but with\na newline.' }, + { type: HierarchyType.HEADING, level: 2, content: 'Heading 2' }, + { type: HierarchyType.OUTLINE, level: 0, content: 'Invalid Heading [[test2#Heading 2#Heading here]]' }, + { type: HierarchyType.OUTLINE, level: 4, content: 'Block with [[Link]] [[Link2]] ^BLOCK_UID' }, + { type: HierarchyType.OUTLINE, level: 2, content: 'Fun' }, + { type: HierarchyType.HEADING, level: 4, content: 'Out of Level' }, { - content: 'Starting without [[heading]].', - level: 0, type: HierarchyType.PARAGRAPH, - }, - { - content: 'Heading here', - level: 1, - type: HierarchyType.HEADING, - }, - { - content: '[[Some]]', level: 0, - type: HierarchyType.PARAGRAPH, + content: '![single image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100)', }, { - content: 'Stuff but with\na newline.', - level: 0, type: HierarchyType.PARAGRAPH, - }, - { - content: 'Heading 2', - level: 2, - type: HierarchyType.HEADING, - }, - { - content: 'Invalid Heading [[test2#Heading 2#Heading here]]', level: 0, - type: HierarchyType.OUTLINE, + content: '![single image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) some text', }, { - content: 'Block with [[Link]] [[Link2]] ^BLOCK_UID', - level: 4, - type: HierarchyType.OUTLINE, - }, - { - content: 'Fun', - level: 2, - type: HierarchyType.OUTLINE, + type: HierarchyType.PARAGRAPH, + level: 0, + content: + '![multiple images](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) ![multiple images 2](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100)', }, { - content: 'Out of Level', - level: 4, - type: HierarchyType.HEADING, + type: HierarchyType.PARAGRAPH, + level: 0, + content: + '![same image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) ![same image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100)', }, ]); }); diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index 6825afd..21dd104 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -162,7 +162,73 @@ { "uid": "32", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, - { "uid": "33", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } + { + "uid": "33", + "name": "Out of Level", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "34", + "name": "single image", + "createdAt": 1, + "editedAt": 1, + "type": "image", + "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" + }, + { + "uid": "35", + "name": "single image some text", + "createdAt": 1, + "editedAt": 1, + "type": "image", + "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" + }, + { + "uid": "36", + "name": "[[37]] [[38]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "37", + "name": "multiple images", + "createdAt": 1, + "editedAt": 1, + "type": "image", + "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" + }, + { + "uid": "38", + "name": "multiple images 2", + "createdAt": 1, + "editedAt": 1, + "type": "image", + "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" + } + ] + }, + { + "uid": "39", + "name": "[[40]] [[40]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "40", + "name": "same image", + "createdAt": 1, + "editedAt": 1, + "type": "image", + "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" + } + ] + } + ] + } ] } ] @@ -172,7 +238,7 @@ ] }, { - "uid": "34", + "uid": "41", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, @@ -188,5 +254,5 @@ ] } ], - "summary": { "leafNodes": 33, "topLevelNodes": 1, "totalNodes": 34, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } + "summary": { "leafNodes": 40, "topLevelNodes": 1, "totalNodes": 41, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/single.tif.json b/src/converters/obsidian/tests/fixtures/single.tif.json index a26f74a..6e8d3e5 100644 --- a/src/converters/obsidian/tests/fixtures/single.tif.json +++ b/src/converters/obsidian/tests/fixtures/single.tif.json @@ -1,9 +1,9 @@ { "version": "TanaIntermediateFile V0.1", "summary": { - "leafNodes": 15, + "leafNodes": 22, "topLevelNodes": 1, - "totalNodes": 16, + "totalNodes": 23, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 @@ -52,7 +52,73 @@ { "uid": "13", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, - { "uid": "14", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } + { + "uid": "14", + "name": "Out of Level", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "15", + "name": "single image", + "createdAt": 1, + "editedAt": 1, + "type": "image", + "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" + }, + { + "uid": "16", + "name": "single image some text", + "createdAt": 1, + "editedAt": 1, + "type": "image", + "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" + }, + { + "uid": "17", + "name": "[[18]] [[19]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "18", + "name": "multiple images", + "createdAt": 1, + "editedAt": 1, + "type": "image", + "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" + }, + { + "uid": "19", + "name": "multiple images 2", + "createdAt": 1, + "editedAt": 1, + "type": "image", + "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" + } + ] + }, + { + "uid": "20", + "name": "[[21]] [[21]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "21", + "name": "same image", + "createdAt": 1, + "editedAt": 1, + "type": "image", + "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" + } + ] + } + ] + } ] } ] @@ -60,7 +126,7 @@ ] }, { - "uid": "15", + "uid": "22", "name": "Missing Nodes for test", "createdAt": 1, "editedAt": 1, diff --git a/src/converters/obsidian/tests/fixtures/vault/test.md b/src/converters/obsidian/tests/fixtures/vault/test.md index 5a2aaca..6e60c13 100644 --- a/src/converters/obsidian/tests/fixtures/vault/test.md +++ b/src/converters/obsidian/tests/fixtures/vault/test.md @@ -13,3 +13,11 @@ a newline. - Fun #### Out of Level + +![single image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) + +![single image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) some text + +![multiple images](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) ![multiple images 2](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) + +![same image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) ![same image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) \ No newline at end of file From 5d540951c37c686fa38f3ca43bb90ad65db936dc Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 10 Oct 2022 00:37:28 +0200 Subject: [PATCH 25/94] remove ObsidianSingleFileConverter --- .../obsidian/ObsidianSingleFileConverter.ts | 35 ------------------- src/converters/obsidian/index.ts | 3 +- .../tests/ObsidianSingleFileConverter.test.ts | 18 ---------- src/runner.ts | 5 +-- 4 files changed, 2 insertions(+), 59 deletions(-) delete mode 100644 src/converters/obsidian/ObsidianSingleFileConverter.ts delete mode 100644 src/converters/obsidian/tests/ObsidianSingleFileConverter.test.ts diff --git a/src/converters/obsidian/ObsidianSingleFileConverter.ts b/src/converters/obsidian/ObsidianSingleFileConverter.ts deleted file mode 100644 index b3f2ff9..0000000 --- a/src/converters/obsidian/ObsidianSingleFileConverter.ts +++ /dev/null @@ -1,35 +0,0 @@ -import path from 'path'; -import { TanaIntermediateFile } from '../../types/types'; -import { convertObsidianFile } from './convertObsidianFile'; -import { createUnlinkedTanaNodes } from './createUnlinkedTanaNodes'; -import { VaultContext } from './VaultContext'; - -export function ObsidianSingleFileConverter( - fileName: string, - fileContent: string, - today: number = Date.now(), - vaultContext: VaultContext = new VaultContext(), -): TanaIntermediateFile { - const importName = path.basename(fileName).replace('.md', ''); - const node = convertObsidianFile(importName, fileContent, vaultContext, today); - //the file node needs to be counted as a top level node - vaultContext.summary.leafNodes--; - vaultContext.summary.topLevelNodes++; - - //by definition all heading links to other files are invalid because we only process one file - //TODO: support for same file-links, but honestly a single file converter does not make so much sense in the context of obsidian, might remove it - const missingHeadingLinks = Array.from(vaultContext.headingLinkTracker.entries()) - .filter((entry) => entry[0] !== fileName)?.[0]?.[1] - .map((headingLink) => ({ uid: headingLink.uid, link: headingLink.link.join('#') })); - vaultContext.addInvalidLinks(missingHeadingLinks); - const collectedUnlinkedNodes = createUnlinkedTanaNodes(importName, today, vaultContext); - const nodes = [node]; - if (collectedUnlinkedNodes) { - nodes.push(collectedUnlinkedNodes); - } - return { - version: 'TanaIntermediateFile V0.1', - summary: vaultContext.summary, - nodes: nodes, - }; -} diff --git a/src/converters/obsidian/index.ts b/src/converters/obsidian/index.ts index 9afab17..1d5caf7 100644 --- a/src/converters/obsidian/index.ts +++ b/src/converters/obsidian/index.ts @@ -1,4 +1,3 @@ -import { ObsidianSingleFileConverter } from './ObsidianSingleFileConverter'; import { ObsidianVaultConverter } from './ObsidianVaultConverter'; -export { ObsidianSingleFileConverter, ObsidianVaultConverter }; +export { ObsidianVaultConverter }; diff --git a/src/converters/obsidian/tests/ObsidianSingleFileConverter.test.ts b/src/converters/obsidian/tests/ObsidianSingleFileConverter.test.ts deleted file mode 100644 index 091dac9..0000000 --- a/src/converters/obsidian/tests/ObsidianSingleFileConverter.test.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { expect, test } from '@jest/globals'; -import { readFileSync } from 'fs'; -import { ObsidianSingleFileConverter } from '../ObsidianSingleFileConverter'; -import { VaultContext } from '../VaultContext'; -import { deterministicGenerator } from './testUtils'; - -test('obsidian file converter', () => { - const vaultContext = new VaultContext(deterministicGenerator()); - const result = ObsidianSingleFileConverter( - './src/converters/obsidian/tests/fixtures/vault/test.md', - readFileSync('./src/converters/obsidian/tests/fixtures/vault/test.md', 'utf-8'), - 1, - vaultContext, - ); - // console.log(JSON.stringify(result)); - const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/single.tif.json', 'utf-8')); - expect(result).toStrictEqual(expected); -}); diff --git a/src/runner.ts b/src/runner.ts index 523bcc0..ca91d60 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -6,7 +6,7 @@ import { TanaIntermediateFile } from './types/types'; import { WorkflowyConverter } from './converters/workflowy'; import { lstatSync } from 'fs'; import path from 'path'; -import { ObsidianSingleFileConverter, ObsidianVaultConverter } from './converters/obsidian'; +import { ObsidianVaultConverter } from './converters/obsidian'; const fileType = process.argv[2]; const file = process.argv[3]; @@ -47,9 +47,6 @@ function handleSingleFileConversion() { case 'workflowy': tanaIntermediteFile = new WorkflowyConverter().convert(contents); break; - case 'obsidian': - tanaIntermediteFile = ObsidianSingleFileConverter(path.basename(file).replace('.md', ''), contents); - break; default: console.log(`File type ${fileType} is not supported for single files`); exit(0); From d1bc9d2f8351ff55f1b066550f7a6f5908338f29 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 10 Oct 2022 00:45:45 +0200 Subject: [PATCH 26/94] conversion of Obsidian Markdown Linked Images with URLs --- .../obsidian/convertMarkdownNode.ts | 14 +- src/converters/obsidian/extractImageLinks.ts | 96 ++++++++++-- .../tests/ObsidianVaultConverter.test.ts | 2 +- .../tests/convertMarkdownNode.test.ts | 36 ----- .../obsidian/tests/extractImageLinks.test.ts | 146 ++++++++++++++++-- .../obsidian/tests/fixtures/full.tif.json | 12 +- .../obsidian/tests/fixtures/single.tif.json | 143 ----------------- .../obsidian/tests/fixtures/vault/test.md | 4 +- 8 files changed, 239 insertions(+), 214 deletions(-) delete mode 100644 src/converters/obsidian/tests/fixtures/single.tif.json diff --git a/src/converters/obsidian/convertMarkdownNode.ts b/src/converters/obsidian/convertMarkdownNode.ts index efa39cd..a3c3920 100644 --- a/src/converters/obsidian/convertMarkdownNode.ts +++ b/src/converters/obsidian/convertMarkdownNode.ts @@ -25,7 +25,7 @@ export function convertMarkdownNode( //TODO: convert to different node types, remove markdown formatting etc. tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim(); // links with alias - tanaNode.name = tanaNode.name.replace(/\[\[([^|]+)\|([^\]]+)\]\]/g, '[$1]([[$2]])'); + // tanaNode.name = tanaNode.name.replace(/\[\[([^|]+)\|([^\]]+)\]\]/g, '[$1]([[$2]])'); // tags, convert to links for now tanaNode.name = tanaNode.name.replace(/(?:\s|^)(#([^[]]+?))(?:(?=\s)|$)/g, ' #[[$2]]'); @@ -57,7 +57,7 @@ function handleImages(tanaNode: TanaIntermediateNode, today: number, vaultContex const image = imageData[0]; tanaNode.type = 'image'; tanaNode.mediaUrl = image[1].trim(); - tanaNode.name = tanaNode.name.replace('![' + image[0] + '](' + image[1] + ')', image[0].trim()); + tanaNode.name = tanaNode.name.replace(image[3], image[0].trim()); return; } @@ -65,18 +65,20 @@ function handleImages(tanaNode: TanaIntermediateNode, today: number, vaultContex const childImageNodes: TanaIntermediateNode[] = []; imageData.forEach((image) => { + const altText = image[0]; + const url = image[1]; //filter out duplicate image uses - if (childImageNodes.every((node) => image[0].trim() !== node.name || image[1].trim() !== node.mediaUrl)) { - const oldLink = '![' + image[0] + '](' + image[1] + ')'; + if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) { + const oldLink = image[3]; const uid = vaultContext.randomUid(); tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]'); childImageNodes.push({ uid, - name: image[0].trim(), //alt text + name: altText.trim(), //alt text createdAt: today, editedAt: today, type: 'image' as NodeType, - mediaUrl: image[1].trim(), + mediaUrl: url.trim(), }); } }); diff --git a/src/converters/obsidian/extractImageLinks.ts b/src/converters/obsidian/extractImageLinks.ts index f3c1c80..4226256 100644 --- a/src/converters/obsidian/extractImageLinks.ts +++ b/src/converters/obsidian/extractImageLinks.ts @@ -1,5 +1,13 @@ +/** + * + * Extracts an image-link alt text and link by checking for the \!\[...\]\(http://...|https://...\) pattern manually. + * + * Supports also linked images \[\!\[...\]\(https://...)\]\(https:://...\). But takes the last URL as the final URL. + * + * @returns array of [alt text, url, next position, old string to replace] + */ export function extractImageLinks(content: string) { - const imageData: [string, string, number][] = []; + const imageData: [string, string, number, string][] = []; let foundData = extractImageLink(content, 0); while (foundData !== null) { let nextIndex; @@ -15,21 +23,27 @@ export function extractImageLinks(content: string) { return imageData; } -/** - * - * Extracts an image-link alt text and link by checking for the ![...](http://...|https://...) pattern manually. - */ -function extractImageLink(content: string, startPositon: number): [string, string, number] | number | null { +//TODO: support titles after the URL + +function extractImageLink(content: string, startPositon: number): [string, string, number, string] | number | null { let lastFoundImageSignifier; let altText = ''; - let link = ''; + let url = ''; + //I will atone for my sins, but you are not making me try to do this with RegEx for (let index = startPositon; index < content.length; index++) { const char = content[index]; if (char === '\n') { return index + 1; } - //I will atone for my sins, but you are not making me try to do this with RegEx + if (!lastFoundImageSignifier && char === '[') { + const res = tryToExtractLinkedImageLink(content, index); + if (res !== null) { + return res; + } + continue; + } + if (!lastFoundImageSignifier && char === '!') { lastFoundImageSignifier = char; continue; @@ -54,12 +68,12 @@ function extractImageLink(content: string, startPositon: number): [string, strin continue; } if (lastFoundImageSignifier === '(' && char !== ')') { - link += char; + url += char; continue; } if (lastFoundImageSignifier === '(' && char === ')') { - if (link.startsWith('http://') || link.startsWith('https://')) { - return [altText, link, index + 1]; + if (url.startsWith('http://') || url.startsWith('https://')) { + return [altText, url, index + 1, '![' + altText + '](' + url + ')']; } else { return index + 1; } @@ -68,3 +82,63 @@ function extractImageLink(content: string, startPositon: number): [string, strin return null; } + +/** + * If we detect the possible start of a linked image "[", we try to extract it. + * + */ +function tryToExtractLinkedImageLink( + content: string, + startPositon: number, +): [string, string, number, string] | number | null { + //in Markdown this is called a linked image (so an image with a URL that you can click on) + if (content[startPositon + 1] === undefined || content[startPositon + 1] !== '!') { + return null; + } + //a linked image has a normal image link embedded + const embeddedImage = extractImageLink(content, startPositon + 1); + if (Array.isArray(embeddedImage)) { + const endPosition = embeddedImage[2]; + const expectedEndPositon = startPositon + 1 + embeddedImage[3].length; + if (endPosition !== expectedEndPositon) { + //in this case we found another image, but not an embedded one + //dont need to do work twice, so can use this + //will clean this up when the Muse visits me again + return embeddedImage; + } + + let lastFoundImageSignifier; + let endUrl = ''; //the URL at the end of linked image, so the second one + for (let index = endPosition; index < content.length; index++) { + const char = content[index]; + if (char === '\n') { + //not optimal, because the algo will traverse until this newline again + //but otherwise would need to extract the image again + return embeddedImage; + } + if (!lastFoundImageSignifier && char === '(') { + lastFoundImageSignifier = char; + continue; + } + + if (lastFoundImageSignifier === '(' && char !== ')') { + endUrl += char; + continue; + } + + if (lastFoundImageSignifier === '(' && char === ')') { + if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) { + return [ + embeddedImage[0], + endUrl, + index + 1, + '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')', + ]; + } else { + return embeddedImage; + } + } + } + } + return embeddedImage; +} diff --git a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts index bb54fa9..08ae330 100644 --- a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts +++ b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts @@ -8,7 +8,7 @@ test('obsidian vault converter', async () => { const vaultContext = new VaultContext(deterministicGenerator()); await ObsidianVaultConverter('./src/converters/obsidian/tests/fixtures/vault', 1, vaultContext); const result = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/vault.tif.json', 'utf-8')); - // console.log(JSON.stringify(result)); + console.log(JSON.stringify(result)); unlinkSync('./src/converters/obsidian/tests/fixtures/vault.tif.json'); const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/full.tif.json', 'utf-8')); expect(result).toStrictEqual(expected); diff --git a/src/converters/obsidian/tests/convertMarkdownNode.test.ts b/src/converters/obsidian/tests/convertMarkdownNode.test.ts index f620425..c4b2f69 100644 --- a/src/converters/obsidian/tests/convertMarkdownNode.test.ts +++ b/src/converters/obsidian/tests/convertMarkdownNode.test.ts @@ -1,5 +1,4 @@ import { expect, test } from '@jest/globals'; -import { readFileSync } from 'fs'; import { extractMarkdownNodes, HierarchyType, countEmptySpace, nextNewLine } from '../extractMarkdownNodes'; test('headings', () => { @@ -170,41 +169,6 @@ https://some.url/ type: HierarchyType.OUTLINE, }, ]); - expect( - extractMarkdownNodes(readFileSync('./src/converters/obsidian/tests/fixtures/vault/test.md', 'utf-8')), - ).toStrictEqual([ - { type: HierarchyType.PARAGRAPH, level: 0, content: 'Starting without [[heading]].' }, - { type: HierarchyType.HEADING, level: 1, content: 'Heading here' }, - { type: HierarchyType.PARAGRAPH, level: 0, content: '[[Some]]' }, - { type: HierarchyType.PARAGRAPH, level: 0, content: 'Stuff but with\na newline.' }, - { type: HierarchyType.HEADING, level: 2, content: 'Heading 2' }, - { type: HierarchyType.OUTLINE, level: 0, content: 'Invalid Heading [[test2#Heading 2#Heading here]]' }, - { type: HierarchyType.OUTLINE, level: 4, content: 'Block with [[Link]] [[Link2]] ^BLOCK_UID' }, - { type: HierarchyType.OUTLINE, level: 2, content: 'Fun' }, - { type: HierarchyType.HEADING, level: 4, content: 'Out of Level' }, - { - type: HierarchyType.PARAGRAPH, - level: 0, - content: '![single image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100)', - }, - { - type: HierarchyType.PARAGRAPH, - level: 0, - content: '![single image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) some text', - }, - { - type: HierarchyType.PARAGRAPH, - level: 0, - content: - '![multiple images](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) ![multiple images 2](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100)', - }, - { - type: HierarchyType.PARAGRAPH, - level: 0, - content: - '![same image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) ![same image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100)', - }, - ]); }); test('empty space util', () => { expect(countEmptySpace('a b c', 1)).toBe(3); diff --git a/src/converters/obsidian/tests/extractImageLinks.test.ts b/src/converters/obsidian/tests/extractImageLinks.test.ts index cf47456..b51c614 100644 --- a/src/converters/obsidian/tests/extractImageLinks.test.ts +++ b/src/converters/obsidian/tests/extractImageLinks.test.ts @@ -1,6 +1,8 @@ import { expect, test } from '@jest/globals'; import { extractImageLinks } from '../extractImageLinks'; +//TODO: write some test utils to check permutations easier + test('extractImageLinks test', () => { const noLinks = [ '', @@ -15,49 +17,165 @@ test('extractImageLinks test', () => { '![this is a link with a\nlinebreak](https://test)', '![this is a link with a linebreak](https://\ntest)', '![this is a link with a linebreak](https://test\n)', + //could support this in the future, but couldnt re-use the general URL extraction function then + '[![this is a linked image without an URL in the embedded image](/cool/vault/path.jpg)](https://url)', ]; noLinks.forEach((content) => expect(extractImageLinks(content)).toStrictEqual([])); expect(extractImageLinks('![test](http://test)')).toStrictEqual([ - ['test', 'http://test', '![test](http://test)'.length], + ['test', 'http://test', '![test](http://test)'.length, '![test](http://test)'], ]); expect(extractImageLinks('some text ![test](http://test)')).toStrictEqual([ - ['test', 'http://test', 'some text ![test](http://test)'.length], + ['test', 'http://test', 'some text ![test](http://test)'.length, '![test](http://test)'], ]); expect(extractImageLinks('some text\n ![test](http://test)')).toStrictEqual([ - ['test', 'http://test', 'some text\n ![test](http://test)'.length], + ['test', 'http://test', 'some text\n ![test](http://test)'.length, '![test](http://test)'], ]); expect(extractImageLinks('![test](http://test) some text')).toStrictEqual([ - ['test', 'http://test', '![test](http://test)'.length], + ['test', 'http://test', '![test](http://test)'.length, '![test](http://test)'], ]); expect(extractImageLinks('![test](http://test) ![test2](https://test2)')).toStrictEqual([ - ['test', 'http://test', '![test](http://test)'.length], - ['test2', 'https://test2', '![test](http://test) ![test2](https://test2)'.length], + ['test', 'http://test', '![test](http://test)'.length, '![test](http://test)'], + ['test2', 'https://test2', '![test](http://test) ![test2](https://test2)'.length, '![test2](https://test2)'], ]); expect(extractImageLinks('some text ![test](http://test) ![test2](https://test2)')).toStrictEqual([ - ['test', 'http://test', 'some text ![test](http://test)'.length], - ['test2', 'https://test2', 'some text ![test](http://test) ![test2](https://test2)'.length], + ['test', 'http://test', 'some text ![test](http://test)'.length, '![test](http://test)'], + [ + 'test2', + 'https://test2', + 'some text ![test](http://test) ![test2](https://test2)'.length, + '![test2](https://test2)', + ], ]); expect(extractImageLinks('some text ![test](http://test) ![test2](https://test2) some text')).toStrictEqual([ - ['test', 'http://test', 'some text ![test](http://test)'.length], - ['test2', 'https://test2', 'some text ![test](http://test) ![test2](https://test2)'.length], + ['test', 'http://test', 'some text ![test](http://test)'.length, '![test](http://test)'], + [ + 'test2', + 'https://test2', + 'some text ![test](http://test) ![test2](https://test2)'.length, + '![test2](https://test2)', + ], ]); expect(extractImageLinks('![test](http://test) some text ![test2](https://test2)')).toStrictEqual([ - ['test', 'http://test', '![test](http://test)'.length], - ['test2', 'https://test2', '![test](http://test) some text ![test2](https://test2)'.length], + ['test', 'http://test', '![test](http://test)'.length, '![test](http://test)'], + [ + 'test2', + 'https://test2', + '![test](http://test) some text ![test2](https://test2)'.length, + '![test2](https://test2)', + ], ]); expect(extractImageLinks('some text ![test](http://test) some text ![test2](https://test2) some text')).toStrictEqual( [ - ['test', 'http://test', 'some text ![test](http://test)'.length], - ['test2', 'https://test2', 'some text ![test](http://test) some text ![test2](https://test2)'.length], + ['test', 'http://test', 'some text ![test](http://test)'.length, '![test](http://test)'], + [ + 'test2', + 'https://test2', + 'some text ![test](http://test) some text ![test2](https://test2)'.length, + '![test2](https://test2)', + ], ], ); + + expect( + extractImageLinks( + '[![ancient public baths](http://different)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg)', + ), + ).toStrictEqual([ + [ + 'ancient public baths', + 'http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg', + '[![ancient public baths](http://different)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg)' + .length, + '[![ancient public baths](http://different)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg)', + ], + ]); + + expect( + extractImageLinks( + 'some text [![ancient public baths](http://different)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg)', + ), + ).toStrictEqual([ + [ + 'ancient public baths', + 'http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg', + 'some text [![ancient public baths](http://different)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg)' + .length, + '[![ancient public baths](http://different)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg)', + ], + ]); + + expect( + extractImageLinks( + '[![ancient public baths](http://different)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg) some text', + ), + ).toStrictEqual([ + [ + 'ancient public baths', + 'http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg', + '[![ancient public baths](http://different)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg)' + .length, + '[![ancient public baths](http://different)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg)', + ], + ]); + + expect( + extractImageLinks( + '![test](http://test) [![ancient public baths](http://different)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg)', + ), + ).toStrictEqual([ + ['test', 'http://test', '![test](http://test)'.length, '![test](http://test)'], + [ + 'ancient public baths', + 'http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg', + '![test](http://test) [![ancient public baths](http://different)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg)' + .length, + '[![ancient public baths](http://different)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg)', + ], + ]); + + expect( + extractImageLinks( + '[![ancient public baths](http://different)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg) ![test](http://test)', + ), + ).toStrictEqual([ + [ + 'ancient public baths', + 'http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg', + '[![ancient public baths](http://different)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg)' + .length, + '[![ancient public baths](http://different)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg)', + ], + [ + 'test', + 'http://test', + '[![ancient public baths](http://different)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg) ![test](http://test)' + .length, + '![test](http://test)', + ], + ]); + expect(extractImageLinks('[![partial embedded link](http://different)](http)]')).toStrictEqual([ + [ + 'partial embedded link', + 'http://different', + '[![partial embedded link](http://different)'.length, + '![partial embedded link](http://different)', + ], + ]); + expect(extractImageLinks('[![partial embedded link](http://different)](http)')).toStrictEqual([ + [ + 'partial embedded link', + 'http://different', + '[![partial embedded link](http://different)'.length, + '![partial embedded link](http://different)', + ], + ]); }); diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index 21dd104..abeb8d5 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -226,6 +226,14 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" } ] + }, + { + "uid": "41", + "name": "ancient public baths", + "createdAt": 1, + "editedAt": 1, + "type": "image", + "mediaUrl": "http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg" } ] } @@ -238,7 +246,7 @@ ] }, { - "uid": "41", + "uid": "42", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, @@ -254,5 +262,5 @@ ] } ], - "summary": { "leafNodes": 40, "topLevelNodes": 1, "totalNodes": 41, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } + "summary": { "leafNodes": 41, "topLevelNodes": 1, "totalNodes": 42, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/single.tif.json b/src/converters/obsidian/tests/fixtures/single.tif.json deleted file mode 100644 index 6e8d3e5..0000000 --- a/src/converters/obsidian/tests/fixtures/single.tif.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "version": "TanaIntermediateFile V0.1", - "summary": { - "leafNodes": 22, - "topLevelNodes": 1, - "totalNodes": 23, - "calendarNodes": 0, - "fields": 0, - "brokenRefs": 0 - }, - "nodes": [ - { - "uid": "0", - "name": "test", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { "uid": "1", "name": "Starting without [[2]].", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["2"] }, - { - "uid": "3", - "name": "Heading here", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { "uid": "4", "name": "[[5]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["5"] }, - { "uid": "6", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, - { - "uid": "7", - "name": "Heading 2", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { - "uid": "8", - "name": "Invalid Heading [[9]]", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "refs": ["9"], - "children": [ - { - "uid": "10", - "name": "Block with [[11]] [[12]]", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "refs": ["11", "12"] - }, - { "uid": "13", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } - ] - }, - { - "uid": "14", - "name": "Out of Level", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { - "uid": "15", - "name": "single image", - "createdAt": 1, - "editedAt": 1, - "type": "image", - "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" - }, - { - "uid": "16", - "name": "single image some text", - "createdAt": 1, - "editedAt": 1, - "type": "image", - "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" - }, - { - "uid": "17", - "name": "[[18]] [[19]]", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { - "uid": "18", - "name": "multiple images", - "createdAt": 1, - "editedAt": 1, - "type": "image", - "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" - }, - { - "uid": "19", - "name": "multiple images 2", - "createdAt": 1, - "editedAt": 1, - "type": "image", - "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" - } - ] - }, - { - "uid": "20", - "name": "[[21]] [[21]]", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { - "uid": "21", - "name": "same image", - "createdAt": 1, - "editedAt": 1, - "type": "image", - "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" - } - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "uid": "22", - "name": "Missing Nodes for test", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { "uid": "2", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "9", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "11", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "12", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "5", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" } - ] - } - ] -} diff --git a/src/converters/obsidian/tests/fixtures/vault/test.md b/src/converters/obsidian/tests/fixtures/vault/test.md index 6e60c13..76c826f 100644 --- a/src/converters/obsidian/tests/fixtures/vault/test.md +++ b/src/converters/obsidian/tests/fixtures/vault/test.md @@ -20,4 +20,6 @@ a newline. ![multiple images](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) ![multiple images 2](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) -![same image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) ![same image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) \ No newline at end of file +![same image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) ![same image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) + +[![ancient public baths](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg)](http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg) \ No newline at end of file From 49d98c200dad008740c501282c462ebf948f0764 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 10 Oct 2022 00:52:24 +0200 Subject: [PATCH 27/94] remove optional titles from Markdown Images --- src/converters/obsidian/extractImageLinks.ts | 11 +++++++++-- .../obsidian/tests/ObsidianVaultConverter.test.ts | 2 +- .../obsidian/tests/extractImageLinks.test.ts | 11 ++++++++++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/converters/obsidian/extractImageLinks.ts b/src/converters/obsidian/extractImageLinks.ts index 4226256..d72e960 100644 --- a/src/converters/obsidian/extractImageLinks.ts +++ b/src/converters/obsidian/extractImageLinks.ts @@ -73,7 +73,13 @@ function extractImageLink(content: string, startPositon: number): [string, strin } if (lastFoundImageSignifier === '(' && char === ')') { if (url.startsWith('http://') || url.startsWith('https://')) { - return [altText, url, index + 1, '![' + altText + '](' + url + ')']; + return [ + altText, + //could add titles to the url, which we dont convert + url.split(' ')[0], + index + 1, + '![' + altText + '](' + url + ')', + ]; } else { return index + 1; } @@ -130,7 +136,8 @@ function tryToExtractLinkedImageLink( if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) { return [ embeddedImage[0], - endUrl, + //could add titles to the url, which we dont convert + endUrl.split(' ')[0], index + 1, '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')', ]; diff --git a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts index 08ae330..bb54fa9 100644 --- a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts +++ b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts @@ -8,7 +8,7 @@ test('obsidian vault converter', async () => { const vaultContext = new VaultContext(deterministicGenerator()); await ObsidianVaultConverter('./src/converters/obsidian/tests/fixtures/vault', 1, vaultContext); const result = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/vault.tif.json', 'utf-8')); - console.log(JSON.stringify(result)); + // console.log(JSON.stringify(result)); unlinkSync('./src/converters/obsidian/tests/fixtures/vault.tif.json'); const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/full.tif.json', 'utf-8')); expect(result).toStrictEqual(expected); diff --git a/src/converters/obsidian/tests/extractImageLinks.test.ts b/src/converters/obsidian/tests/extractImageLinks.test.ts index b51c614..1cb16d1 100644 --- a/src/converters/obsidian/tests/extractImageLinks.test.ts +++ b/src/converters/obsidian/tests/extractImageLinks.test.ts @@ -18,7 +18,7 @@ test('extractImageLinks test', () => { '![this is a link with a linebreak](https://\ntest)', '![this is a link with a linebreak](https://test\n)', //could support this in the future, but couldnt re-use the general URL extraction function then - '[![this is a linked image without an URL in the embedded image](/cool/vault/path.jpg)](https://url)', + '[![this is a linked image without an URL in the embedded](/cool/vault/path.jpg)](https://url)', ]; noLinks.forEach((content) => expect(extractImageLinks(content)).toStrictEqual([])); @@ -26,6 +26,15 @@ test('extractImageLinks test', () => { ['test', 'http://test', '![test](http://test)'.length, '![test](http://test)'], ]); + expect(extractImageLinks('![test](http://test "unsupported title!")')).toStrictEqual([ + [ + 'test', + 'http://test', + '![test](http://test "unsupported title!")'.length, + '![test](http://test "unsupported title!")', + ], + ]); + expect(extractImageLinks('some text ![test](http://test)')).toStrictEqual([ ['test', 'http://test', 'some text ![test](http://test)'.length, '![test](http://test)'], ]); From b2f6e15505c5190aa76c12bcc64ada0439f7d2fd Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 10 Oct 2022 01:00:23 +0200 Subject: [PATCH 28/94] re-enable naive alias trimming in Obsidian converter --- src/converters/obsidian/convertMarkdownNode.ts | 9 +++------ src/converters/obsidian/extractImageLinks.ts | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/converters/obsidian/convertMarkdownNode.ts b/src/converters/obsidian/convertMarkdownNode.ts index a3c3920..40fc309 100644 --- a/src/converters/obsidian/convertMarkdownNode.ts +++ b/src/converters/obsidian/convertMarkdownNode.ts @@ -19,13 +19,10 @@ export function convertMarkdownNode( type: 'node' as NodeType, }; - //TODO: reuse the regexs - - //TODO: aliases - //TODO: convert to different node types, remove markdown formatting etc. tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim(); + // links with alias - // tanaNode.name = tanaNode.name.replace(/\[\[([^|]+)\|([^\]]+)\]\]/g, '[$1]([[$2]])'); + tanaNode.name = tanaNode.name.replace(/\[\[([^|]+)\|([^\]]+)\]\]/g, '[$1]([[$2]])'); // tags, convert to links for now tanaNode.name = tanaNode.name.replace(/(?:\s|^)(#([^[]]+?))(?:(?=\s)|$)/g, ' #[[$2]]'); @@ -74,7 +71,7 @@ function handleImages(tanaNode: TanaIntermediateNode, today: number, vaultContex tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]'); childImageNodes.push({ uid, - name: altText.trim(), //alt text + name: altText.trim(), createdAt: today, editedAt: today, type: 'image' as NodeType, diff --git a/src/converters/obsidian/extractImageLinks.ts b/src/converters/obsidian/extractImageLinks.ts index d72e960..c2b26b2 100644 --- a/src/converters/obsidian/extractImageLinks.ts +++ b/src/converters/obsidian/extractImageLinks.ts @@ -23,7 +23,7 @@ export function extractImageLinks(content: string) { return imageData; } -//TODO: support titles after the URL +//TODO: improve performance, this halfed the conversion speed of Eleanors vault function extractImageLink(content: string, startPositon: number): [string, string, number, string] | number | null { let lastFoundImageSignifier; From 12b0ebb833fbc9d9dd7b69ce395d4e69f2ba1412 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 10 Oct 2022 01:43:10 +0200 Subject: [PATCH 29/94] fix Obsidian alias support --- .../obsidian/convertMarkdownNode.ts | 25 ++++++++++++------- .../obsidian/extractMarkdownNodes.ts | 11 +++++++- .../obsidian/tests/fixtures/full.tif.json | 2 +- .../obsidian/tests/fixtures/vault/test.md | 2 +- 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/converters/obsidian/convertMarkdownNode.ts b/src/converters/obsidian/convertMarkdownNode.ts index 40fc309..c24b4e5 100644 --- a/src/converters/obsidian/convertMarkdownNode.ts +++ b/src/converters/obsidian/convertMarkdownNode.ts @@ -21,23 +21,30 @@ export function convertMarkdownNode( tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim(); - // links with alias - tanaNode.name = tanaNode.name.replace(/\[\[([^|]+)\|([^\]]+)\]\]/g, '[$1]([[$2]])'); // tags, convert to links for now tanaNode.name = tanaNode.name.replace(/(?:\s|^)(#([^[]]+?))(?:(?=\s)|$)/g, ' #[[$2]]'); - const foundUids = getBracketLinks(tanaNode.name, true).map((link) => [ - link, - vaultContext.uidRequest(link, UidRequestType.CONTENT), - ]); + const foundUids = getBracketLinks(tanaNode.name, true).map((bracketLink) => { + //handling aliases + const aliasArr = bracketLink.split('|'); + const link = aliasArr[0]; + const alias = aliasArr[1]; + const foundUid = vaultContext.uidRequest(link, UidRequestType.CONTENT); + const result = + alias !== undefined && alias.trim() !== '' + ? '[' + alias.trim() + ']([[' + foundUid + ']])' + : '[[' + foundUid + ']]'; + + return [bracketLink, foundUid, result]; + }); if (foundUids.length > 0 && !tanaNode.refs) { tanaNode.refs = []; } - for (const [link, linkUid] of foundUids) { - tanaNode.refs?.push(linkUid); - tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', '[[' + linkUid + ']]'); + for (const [link, foundUid, result] of foundUids) { + tanaNode.refs?.push(foundUid); + tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result); } handleImages(tanaNode, today, vaultContext); diff --git a/src/converters/obsidian/extractMarkdownNodes.ts b/src/converters/obsidian/extractMarkdownNodes.ts index 5bca906..85d727a 100644 --- a/src/converters/obsidian/extractMarkdownNodes.ts +++ b/src/converters/obsidian/extractMarkdownNodes.ts @@ -20,7 +20,16 @@ export interface MarkdownNode extends Hierarchy { export function extractMarkdownNodes(content: string): MarkdownNode[] { const nodeDescs: MarkdownNode[] = []; - for (let index = 0; index < content.length; index++) { + let startIndex = 0; + + if (content.startsWith('---\n')) { + const frontMatterEndIndex = content.indexOf('\n---\n'); + if (frontMatterEndIndex !== -1) { + startIndex = frontMatterEndIndex + '\n---\n'.length; + } + } + + for (let index = startIndex; index < content.length; index++) { const element = content[index]; if (element == '\n') { continue; diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index abeb8d5..ec79e1a 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -153,7 +153,7 @@ "children": [ { "uid": "22", - "name": "Block with [[15]] [[16]]", + "name": "Block with [alias]([[15]]) [[16]]", "createdAt": 1, "editedAt": 1, "type": "node", diff --git a/src/converters/obsidian/tests/fixtures/vault/test.md b/src/converters/obsidian/tests/fixtures/vault/test.md index 76c826f..5e6dd39 100644 --- a/src/converters/obsidian/tests/fixtures/vault/test.md +++ b/src/converters/obsidian/tests/fixtures/vault/test.md @@ -9,7 +9,7 @@ a newline. ## Heading 2 - Invalid Heading [[test2#Heading 2#Heading here]] - - Block with [[Link]] [[Link2]] ^BLOCK_UID + - Block with [[Link|alias]] [[Link2]] ^BLOCK_UID - Fun #### Out of Level From 3c1d7670d781eb1bfebb7af82cbbcc9cf6773a07 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 10 Oct 2022 15:03:25 +0200 Subject: [PATCH 30/94] improve Obsidian Image Link extraction performance --- package.json | 3 +++ src/converters/obsidian/extractImageLinks.ts | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 6c49120..6e7f692 100644 --- a/package.json +++ b/package.json @@ -75,5 +75,8 @@ "testMatch": [ "**/?(*.)+(test).[t]s?(x)" ] + }, + "engines": { + "node": ">=17.0.0" } } diff --git a/src/converters/obsidian/extractImageLinks.ts b/src/converters/obsidian/extractImageLinks.ts index c2b26b2..0bebd98 100644 --- a/src/converters/obsidian/extractImageLinks.ts +++ b/src/converters/obsidian/extractImageLinks.ts @@ -36,7 +36,13 @@ function extractImageLink(content: string, startPositon: number): [string, strin if (char === '\n') { return index + 1; } - if (!lastFoundImageSignifier && char === '[') { + if ( + !lastFoundImageSignifier && + char === '[' && + //here we skip obvious false positives - e.g. "[[" links, which had tanked the performance earlier + content[index + 1] !== undefined && + content[index + 1] === '!' + ) { const res = tryToExtractLinkedImageLink(content, index); if (res !== null) { return res; @@ -98,9 +104,6 @@ function tryToExtractLinkedImageLink( startPositon: number, ): [string, string, number, string] | number | null { //in Markdown this is called a linked image (so an image with a URL that you can click on) - if (content[startPositon + 1] === undefined || content[startPositon + 1] !== '!') { - return null; - } //a linked image has a normal image link embedded const embeddedImage = extractImageLink(content, startPositon + 1); if (Array.isArray(embeddedImage)) { From 7ceb40d33a42461378767b1204e8096e1eb8f321 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 10 Oct 2022 18:47:14 +0200 Subject: [PATCH 31/94] switch Obsidian Heading Link resolution to depth first --- src/converters/obsidian/filterHeadingLinks.ts | 4 +- ...test.ts => traverseTreeDepthFirst.test.ts} | 71 ++++++++----------- .../obsidian/traverseTreeBreadthFirst.ts | 35 --------- .../obsidian/traverseTreeDepthFirst.ts | 43 +++++++++++ 4 files changed, 73 insertions(+), 80 deletions(-) rename src/converters/obsidian/tests/{traverseTreeBreadthFirst.test.ts => traverseTreeDepthFirst.test.ts} (62%) delete mode 100644 src/converters/obsidian/traverseTreeBreadthFirst.ts create mode 100644 src/converters/obsidian/traverseTreeDepthFirst.ts diff --git a/src/converters/obsidian/filterHeadingLinks.ts b/src/converters/obsidian/filterHeadingLinks.ts index 0c3e88d..1f00feb 100644 --- a/src/converters/obsidian/filterHeadingLinks.ts +++ b/src/converters/obsidian/filterHeadingLinks.ts @@ -1,5 +1,5 @@ import { HeadingUidData } from './VaultContext'; -import { traverseTreeBreadthFirst } from './traverseTreeBreadthFirst'; +import { traverseTreeDepthFirst } from './traverseTreeDepthFirst'; import { createTree } from './createTree'; //children are sorted like in file, important to detect valid heading links @@ -33,7 +33,7 @@ export function filterHeadingLinks( const headingTree = dummyTargetRoot.children ?? []; for (const data of headingUidData) { - const matchingHeadingNode = traverseTreeBreadthFirst(headingTree, data.link); + const matchingHeadingNode = traverseTreeDepthFirst(headingTree, data.link); if (matchingHeadingNode) { validHeadingLinks.push({ old: data.uid, new: matchingHeadingNode.uid }); } else { diff --git a/src/converters/obsidian/tests/traverseTreeBreadthFirst.test.ts b/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts similarity index 62% rename from src/converters/obsidian/tests/traverseTreeBreadthFirst.test.ts rename to src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts index 567bb16..b2ea409 100644 --- a/src/converters/obsidian/tests/traverseTreeBreadthFirst.test.ts +++ b/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; import { HeadingNode } from '../filterHeadingLinks'; -import { traverseTreeBreadthFirst } from '../traverseTreeBreadthFirst'; +import { traverseTreeDepthFirst } from '../traverseTreeDepthFirst'; test('traverseTreeBreadthFirst test', () => { //sinlge heading works @@ -8,7 +8,7 @@ test('traverseTreeBreadthFirst test', () => { uid: '1', content: '1', }; - expect(traverseTreeBreadthFirst([singleNode], ['1'])).toBe(singleNode); + expect(traverseTreeDepthFirst([singleNode], ['1'])).toBe(singleNode); //simple 1-2 headings work let targetNode: HeadingNode = { @@ -20,9 +20,9 @@ test('traverseTreeBreadthFirst test', () => { content: '1', children: [targetNode], }; - expect(traverseTreeBreadthFirst([tree], ['1', '2'])).toBe(targetNode); - expect(traverseTreeBreadthFirst([tree], ['1', '2', '3'])).toBe(null); - expect(traverseTreeBreadthFirst([tree], ['2', '1'])).toBe(null); + expect(traverseTreeDepthFirst([tree], ['1', '2'])).toBe(targetNode); + expect(traverseTreeDepthFirst([tree], ['1', '2', '3'])).toBe(null); + expect(traverseTreeDepthFirst([tree], ['2', '1'])).toBe(null); //skipping a node works targetNode = { @@ -34,7 +34,7 @@ test('traverseTreeBreadthFirst test', () => { content: '1', children: [{ uid: '2', content: '2', children: [targetNode] }], }; - expect(traverseTreeBreadthFirst([tree], ['1', '3'])).toBe(targetNode); + expect(traverseTreeDepthFirst([tree], ['1', '3'])).toBe(targetNode); //parallel node with same content but not first in array works targetNode = { @@ -46,7 +46,7 @@ test('traverseTreeBreadthFirst test', () => { content: '1', children: [{ uid: '2', content: '2', children: [targetNode, { uid: 'NOT_THIS', content: '3' }] }], }; - expect(traverseTreeBreadthFirst([tree], ['1', '3'])).toBe(targetNode); + expect(traverseTreeDepthFirst([tree], ['1', '3'])).toBe(targetNode); //parallel node with same partial part but in different subtree works targetNode = { @@ -87,41 +87,7 @@ test('traverseTreeBreadthFirst test', () => { }, ], }; - expect(traverseTreeBreadthFirst([tree], ['1', '3', '4'])).toBe(targetNode); - - //similar path that is one level higher is prefered (1-2-3-4 vs 1-3-4) - targetNode = { - uid: 'REAL_4', - content: '4', - }; - tree = { - uid: '1', - content: '1', - children: [ - { - uid: '2', - content: '2', - children: [ - { - uid: '3', - content: '3', - children: [ - { - uid: '4', - content: '4', - }, - ], - }, - ], - }, - { - uid: 'REAL_3', - content: '3', - children: [targetNode], - }, - ], - }; - expect(traverseTreeBreadthFirst([tree], ['1', '3', '4'])).toBe(targetNode); + expect(traverseTreeDepthFirst([tree], ['1', '3', '4'])).toBe(targetNode); //skipping levels multiple times works targetNode = { @@ -151,5 +117,24 @@ test('traverseTreeBreadthFirst test', () => { }, ], }; - expect(traverseTreeBreadthFirst([tree], ['1', '3', '5'])).toBe(targetNode); + expect(traverseTreeDepthFirst([tree], ['1', '3', '5'])).toBe(targetNode); + + //path that is lower but in earlier subtree is preferred + targetNode = { + uid: '2', + content: '2', + }; + expect( + traverseTreeDepthFirst( + [ + { + uid: '1', + content: '1', + children: [targetNode], + }, + { uid: '3', content: '2' }, + ], + ['2'], + ), + ).toBe(targetNode); }); diff --git a/src/converters/obsidian/traverseTreeBreadthFirst.ts b/src/converters/obsidian/traverseTreeBreadthFirst.ts deleted file mode 100644 index ae32d6c..0000000 --- a/src/converters/obsidian/traverseTreeBreadthFirst.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Traverses the given tree by following the content-path. Supports skipping levels in the path. - */ -export function traverseTreeBreadthFirst( - nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples - contentPath: string[], -) { - for (const node of nodes) { - if (node.content === contentPath[0]) { - return bfsHelper(node, contentPath.slice(1)); - } - } - for (const node of nodes) { - const foundNode = bfsHelper(node, contentPath.slice()); - if (foundNode) { - return foundNode; - } - } - return null; -} - -function bfsHelper( - node: Node, - contentPath: string[], -): Node | null { - if (contentPath.length === 0) { - return node; - } - - if (node.children) { - return traverseTreeBreadthFirst(node.children, contentPath.slice()); - } - - return null; -} diff --git a/src/converters/obsidian/traverseTreeDepthFirst.ts b/src/converters/obsidian/traverseTreeDepthFirst.ts new file mode 100644 index 0000000..2ed652d --- /dev/null +++ b/src/converters/obsidian/traverseTreeDepthFirst.ts @@ -0,0 +1,43 @@ +/** + * Traverses the given tree by following the content-path. Supports skipping levels in the path. + * + * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct. + * So if we have: + * + * # test + * ## test2 + * ### test3 + * + * # test4 + * ## test3 + * + * And if we link [[...#test3]] the first test3 will be taken. + * This is even true if the heading is lower than a later one: + * + * # test + * ## test2 + * ### test3 + * + * # test2 + * + * [[...#test2]] links to the first test2. + * + */ +export function traverseTreeDepthFirst( + nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples + contentPath: string[], +): Node | null { + for (const node of nodes) { + let pathLeft = contentPath.slice(); + if (node.content === contentPath[0]) { + pathLeft = contentPath.slice(1); + } + if (pathLeft.length === 0) { + return node; + } + if (node.children) { + return traverseTreeDepthFirst(node.children, pathLeft); + } + } + return null; +} From de85238cbfd5edab7e38d6efa68f56ee707ce45b Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 10 Oct 2022 19:33:55 +0200 Subject: [PATCH 32/94] add utils to parse front matter --- .../obsidian/convertMarkdownNode.ts | 1 + .../obsidian/convertObsidianFile.ts | 13 ++- .../obsidian/extractMarkdownNodes.ts | 13 +-- src/converters/obsidian/parseFrontmatter.ts | 63 +++++++++++++ .../obsidian/tests/parseFrontmatter.test.ts | 90 +++++++++++++++++++ 5 files changed, 168 insertions(+), 12 deletions(-) create mode 100644 src/converters/obsidian/parseFrontmatter.ts create mode 100644 src/converters/obsidian/tests/parseFrontmatter.test.ts diff --git a/src/converters/obsidian/convertMarkdownNode.ts b/src/converters/obsidian/convertMarkdownNode.ts index c24b4e5..6cb7b13 100644 --- a/src/converters/obsidian/convertMarkdownNode.ts +++ b/src/converters/obsidian/convertMarkdownNode.ts @@ -19,6 +19,7 @@ export function convertMarkdownNode( type: 'node' as NodeType, }; + //LogSeq specific tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim(); // tags, convert to links for now diff --git a/src/converters/obsidian/convertObsidianFile.ts b/src/converters/obsidian/convertObsidianFile.ts index d940c0a..4231c3d 100644 --- a/src/converters/obsidian/convertObsidianFile.ts +++ b/src/converters/obsidian/convertObsidianFile.ts @@ -12,8 +12,19 @@ export function convertObsidianFile( today: number = Date.now(), headingTracker?: HeadingTracker, ) { - let obsidianNodes = extractMarkdownNodes(fileContent); + let startIndex = 0; + + if (fileContent.startsWith('---\n')) { + const frontMatterEndIndex = fileContent.indexOf('\n---\n'); + if (frontMatterEndIndex !== -1) { + startIndex = frontMatterEndIndex + '\n---\n'.length; + } + } + + let obsidianNodes = extractMarkdownNodes(fileContent, startIndex); let displayName = fileName; + + //LogSeq specific const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/); if (name) { displayName = name[1]; diff --git a/src/converters/obsidian/extractMarkdownNodes.ts b/src/converters/obsidian/extractMarkdownNodes.ts index 85d727a..e17098e 100644 --- a/src/converters/obsidian/extractMarkdownNodes.ts +++ b/src/converters/obsidian/extractMarkdownNodes.ts @@ -17,19 +17,10 @@ export interface MarkdownNode extends Hierarchy { content: string; } -export function extractMarkdownNodes(content: string): MarkdownNode[] { +export function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] { const nodeDescs: MarkdownNode[] = []; - let startIndex = 0; - - if (content.startsWith('---\n')) { - const frontMatterEndIndex = content.indexOf('\n---\n'); - if (frontMatterEndIndex !== -1) { - startIndex = frontMatterEndIndex + '\n---\n'.length; - } - } - - for (let index = startIndex; index < content.length; index++) { + for (let index = startPosition; index < content.length; index++) { const element = content[index]; if (element == '\n') { continue; diff --git a/src/converters/obsidian/parseFrontmatter.ts b/src/converters/obsidian/parseFrontmatter.ts new file mode 100644 index 0000000..140bdb0 --- /dev/null +++ b/src/converters/obsidian/parseFrontmatter.ts @@ -0,0 +1,63 @@ +export type FrontmatterData = { + key: string; + values: string[]; +}; + +/** + * + * @param frontmatter without the starting "---" or ending "---" + */ +export function parseFrontmatter(frontmatter: string) { + const lines = frontmatter + .split('\n') + .map((s) => s.trim()) + .filter((s) => s !== ''); + + const data: FrontmatterData[] = []; + for (let index = 0; index < lines.length; index++) { + const line = lines[index]; + + const splitLine = line + .split(':') + .map((s) => s.trim()) + .filter((s) => s !== ''); + + //skipping obsidian specific frontmatter + if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') { + continue; + } + + //one of + //key2: value2 + //key3: [one, two, three] + if (splitLine.length === 2) { + if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) { + const arr: string[] = splitLine[1] + .slice(1, -1) + .split(',') + .map((s) => s.trim()) + .filter((s) => s !== ''); + data.push({ key: splitLine[0], values: arr }); + } else { + data.push({ key: splitLine[0], values: [splitLine[1]] }); + } + } else { + //one of + //key4: + //key5: + // - value1 + // - value2 + const curData: FrontmatterData = { key: splitLine[0], values: [] }; + let counter = 1; + let nextLine = lines[index + counter]; + while (nextLine !== undefined && nextLine.startsWith('- ')) { + curData.values.push(nextLine.slice('- '.length)); + counter++; + nextLine = lines[index + counter]; + } + index += counter - 1; + data.push(curData); + } + } + return data; +} diff --git a/src/converters/obsidian/tests/parseFrontmatter.test.ts b/src/converters/obsidian/tests/parseFrontmatter.test.ts new file mode 100644 index 0000000..c3486ee --- /dev/null +++ b/src/converters/obsidian/tests/parseFrontmatter.test.ts @@ -0,0 +1,90 @@ +import { expect, test } from '@jest/globals'; +import { parseFrontmatter } from '../parseFrontmatter'; + +test('parseFrontmatter test', () => { + expect(parseFrontmatter('')).toStrictEqual([]); + expect(parseFrontmatter('key:')).toStrictEqual([{ key: 'key', values: [] }]); + expect(parseFrontmatter('key: ')).toStrictEqual([{ key: 'key', values: [] }]); + expect( + parseFrontmatter( + //multiple empty keys with different empty space + `key: + key2:`, + ), + ).toStrictEqual([ + { key: 'key', values: [] }, + { key: 'key2', values: [] }, + ]); + expect( + parseFrontmatter( + `key: value +key2:`, + ), + ).toStrictEqual([ + { key: 'key', values: ['value'] }, + { key: 'key2', values: [] }, + ]); + expect( + parseFrontmatter( + `key: value +key2: [value1, value2]`, + ), + ).toStrictEqual([ + { key: 'key', values: ['value'] }, + { key: 'key2', values: ['value1', 'value2'] }, + ]); + expect( + parseFrontmatter( + `key: value + key2: value2 + key3: [one, two, three] + key4: + - four + - five + - six`, + ), + ).toStrictEqual([ + { key: 'key', values: ['value'] }, + { key: 'key2', values: ['value2'] }, + { key: 'key3', values: ['one', 'two', 'three'] }, + { key: 'key4', values: ['four', 'five', 'six'] }, + ]); + //skipping obisidan specific frontmatter works + expect( + parseFrontmatter( + `key: value + publish: true + key2: value2 + cssclass: cool-class + key3: [one, two, three] + key4: + - four + - five + - six + aliases: [cool alias1, cool alias2] + `, + ), + ).toStrictEqual([ + { key: 'key', values: ['value'] }, + { key: 'key2', values: ['value2'] }, + { key: 'key3', values: ['one', 'two', 'three'] }, + { key: 'key4', values: ['four', 'five', 'six'] }, + ]); + expect( + parseFrontmatter( + `key: value + key4: + - four + - five + - six + key2: value2 + key3: [one, two, three] + `, + ), + ).toStrictEqual([ + { key: 'key', values: ['value'] }, + { key: 'key4', values: ['four', 'five', 'six'] }, + { key: 'key2', values: ['value2'] }, + { key: 'key3', values: ['one', 'two', 'three'] }, + ]); +}); From 563f2cd970e487fa688f07f69765ea3bf24fc297 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 10 Oct 2022 20:25:35 +0200 Subject: [PATCH 33/94] parse Obsidian frontmatter tags to supertags --- .../obsidian/ObsidianVaultConverter.ts | 15 ++++- src/converters/obsidian/VaultContext.ts | 20 ++++++- .../obsidian/convertObsidianFile.ts | 19 ++----- src/converters/obsidian/createFileNode.ts | 27 +++++++++ .../obsidian/createUnlinkedTanaNodes.ts | 1 - .../tests/ObsidianVaultConverter.test.ts | 2 +- .../obsidian/tests/fixtures/full.tif.json | 55 ++++++++++--------- .../obsidian/tests/fixtures/vault/test.md | 3 + 8 files changed, 99 insertions(+), 43 deletions(-) create mode 100644 src/converters/obsidian/createFileNode.ts diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index 6b2d136..49976a1 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -1,4 +1,4 @@ -import { appendFileSync, readFileSync, unlinkSync } from 'fs'; +import { appendFileSync, unlinkSync } from 'fs'; import path from 'path'; import { createUnlinkedTanaNodes } from './createUnlinkedTanaNodes'; import { HeadingTracker } from './filterHeadingLinks'; @@ -48,7 +48,18 @@ export async function ObsidianVaultConverter( appendFileSync(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2)); } - appendFileSync(targetPath, '\n ],\n "summary": \n' + JSON.stringify(vaultContext.summary, null, 2) + '\n}'); + //close vault-node children + appendFileSync(targetPath, '\n ]'); + + const superTags = vaultContext.createSuperTagObjects(); + if (superTags.length > 0) { + appendFileSync(targetPath, ',\n "supertags": \n' + JSON.stringify(superTags, null, 2)); + } + + appendFileSync(targetPath, ',\n "summary": \n' + JSON.stringify(vaultContext.summary, null, 2)); + + //close target object + appendFileSync(targetPath, '\n}'); return vaultContext.summary; } diff --git a/src/converters/obsidian/VaultContext.ts b/src/converters/obsidian/VaultContext.ts index ca9609e..52ca775 100644 --- a/src/converters/obsidian/VaultContext.ts +++ b/src/converters/obsidian/VaultContext.ts @@ -1,4 +1,4 @@ -import { TanaIntermediateSummary } from '../..'; +import { TanaIntermediateSummary, TanaIntermediateSupertag } from '../..'; import { idgenerator as randomGenerator } from '../../utils/utils'; export enum UidRequestType { @@ -90,6 +90,7 @@ export class VaultContext { //all block uids: > blockLinkTracker = new Map>(); invalidLinks: { uid: string; link: string }[] = []; + superTagTracker = new Map(); constructor(public idGenerator: () => string = randomGenerator) {} @@ -228,4 +229,21 @@ export class VaultContext { return unlinkedNodes; } + + /** + * + * @param tag without the # + */ + superTagUid(tag: string) { + let uid = this.superTagTracker.get(tag); + if (uid === undefined) { + uid = this.idGenerator(); + this.superTagTracker.set(tag, uid); + } + return uid; + } + + createSuperTagObjects(): TanaIntermediateSupertag[] { + return Array.from(this.superTagTracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] })); + } } diff --git a/src/converters/obsidian/convertObsidianFile.ts b/src/converters/obsidian/convertObsidianFile.ts index 4231c3d..a681dc2 100644 --- a/src/converters/obsidian/convertObsidianFile.ts +++ b/src/converters/obsidian/convertObsidianFile.ts @@ -1,9 +1,10 @@ -import { TanaIntermediateNode } from '../../types/types'; import { convertMarkdownNode } from './convertMarkdownNode'; +import { createFileNode } from './createFileNode'; import { createTree } from './createTree'; import { HierarchyType, MarkdownNode, extractMarkdownNodes } from './extractMarkdownNodes'; import { HeadingTracker } from './filterHeadingLinks'; -import { UidRequestType, VaultContext } from './VaultContext'; +import { FrontmatterData, parseFrontmatter } from './parseFrontmatter'; +import { VaultContext } from './VaultContext'; export function convertObsidianFile( fileName: string, //without ending @@ -14,10 +15,12 @@ export function convertObsidianFile( ) { let startIndex = 0; + let frontmatter: FrontmatterData[] = []; if (fileContent.startsWith('---\n')) { const frontMatterEndIndex = fileContent.indexOf('\n---\n'); if (frontMatterEndIndex !== -1) { startIndex = frontMatterEndIndex + '\n---\n'.length; + frontmatter = parseFrontmatter(fileContent.slice('---\n'.length, frontMatterEndIndex)); } } @@ -38,7 +41,7 @@ export function convertObsidianFile( const headingNodes: (MarkdownNode & { uid: string })[] = []; - const fileNode = createFileNode(displayName, today, context); + const fileNode = createFileNode(displayName, today, context, frontmatter); createTree( fileNode, @@ -60,16 +63,6 @@ export function convertObsidianFile( return fileNode; } -function createFileNode(displayName: string, today: number, context: VaultContext): TanaIntermediateNode { - return { - uid: context.uidRequest(displayName, UidRequestType.FILE), - name: displayName, - createdAt: today, - editedAt: today, - type: 'node', - }; -} - function isChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) { if (potentialParent.type === HierarchyType.ROOT) { return true; diff --git a/src/converters/obsidian/createFileNode.ts b/src/converters/obsidian/createFileNode.ts new file mode 100644 index 0000000..42f4f76 --- /dev/null +++ b/src/converters/obsidian/createFileNode.ts @@ -0,0 +1,27 @@ +import { TanaIntermediateNode } from '../../types/types'; +import { FrontmatterData } from './parseFrontmatter'; +import { UidRequestType, VaultContext } from './VaultContext'; + +export function createFileNode( + displayName: string, + today: number, + context: VaultContext, + frontmatter: FrontmatterData[], +): TanaIntermediateNode { + const supertags: string[] = []; + + frontmatter.forEach((data) => { + if (data.key === 'tags') { + supertags.push(...data.values.map((val) => context.superTagUid(val))); + } + }); + + return { + uid: context.uidRequest(displayName, UidRequestType.FILE), + name: displayName, + createdAt: today, + editedAt: today, + type: 'node', + supertags: supertags.length > 0 ? supertags : undefined, + }; +} diff --git a/src/converters/obsidian/createUnlinkedTanaNodes.ts b/src/converters/obsidian/createUnlinkedTanaNodes.ts index f1a5333..968b988 100644 --- a/src/converters/obsidian/createUnlinkedTanaNodes.ts +++ b/src/converters/obsidian/createUnlinkedTanaNodes.ts @@ -23,7 +23,6 @@ export function createUnlinkedTanaNodes( const rootNodeName = 'Missing Nodes for ' + importName; const rootNode: TanaIntermediateNode = { - //type here does not matter anymore uid: vaultContext.randomUid(), name: rootNodeName, createdAt: today, diff --git a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts index bb54fa9..08ae330 100644 --- a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts +++ b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts @@ -8,7 +8,7 @@ test('obsidian vault converter', async () => { const vaultContext = new VaultContext(deterministicGenerator()); await ObsidianVaultConverter('./src/converters/obsidian/tests/fixtures/vault', 1, vaultContext); const result = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/vault.tif.json', 'utf-8')); - // console.log(JSON.stringify(result)); + console.log(JSON.stringify(result)); unlinkSync('./src/converters/obsidian/tests/fixtures/vault.tif.json'); const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/full.tif.json', 'utf-8')); expect(result).toStrictEqual(expected); diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index ec79e1a..bb73ef8 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -62,11 +62,11 @@ "children": [ { "uid": "12", - "name": "Valid Heading [[33]]", + "name": "Valid Heading [[35]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["33"], + "refs": ["35"], "children": [ { "uid": "14", @@ -113,14 +113,15 @@ ] }, { - "uid": "24", + "uid": "26", "name": "test", "createdAt": 1, "editedAt": 1, "type": "node", + "supertags": ["24", "25"], "children": [ { - "uid": "25", + "uid": "27", "name": "Starting without [[6]].", "createdAt": 1, "editedAt": 1, @@ -128,28 +129,28 @@ "refs": ["6"] }, { - "uid": "26", + "uid": "28", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "27", "name": "[[9]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["9"] }, - { "uid": "28", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "29", "name": "[[9]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["9"] }, + { "uid": "30", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "29", + "uid": "31", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "30", - "name": "Invalid Heading [[31]]", + "uid": "32", + "name": "Invalid Heading [[33]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["31"], + "refs": ["33"], "children": [ { "uid": "22", @@ -159,18 +160,18 @@ "type": "node", "refs": ["15", "16"] }, - { "uid": "32", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "34", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, { - "uid": "33", + "uid": "35", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "34", + "uid": "36", "name": "single image", "createdAt": 1, "editedAt": 1, @@ -178,7 +179,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "35", + "uid": "37", "name": "single image some text", "createdAt": 1, "editedAt": 1, @@ -186,14 +187,14 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "36", - "name": "[[37]] [[38]]", + "uid": "38", + "name": "[[39]] [[40]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "37", + "uid": "39", "name": "multiple images", "createdAt": 1, "editedAt": 1, @@ -201,7 +202,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "38", + "uid": "40", "name": "multiple images 2", "createdAt": 1, "editedAt": 1, @@ -211,14 +212,14 @@ ] }, { - "uid": "39", - "name": "[[40]] [[40]]", + "uid": "41", + "name": "[[42]] [[42]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "40", + "uid": "42", "name": "same image", "createdAt": 1, "editedAt": 1, @@ -228,7 +229,7 @@ ] }, { - "uid": "41", + "uid": "43", "name": "ancient public baths", "createdAt": 1, "editedAt": 1, @@ -246,14 +247,14 @@ ] }, { - "uid": "42", + "uid": "44", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { "uid": "6", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "31", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "33", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "15", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "16", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "19", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, @@ -262,5 +263,9 @@ ] } ], + "supertags": [ + { "name": "supertag1", "uid": "24" }, + { "name": "supertag2", "uid": "25" } + ], "summary": { "leafNodes": 41, "topLevelNodes": 1, "totalNodes": 42, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/vault/test.md b/src/converters/obsidian/tests/fixtures/vault/test.md index 5e6dd39..386754e 100644 --- a/src/converters/obsidian/tests/fixtures/vault/test.md +++ b/src/converters/obsidian/tests/fixtures/vault/test.md @@ -1,3 +1,6 @@ +--- +tags: [supertag1, supertag2] +--- Starting without [[heading]]. # Heading here From 9a386d48b174567805af4df75741e069ddab19be Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 10 Oct 2022 20:39:38 +0200 Subject: [PATCH 34/94] Obsidian Heading Tree traversal supports more than one sub tree --- .../tests/ObsidianVaultConverter.test.ts | 2 +- .../tests/traverseTreeDepthFirst.test.ts | 40 +++++++++++++++++++ .../obsidian/traverseTreeDepthFirst.ts | 5 ++- 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts index 08ae330..bb54fa9 100644 --- a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts +++ b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts @@ -8,7 +8,7 @@ test('obsidian vault converter', async () => { const vaultContext = new VaultContext(deterministicGenerator()); await ObsidianVaultConverter('./src/converters/obsidian/tests/fixtures/vault', 1, vaultContext); const result = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/vault.tif.json', 'utf-8')); - console.log(JSON.stringify(result)); + // console.log(JSON.stringify(result)); unlinkSync('./src/converters/obsidian/tests/fixtures/vault.tif.json'); const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/full.tif.json', 'utf-8')); expect(result).toStrictEqual(expected); diff --git a/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts b/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts index b2ea409..7d4f169 100644 --- a/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts +++ b/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts @@ -48,6 +48,46 @@ test('traverseTreeBreadthFirst test', () => { }; expect(traverseTreeDepthFirst([tree], ['1', '3'])).toBe(targetNode); + //target in second subtree works + targetNode = { + uid: '4', + content: '4', + }; + tree = { + uid: '1', + content: '1', + children: [ + { + uid: 'NOT_THIS', + content: '2', + children: [ + { + uid: 'NOT_3', + content: '3', + children: [ + { + uid: 'NOT_4', + content: 'NOT_4', + }, + ], + }, + ], + }, + { + uid: '2', + content: '2', + children: [ + { + uid: '3', + content: '3', + children: [targetNode], + }, + ], + }, + ], + }; + expect(traverseTreeDepthFirst([tree], ['1', '3', '4'])).toBe(targetNode); + //parallel node with same partial part but in different subtree works targetNode = { uid: '4', diff --git a/src/converters/obsidian/traverseTreeDepthFirst.ts b/src/converters/obsidian/traverseTreeDepthFirst.ts index 2ed652d..faa2cb5 100644 --- a/src/converters/obsidian/traverseTreeDepthFirst.ts +++ b/src/converters/obsidian/traverseTreeDepthFirst.ts @@ -36,7 +36,10 @@ export function traverseTreeDepthFirst Date: Mon, 10 Oct 2022 20:44:18 +0200 Subject: [PATCH 35/94] use only distinct refs in Obsidian Importer --- src/converters/obsidian/convertMarkdownNode.ts | 18 +++++++++++------- .../obsidian/tests/fixtures/full.tif.json | 2 +- .../obsidian/tests/fixtures/vault/test.md | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/converters/obsidian/convertMarkdownNode.ts b/src/converters/obsidian/convertMarkdownNode.ts index 6cb7b13..1e09478 100644 --- a/src/converters/obsidian/convertMarkdownNode.ts +++ b/src/converters/obsidian/convertMarkdownNode.ts @@ -39,13 +39,17 @@ export function convertMarkdownNode( return [bracketLink, foundUid, result]; }); - if (foundUids.length > 0 && !tanaNode.refs) { - tanaNode.refs = []; - } - - for (const [link, foundUid, result] of foundUids) { - tanaNode.refs?.push(foundUid); - tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result); + if (foundUids.length > 0) { + //using Set to filter out links that appear multiple times + const refSet = new Set(); + if (!tanaNode.refs) { + tanaNode.refs = []; + } + for (const [link, foundUid, result] of foundUids) { + refSet.add(foundUid); + tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result); + } + tanaNode.refs.push(...Array.from(refSet.values())); } handleImages(tanaNode, today, vaultContext); diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index bb73ef8..1abdfe3 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -154,7 +154,7 @@ "children": [ { "uid": "22", - "name": "Block with [alias]([[15]]) [[16]]", + "name": "Block with [alias]([[15]]) [[15]] [[16]]", "createdAt": 1, "editedAt": 1, "type": "node", diff --git a/src/converters/obsidian/tests/fixtures/vault/test.md b/src/converters/obsidian/tests/fixtures/vault/test.md index 386754e..1e93340 100644 --- a/src/converters/obsidian/tests/fixtures/vault/test.md +++ b/src/converters/obsidian/tests/fixtures/vault/test.md @@ -12,7 +12,7 @@ a newline. ## Heading 2 - Invalid Heading [[test2#Heading 2#Heading here]] - - Block with [[Link|alias]] [[Link2]] ^BLOCK_UID + - Block with [[Link|alias]] [[Link]] [[Link2]] ^BLOCK_UID - Fun #### Out of Level From d0f74aef0840229e67553a6155a571fb5794af35 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 10 Oct 2022 21:06:10 +0200 Subject: [PATCH 36/94] Obsidian Frontmatter is converted to field nodes --- src/converters/obsidian/createFileNode.ts | 14 +- .../obsidian/tests/fixtures/full.tif.json | 123 +++++++++--------- .../tests/fixtures/vault/folder/test2.md | 3 + .../obsidian/tests/fixtures/vault/test.md | 2 + 4 files changed, 79 insertions(+), 63 deletions(-) diff --git a/src/converters/obsidian/createFileNode.ts b/src/converters/obsidian/createFileNode.ts index 42f4f76..1d9e5bb 100644 --- a/src/converters/obsidian/createFileNode.ts +++ b/src/converters/obsidian/createFileNode.ts @@ -2,17 +2,24 @@ import { TanaIntermediateNode } from '../../types/types'; import { FrontmatterData } from './parseFrontmatter'; import { UidRequestType, VaultContext } from './VaultContext'; +function frontMatterToFieldNode(data: FrontmatterData, today: number, context: VaultContext): TanaIntermediateNode { + return { uid: context.randomUid(), name: data.values.join(', '), type: 'field', createdAt: today, editedAt: today }; +} + export function createFileNode( displayName: string, today: number, context: VaultContext, frontmatter: FrontmatterData[], ): TanaIntermediateNode { - const supertags: string[] = []; + let supertags: string[] | undefined; + const fieldNodes: TanaIntermediateNode[] = []; frontmatter.forEach((data) => { if (data.key === 'tags') { - supertags.push(...data.values.map((val) => context.superTagUid(val))); + supertags = data.values.map((val) => context.superTagUid(val)); + } else { + fieldNodes.push(frontMatterToFieldNode(data, today, context)); } }); @@ -22,6 +29,7 @@ export function createFileNode( createdAt: today, editedAt: today, type: 'node', - supertags: supertags.length > 0 ? supertags : undefined, + supertags, + children: fieldNodes.length > 0 ? fieldNodes : undefined, }; } diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index 1abdfe3..29ab53e 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -24,82 +24,83 @@ "children": [{ "uid": "3", "name": "test4", "createdAt": 1, "editedAt": 1, "type": "node" }] }, { - "uid": "4", + "uid": "6", "name": "test2", "createdAt": 1, "editedAt": 1, "type": "node", + "supertags": ["4", "5"], "children": [ { - "uid": "5", - "name": "Starting without [[6]] 2.", + "uid": "7", + "name": "Starting without [[8]] 2.", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["6"] + "refs": ["8"] }, { - "uid": "7", + "uid": "9", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "8", "name": "[[9]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["9"] }, + { "uid": "10", "name": "[[11]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["11"] }, { - "uid": "10", + "uid": "12", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "11", + "uid": "13", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "12", - "name": "Valid Heading [[35]]", + "uid": "14", + "name": "Valid Heading [[37]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["35"], + "refs": ["37"], "children": [ { - "uid": "14", - "name": "Node with [[15]] [[16]]", + "uid": "16", + "name": "Node with [[17]] [[18]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["15", "16"] + "refs": ["17", "18"] }, { - "uid": "17", - "name": "Fun with missing block ref [[18]] [[19]]", + "uid": "19", + "name": "Fun with missing block ref [[20]] [[21]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["18", "19"] + "refs": ["20", "21"] } ] }, { - "uid": "20", + "uid": "22", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "21", - "name": "Referencing a block [[22]]", + "uid": "23", + "name": "Referencing a block [[24]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["22"] + "refs": ["24"] } ] } @@ -109,69 +110,71 @@ } ] }, - { "uid": "23", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "25", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, { - "uid": "26", + "uid": "28", "name": "test", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["24", "25"], + "supertags": ["4", "5"], "children": [ + { "uid": "26", "name": "zero", "type": "field", "createdAt": 1, "editedAt": 1 }, + { "uid": "27", "name": "value1, value2", "type": "field", "createdAt": 1, "editedAt": 1 }, { - "uid": "27", - "name": "Starting without [[6]].", + "uid": "29", + "name": "Starting without [[8]].", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["6"] + "refs": ["8"] }, { - "uid": "28", + "uid": "30", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "29", "name": "[[9]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["9"] }, - { "uid": "30", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "31", "name": "[[11]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["11"] }, + { "uid": "32", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "31", + "uid": "33", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "32", - "name": "Invalid Heading [[33]]", + "uid": "34", + "name": "Invalid Heading [[35]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["33"], + "refs": ["35"], "children": [ { - "uid": "22", - "name": "Block with [alias]([[15]]) [[15]] [[16]]", + "uid": "24", + "name": "Block with [alias]([[17]]) [[17]] [[18]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["15", "16"] + "refs": ["17", "18"] }, - { "uid": "34", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "36", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, { - "uid": "35", + "uid": "37", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "36", + "uid": "38", "name": "single image", "createdAt": 1, "editedAt": 1, @@ -179,7 +182,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "37", + "uid": "39", "name": "single image some text", "createdAt": 1, "editedAt": 1, @@ -187,14 +190,14 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "38", - "name": "[[39]] [[40]]", + "uid": "40", + "name": "[[41]] [[42]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "39", + "uid": "41", "name": "multiple images", "createdAt": 1, "editedAt": 1, @@ -202,7 +205,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "40", + "uid": "42", "name": "multiple images 2", "createdAt": 1, "editedAt": 1, @@ -212,14 +215,14 @@ ] }, { - "uid": "41", - "name": "[[42]] [[42]]", + "uid": "43", + "name": "[[44]] [[44]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "42", + "uid": "44", "name": "same image", "createdAt": 1, "editedAt": 1, @@ -229,7 +232,7 @@ ] }, { - "uid": "43", + "uid": "45", "name": "ancient public baths", "createdAt": 1, "editedAt": 1, @@ -247,25 +250,25 @@ ] }, { - "uid": "44", + "uid": "46", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "6", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "33", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "15", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "16", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "19", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "9", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "18", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "8", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "35", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "17", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "18", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "21", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "11", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "20", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ], "supertags": [ - { "name": "supertag1", "uid": "24" }, - { "name": "supertag2", "uid": "25" } + { "name": "supertag1", "uid": "4" }, + { "name": "supertag2", "uid": "5" } ], - "summary": { "leafNodes": 41, "topLevelNodes": 1, "totalNodes": 42, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } + "summary": { "leafNodes": 43, "topLevelNodes": 1, "totalNodes": 44, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/vault/folder/test2.md b/src/converters/obsidian/tests/fixtures/vault/folder/test2.md index b375e1c..112f37a 100644 --- a/src/converters/obsidian/tests/fixtures/vault/folder/test2.md +++ b/src/converters/obsidian/tests/fixtures/vault/folder/test2.md @@ -1,3 +1,6 @@ +--- +tags: [supertag1, supertag2] +--- Starting without [[heading]] 2. # Heading here diff --git a/src/converters/obsidian/tests/fixtures/vault/test.md b/src/converters/obsidian/tests/fixtures/vault/test.md index 1e93340..c575943 100644 --- a/src/converters/obsidian/tests/fixtures/vault/test.md +++ b/src/converters/obsidian/tests/fixtures/vault/test.md @@ -1,5 +1,7 @@ --- +field0: zero tags: [supertag1, supertag2] +field1: [value1, value2] --- Starting without [[heading]]. # Heading here From b79950e8863286103c069a707a1891907ce23f48 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 10 Oct 2022 21:32:27 +0200 Subject: [PATCH 37/94] conversion of Obsidian tags to supertags --- .../obsidian/convertMarkdownNode.ts | 20 ++++++++- .../obsidian/tests/fixtures/full.tif.json | 44 ++++++++++++------- .../obsidian/tests/fixtures/vault/test.md | 4 +- 3 files changed, 47 insertions(+), 21 deletions(-) diff --git a/src/converters/obsidian/convertMarkdownNode.ts b/src/converters/obsidian/convertMarkdownNode.ts index 1e09478..6d91ee0 100644 --- a/src/converters/obsidian/convertMarkdownNode.ts +++ b/src/converters/obsidian/convertMarkdownNode.ts @@ -4,6 +4,10 @@ import { extractImageLinks } from './extractImageLinks'; import { MarkdownNode } from './extractMarkdownNodes'; import { UidRequestType, VaultContext } from './VaultContext'; +// eslint is just wrong here +// eslint-disable-next-line no-useless-escape +const tagRegex = /(?:\s|^)(#([^\[\]]+?))(?:(?=\s)|$)/g; + export function convertMarkdownNode( fileName: string, obsidianNode: MarkdownNode, @@ -22,8 +26,20 @@ export function convertMarkdownNode( //LogSeq specific tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim(); - // tags, convert to links for now - tanaNode.name = tanaNode.name.replace(/(?:\s|^)(#([^[]]+?))(?:(?=\s)|$)/g, ' #[[$2]]'); + // tags are kept inline but added as separate supertags too + // in obsidian tags are really tags so should be kept that way, but might be used inline, so shouldnt be remove + const tags = tanaNode.name.match(tagRegex); + if (tags) { + const supertags = new Set(tags.map((tag) => vaultContext.superTagUid(tag.trim().slice(1)))); + + //we can remove the last tag without losing meaning because it will show up as a super tag anyways + const lastTag = tags[tags.length - 1]; + if (tanaNode.name.endsWith(lastTag)) { + tanaNode.name = tanaNode.name.slice(0, -lastTag.length); + } + + tanaNode.supertags = Array.from(supertags); + } const foundUids = getBracketLinks(tanaNode.name, true).map((bracketLink) => { //handling aliases diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index 29ab53e..d1e0b4d 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -63,11 +63,11 @@ "children": [ { "uid": "14", - "name": "Valid Heading [[37]]", + "name": "Valid Heading [[39]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["37"], + "refs": ["39"], "children": [ { "uid": "16", @@ -157,24 +157,32 @@ "children": [ { "uid": "24", - "name": "Block with [alias]([[17]]) [[17]] [[18]]", + "name": "Block with #inlinetag2 [alias]([[17]]) [[17]] [[18]]", "createdAt": 1, "editedAt": 1, "type": "node", + "supertags": ["36", "37"], "refs": ["17", "18"] }, - { "uid": "36", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } + { + "uid": "38", + "name": "#inlinetag2 Fun", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "supertags": ["36"] + } ] }, { - "uid": "37", + "uid": "39", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "38", + "uid": "40", "name": "single image", "createdAt": 1, "editedAt": 1, @@ -182,7 +190,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "39", + "uid": "41", "name": "single image some text", "createdAt": 1, "editedAt": 1, @@ -190,14 +198,14 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "40", - "name": "[[41]] [[42]]", + "uid": "42", + "name": "[[43]] [[44]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "41", + "uid": "43", "name": "multiple images", "createdAt": 1, "editedAt": 1, @@ -205,7 +213,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "42", + "uid": "44", "name": "multiple images 2", "createdAt": 1, "editedAt": 1, @@ -215,14 +223,14 @@ ] }, { - "uid": "43", - "name": "[[44]] [[44]]", + "uid": "45", + "name": "[[46]] [[46]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "44", + "uid": "46", "name": "same image", "createdAt": 1, "editedAt": 1, @@ -232,7 +240,7 @@ ] }, { - "uid": "45", + "uid": "47", "name": "ancient public baths", "createdAt": 1, "editedAt": 1, @@ -250,7 +258,7 @@ ] }, { - "uid": "46", + "uid": "48", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, @@ -268,7 +276,9 @@ ], "supertags": [ { "name": "supertag1", "uid": "4" }, - { "name": "supertag2", "uid": "5" } + { "name": "supertag2", "uid": "5" }, + { "name": "inlinetag2", "uid": "36" }, + { "name": "inlinetag1", "uid": "37" } ], "summary": { "leafNodes": 43, "topLevelNodes": 1, "totalNodes": 44, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/vault/test.md b/src/converters/obsidian/tests/fixtures/vault/test.md index c575943..273bea6 100644 --- a/src/converters/obsidian/tests/fixtures/vault/test.md +++ b/src/converters/obsidian/tests/fixtures/vault/test.md @@ -14,8 +14,8 @@ a newline. ## Heading 2 - Invalid Heading [[test2#Heading 2#Heading here]] - - Block with [[Link|alias]] [[Link]] [[Link2]] ^BLOCK_UID - - Fun + - Block with #inlinetag2 [[Link|alias]] [[Link]] [[Link2]] #inlinetag1 ^BLOCK_UID + - #inlinetag2 Fun #inlinetag2 #### Out of Level From 94f18beb4b7cb9f69bff8d7fdbe2fe1d431f23d9 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 10 Oct 2022 21:48:48 +0200 Subject: [PATCH 38/94] Obsidian Importer can deal with *-s not being outliner nodes --- .../obsidian/extractMarkdownNodes.ts | 23 ++++++++++++-- .../tests/convertMarkdownNode.test.ts | 31 +++++++++++++++++++ 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/src/converters/obsidian/extractMarkdownNodes.ts b/src/converters/obsidian/extractMarkdownNodes.ts index e17098e..e5c296f 100644 --- a/src/converters/obsidian/extractMarkdownNodes.ts +++ b/src/converters/obsidian/extractMarkdownNodes.ts @@ -40,12 +40,31 @@ export function extractMarkdownNodes(content: string, startPosition = 0): Markdo } function isOutlinerNodeStart(content: string, pos: number) { + let isOutlinerStart = true; + const char = content[pos]; const secondChar = content[pos + 1]; if ((char === '*' || char === '-') && secondChar === ' ') { - return true; + isOutlinerStart = true; + } else { + isOutlinerStart = !isNaN(parseInt(char)) && secondChar === '.' && content[pos + 2] === ' '; + } + + //outliner nodes always have \n( *) in front of them or are at the start of the file + //so need to backtrack empty space to verify + if (pos > 0 && content[pos - 1] !== '\n') { + let curPos = pos - 1; + let curChar = content[curPos]; + while (curChar === ' ') { + curPos--; + curChar = content[curPos]; + } + if (!(curChar === '\n' || curChar === undefined)) { + isOutlinerStart = false; + } } - return !isNaN(parseInt(char)) && secondChar === '.' && content[pos + 2] === ' '; + + return isOutlinerStart; } function getHierarchy(curChar: string, content: string, curPosition: number): Hierarchy { diff --git a/src/converters/obsidian/tests/convertMarkdownNode.test.ts b/src/converters/obsidian/tests/convertMarkdownNode.test.ts index c4b2f69..e6c3a19 100644 --- a/src/converters/obsidian/tests/convertMarkdownNode.test.ts +++ b/src/converters/obsidian/tests/convertMarkdownNode.test.ts @@ -71,6 +71,37 @@ https://mek.fyi/posts/why-books-work-and-could-work-better type: HierarchyType.PARAGRAPH, }, ]); + + //can deal with *-s not being outliner nodes + expect( + extractMarkdownNodes(`--- +On first glance, the expected result seems wrong to me. Looking at the \`paragraph-run-style-emphasis-flip.docx\` test document's XML markup and rendering in Microsoft Word (v15.29), I would expect a **nested** emphasis, not a **"breaking out"** of the outer emphasis:`), + ).toStrictEqual([ + { + content: `--- +On first glance, the expected result seems wrong to me. Looking at the \`paragraph-run-style-emphasis-flip.docx\` test document's XML markup and rendering in Microsoft Word (v15.29), I would expect a **nested** emphasis, not a **"breaking out"** of the outer emphasis:`, + level: 0, + type: HierarchyType.PARAGRAPH, + }, + ]); + + //tables are extracted as PARAGRAPH + expect( + extractMarkdownNodes(` +| Foo | Bar | +| --- | --- | +| foo | bar | +| foo | bar |`), + ).toStrictEqual([ + { + content: `| Foo | Bar | +| --- | --- | +| foo | bar | +| foo | bar |`, + level: 0, + type: HierarchyType.PARAGRAPH, + }, + ]); }); test('outliner nodes', () => { From ae3b9a027de3b2cc713393542ee7a5281022ae30 Mon Sep 17 00:00:00 2001 From: vicrdguez Date: Tue, 11 Oct 2022 20:51:18 +0300 Subject: [PATCH 39/94] Added support for Obsidian Daily Notes to Calendar notes --- package.json | 1 + .../obsidian/ObsidianVaultConverter.ts | 28 +- src/converters/obsidian/VaultContext.ts | 11 +- src/converters/obsidian/createFileNode.ts | 25 +- .../tests/ObsidianVaultConverter.test.ts | 5 +- .../obsidian/tests/VaultContext.test.ts | 6 +- .../obsidian/tests/fixtures/full.tif.json | 371 ++++++++++++++---- .../fixtures/vault/.obsidian/daily-notes.json | 4 + .../tests/fixtures/vault/04-10-2022.md | 16 + src/runner.ts | 3 +- yarn.lock | 5 + 11 files changed, 383 insertions(+), 92 deletions(-) create mode 100644 src/converters/obsidian/tests/fixtures/vault/.obsidian/daily-notes.json create mode 100644 src/converters/obsidian/tests/fixtures/vault/04-10-2022.md diff --git a/package.json b/package.json index 6e7f692..ca59f4e 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "typescript": "^4.7.4" }, "dependencies": { + "moment": "^2.29.4", "opml": "^0.4.24" }, "eslintConfig": { diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index 49976a1..78f8767 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -1,5 +1,6 @@ import { appendFileSync, unlinkSync } from 'fs'; import path from 'path'; +import fs from 'fs'; import { createUnlinkedTanaNodes } from './createUnlinkedTanaNodes'; import { HeadingTracker } from './filterHeadingLinks'; import { postProcessTIFFIle } from './postProcessTIFFile'; @@ -10,16 +11,10 @@ import { VaultContext } from './VaultContext'; * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults. * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly. */ -export async function ObsidianVaultConverter( - vaultPath: string, - today: number = Date.now(), - vaultContext: VaultContext = new VaultContext(), -) { - if (vaultPath.endsWith('/')) { - vaultPath = vaultPath.slice(0, -1); - } +export async function ObsidianVaultConverter(vaultContext: VaultContext, today: number = Date.now()) { + loadDailyNotesConfig(vaultContext); - const targetPath = `${vaultPath}.tif.json`; + const targetPath = `${vaultContext.vaultPath}.tif.json`; try { unlinkSync(targetPath); // eslint-disable-next-line no-empty @@ -29,7 +24,7 @@ export async function ObsidianVaultConverter( const headingTracker: HeadingTracker = new Map(); handleVault( - vaultPath, + vaultContext.vaultPath, addParentNodeStart(targetPath, today, vaultContext), addParentNodeEnd(targetPath), addFileNode(targetPath, today, vaultContext, headingTracker), @@ -43,7 +38,7 @@ export async function ObsidianVaultConverter( //because the unlinked summary nodes are just created by the converter and have no connection to the rest await postProcessTIFFIle(targetPath, vaultContext, headingTracker); - const collectedUnlinkedNodes = createUnlinkedTanaNodes(path.basename(vaultPath), today, vaultContext); + const collectedUnlinkedNodes = createUnlinkedTanaNodes(path.basename(vaultContext.vaultPath), today, vaultContext); if (collectedUnlinkedNodes) { appendFileSync(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2)); } @@ -63,3 +58,14 @@ export async function ObsidianVaultConverter( return vaultContext.summary; } + +function loadDailyNotesConfig(vaultContext: VaultContext) { + const dailyNotesConfigFile = path.join(vaultContext.vaultPath, '/.obsidian/daily-notes.json'); + + if (fs.existsSync(dailyNotesConfigFile)) { + //if file does not exists, daily note config was kept default + let rawjson = fs.readFileSync(dailyNotesConfigFile); + let dailyNoteConfig = JSON.parse(rawjson.toString()); + vaultContext.dailyNoteFormat = dailyNoteConfig.format; + } +} diff --git a/src/converters/obsidian/VaultContext.ts b/src/converters/obsidian/VaultContext.ts index 52ca775..8f0c9cb 100644 --- a/src/converters/obsidian/VaultContext.ts +++ b/src/converters/obsidian/VaultContext.ts @@ -92,7 +92,16 @@ export class VaultContext { invalidLinks: { uid: string; link: string }[] = []; superTagTracker = new Map(); - constructor(public idGenerator: () => string = randomGenerator) {} + dailyNoteFormat = 'YYYY-MM-DD'; //Default obsidian Daily note format + + vaultPath: string; + + constructor(vaultPath: string, public idGenerator: () => string = randomGenerator) { + if (vaultPath.endsWith('/')) { + vaultPath = vaultPath.slice(0, -1); + } + this.vaultPath = vaultPath; + } /** * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content. diff --git a/src/converters/obsidian/createFileNode.ts b/src/converters/obsidian/createFileNode.ts index 1d9e5bb..a6513b0 100644 --- a/src/converters/obsidian/createFileNode.ts +++ b/src/converters/obsidian/createFileNode.ts @@ -1,6 +1,7 @@ -import { TanaIntermediateNode } from '../../types/types'; +import { NodeType, TanaIntermediateNode } from '../../types/types'; import { FrontmatterData } from './parseFrontmatter'; import { UidRequestType, VaultContext } from './VaultContext'; +import moment from 'moment'; function frontMatterToFieldNode(data: FrontmatterData, today: number, context: VaultContext): TanaIntermediateNode { return { uid: context.randomUid(), name: data.values.join(', '), type: 'field', createdAt: today, editedAt: today }; @@ -23,13 +24,31 @@ export function createFileNode( } }); + let nodeUid = context.uidRequest(displayName, UidRequestType.FILE); + let nodeType: NodeType = 'node'; + const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat); + + if (dateDisplayName.length > 0) { + nodeUid = dateDisplayName; + nodeType = 'date'; + displayName = dateDisplayName; + } + return { - uid: context.uidRequest(displayName, UidRequestType.FILE), + uid: nodeUid, name: displayName, createdAt: today, editedAt: today, - type: 'node', + type: nodeType, supertags, children: fieldNodes.length > 0 ? fieldNodes : undefined, }; } + +function dateStringToDateUID(displayName: string, dateFormat: string): string { + let date = moment(displayName, dateFormat, true); + if (date.isValid()) { + return date.format('MM-DD-YYYY'); + } + return ''; +} diff --git a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts index bb54fa9..f5305ba 100644 --- a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts +++ b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts @@ -5,11 +5,12 @@ import { VaultContext } from '../VaultContext'; import { deterministicGenerator } from './testUtils'; test('obsidian vault converter', async () => { - const vaultContext = new VaultContext(deterministicGenerator()); - await ObsidianVaultConverter('./src/converters/obsidian/tests/fixtures/vault', 1, vaultContext); + const vaultContext = new VaultContext('./src/converters/obsidian/tests/fixtures/vault', deterministicGenerator()); + await ObsidianVaultConverter(vaultContext, 1); const result = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/vault.tif.json', 'utf-8')); // console.log(JSON.stringify(result)); unlinkSync('./src/converters/obsidian/tests/fixtures/vault.tif.json'); const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/full.tif.json', 'utf-8')); + expect(vaultContext.dailyNoteFormat).toBe('DD-MM-YYYY'); expect(result).toStrictEqual(expected); }); diff --git a/src/converters/obsidian/tests/VaultContext.test.ts b/src/converters/obsidian/tests/VaultContext.test.ts index 6dfc28a..ff74651 100644 --- a/src/converters/obsidian/tests/VaultContext.test.ts +++ b/src/converters/obsidian/tests/VaultContext.test.ts @@ -3,7 +3,7 @@ import { UidRequestType, VaultContext } from '../VaultContext'; import { deterministicGenerator } from './testUtils'; test('VaultContext uid test', () => { - const vaultContext = new VaultContext(deterministicGenerator()); + const vaultContext = new VaultContext('', deterministicGenerator()); expect(vaultContext.uidRequest('link', UidRequestType.CONTENT)).toBe('0'); //no change on second call expect(vaultContext.uidRequest('link', UidRequestType.CONTENT)).toBe('0'); @@ -33,7 +33,7 @@ test('VaultContext uid test', () => { test('VaultContext uid block link test', () => { //first reading the file, then encountering the block ref - const vaultContext = new VaultContext(deterministicGenerator()); + const vaultContext = new VaultContext('', deterministicGenerator()); const [uid, content] = vaultContext.contentUid('fileName', 'content ^uid'); expect(uid).toBe('0'); expect(content).toBe('content'); @@ -56,7 +56,7 @@ test('VaultContext uid block link test', () => { }); test('VaultContext invalid nodes test', () => { - const vaultContext = new VaultContext(deterministicGenerator()); + const vaultContext = new VaultContext('', deterministicGenerator()); //the block link has not been accessed from its source / has not been found - just used vaultContext.uidRequest('fileName#^uid', UidRequestType.CONTENT); expect(vaultContext.getAllInvalidContentLinks()).toStrictEqual([{ uid: '0', link: 'fileName#^uid' }]); diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index d1e0b4d..4ad0c2a 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -9,98 +9,218 @@ "type": "node", "children": [ { - "uid": "1", + "uid": "10-04-2022", + "name": "10-04-2022", + "createdAt": 1, + "editedAt": 1, + "type": "date", + "children": [ + { + "uid": "2", + "name": "Starting without [[3]].", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": [ + "3" + ] + }, + { + "uid": "4", + "name": "Heading here", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "5", + "name": "[[6]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": [ + "6" + ] + }, + { + "uid": "7", + "name": "Stuff but with\na newline.", + "createdAt": 1, + "editedAt": 1, + "type": "node" + }, + { + "uid": "8", + "name": "Heading 2", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "9", + "name": "Some", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "10", + "name": "Node with [[11]] [[12]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": [ + "11", + "12" + ] + }, + { + "uid": "13", + "name": "Fun", + "createdAt": 1, + "editedAt": 1, + "type": "node" + } + ] + }, + { + "uid": "14", + "name": "Out of Level", + "createdAt": 1, + "editedAt": 1, + "type": "node" + } + ] + } + ] + } + ] + }, + { + "uid": "15", "name": "folder", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "2", + "uid": "16", "name": "folder", "createdAt": 1, "editedAt": 1, "type": "node", - "children": [{ "uid": "3", "name": "test4", "createdAt": 1, "editedAt": 1, "type": "node" }] + "children": [ + { + "uid": "17", + "name": "test4", + "createdAt": 1, + "editedAt": 1, + "type": "node" + } + ] }, { - "uid": "6", + "uid": "20", "name": "test2", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["4", "5"], + "supertags": [ + "18", + "19" + ], "children": [ { - "uid": "7", - "name": "Starting without [[8]] 2.", + "uid": "21", + "name": "Starting without [[3]] 2.", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["8"] + "refs": [ + "3" + ] }, { - "uid": "9", + "uid": "22", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "10", "name": "[[11]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["11"] }, { - "uid": "12", + "uid": "23", + "name": "[[6]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": [ + "6" + ] + }, + { + "uid": "24", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "13", + "uid": "25", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "14", - "name": "Valid Heading [[39]]", + "uid": "26", + "name": "Valid Heading [[49]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["39"], + "refs": [ + "49" + ], "children": [ { - "uid": "16", - "name": "Node with [[17]] [[18]]", + "uid": "28", + "name": "Node with [[11]] [[12]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["17", "18"] + "refs": [ + "11", + "12" + ] }, { - "uid": "19", - "name": "Fun with missing block ref [[20]] [[21]]", + "uid": "29", + "name": "Fun with missing block ref [[30]] [[31]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["20", "21"] + "refs": [ + "30", + "31" + ] } ] }, { - "uid": "22", + "uid": "32", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "23", - "name": "Referencing a block [[24]]", + "uid": "33", + "name": "Referencing a block [[34]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["24"] + "refs": [ + "34" + ] } ] } @@ -110,79 +230,127 @@ } ] }, - { "uid": "25", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } + { + "uid": "35", + "name": "test3", + "createdAt": 1, + "editedAt": 1, + "type": "node" + } ] }, { - "uid": "28", + "uid": "38", "name": "test", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["4", "5"], + "supertags": [ + "18", + "19" + ], "children": [ - { "uid": "26", "name": "zero", "type": "field", "createdAt": 1, "editedAt": 1 }, - { "uid": "27", "name": "value1, value2", "type": "field", "createdAt": 1, "editedAt": 1 }, { - "uid": "29", - "name": "Starting without [[8]].", + "uid": "36", + "name": "zero", + "type": "field", + "createdAt": 1, + "editedAt": 1 + }, + { + "uid": "37", + "name": "value1, value2", + "type": "field", + "createdAt": 1, + "editedAt": 1 + }, + { + "uid": "39", + "name": "Starting without [[3]].", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["8"] + "refs": [ + "3" + ] }, { - "uid": "30", + "uid": "40", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "31", "name": "[[11]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["11"] }, - { "uid": "32", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "33", + "uid": "41", + "name": "[[6]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": [ + "6" + ] + }, + { + "uid": "42", + "name": "Stuff but with\na newline.", + "createdAt": 1, + "editedAt": 1, + "type": "node" + }, + { + "uid": "43", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "34", - "name": "Invalid Heading [[35]]", + "uid": "44", + "name": "Invalid Heading [[45]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["35"], + "refs": [ + "45" + ], "children": [ { - "uid": "24", - "name": "Block with #inlinetag2 [alias]([[17]]) [[17]] [[18]]", + "uid": "34", + "name": "Block with #inlinetag2 [alias]([[11]]) [[11]] [[12]]", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["36", "37"], - "refs": ["17", "18"] + "supertags": [ + "46", + "47" + ], + "refs": [ + "11", + "12" + ] }, { - "uid": "38", + "uid": "48", "name": "#inlinetag2 Fun", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["36"] + "supertags": [ + "46" + ] } ] }, { - "uid": "39", + "uid": "49", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "40", + "uid": "50", "name": "single image", "createdAt": 1, "editedAt": 1, @@ -190,7 +358,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "41", + "uid": "51", "name": "single image some text", "createdAt": 1, "editedAt": 1, @@ -198,14 +366,14 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "42", - "name": "[[43]] [[44]]", + "uid": "52", + "name": "[[53]] [[54]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "43", + "uid": "53", "name": "multiple images", "createdAt": 1, "editedAt": 1, @@ -213,7 +381,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "44", + "uid": "54", "name": "multiple images 2", "createdAt": 1, "editedAt": 1, @@ -223,14 +391,14 @@ ] }, { - "uid": "45", - "name": "[[46]] [[46]]", + "uid": "55", + "name": "[[56]] [[56]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "46", + "uid": "56", "name": "same image", "createdAt": 1, "editedAt": 1, @@ -240,7 +408,7 @@ ] }, { - "uid": "47", + "uid": "57", "name": "ancient public baths", "createdAt": 1, "editedAt": 1, @@ -258,27 +426,88 @@ ] }, { - "uid": "48", + "uid": "58", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "8", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "35", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "17", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "18", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "21", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "11", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "20", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } + { + "uid": "3", + "name": "heading", + "createdAt": 1, + "editedAt": 1, + "type": "node" + }, + { + "uid": "45", + "name": "Heading 2#Heading here", + "createdAt": 1, + "editedAt": 1, + "type": "node" + }, + { + "uid": "11", + "name": "Link", + "createdAt": 1, + "editedAt": 1, + "type": "node" + }, + { + "uid": "12", + "name": "Link2", + "createdAt": 1, + "editedAt": 1, + "type": "node" + }, + { + "uid": "31", + "name": "missing#^MISSING", + "createdAt": 1, + "editedAt": 1, + "type": "node" + }, + { + "uid": "6", + "name": "Some", + "createdAt": 1, + "editedAt": 1, + "type": "node" + }, + { + "uid": "30", + "name": "test#^MISSING", + "createdAt": 1, + "editedAt": 1, + "type": "node" + } ] } ], "supertags": [ - { "name": "supertag1", "uid": "4" }, - { "name": "supertag2", "uid": "5" }, - { "name": "inlinetag2", "uid": "36" }, - { "name": "inlinetag1", "uid": "37" } + { + "name": "supertag1", + "uid": "18" + }, + { + "name": "supertag2", + "uid": "19" + }, + { + "name": "inlinetag2", + "uid": "46" + }, + { + "name": "inlinetag1", + "uid": "47" + } ], - "summary": { "leafNodes": 43, "topLevelNodes": 1, "totalNodes": 44, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } -} + "summary": { + "leafNodes": 53, + "topLevelNodes": 1, + "totalNodes": 54, + "calendarNodes": 0, + "fields": 0, + "brokenRefs": 0 + } +} \ No newline at end of file diff --git a/src/converters/obsidian/tests/fixtures/vault/.obsidian/daily-notes.json b/src/converters/obsidian/tests/fixtures/vault/.obsidian/daily-notes.json new file mode 100644 index 0000000..c178da5 --- /dev/null +++ b/src/converters/obsidian/tests/fixtures/vault/.obsidian/daily-notes.json @@ -0,0 +1,4 @@ +{ + "format": "DD-MM-YYYY", + "autorun": false +} \ No newline at end of file diff --git a/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md b/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md new file mode 100644 index 0000000..a4dcc17 --- /dev/null +++ b/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md @@ -0,0 +1,16 @@ + +Starting without [[heading]]. +# Heading here + +[[Some]] + +Stuff but with +a newline. + +## Heading 2 + +- Some + - Node with [[Link]] [[Link2]] + - Fun + +#### Out of Level diff --git a/src/runner.ts b/src/runner.ts index ca91d60..2b961bb 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -7,6 +7,7 @@ import { WorkflowyConverter } from './converters/workflowy'; import { lstatSync } from 'fs'; import path from 'path'; import { ObsidianVaultConverter } from './converters/obsidian'; +import { VaultContext } from './converters/obsidian/VaultContext'; const fileType = process.argv[2]; const file = process.argv[3]; @@ -67,7 +68,7 @@ async function handleFolderConversion() { let summary; switch (fileType) { case 'obsidian': - summary = await ObsidianVaultConverter(file); + summary = await ObsidianVaultConverter(new VaultContext(file)); break; default: console.log(`File type ${fileType} is not supported for folders`); diff --git a/yarn.lock b/yarn.lock index 9e5a74a..45c44a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3083,6 +3083,11 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" +moment@^2.29.4: + version "2.29.4" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" + integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== + ms@2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" From ac3775c7921df1b1cd3b112270e7d260f2f10a55 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Tue, 11 Oct 2022 21:05:59 +0200 Subject: [PATCH 40/94] convert Obsidian frontmatter to proper field-children --- src/converters/obsidian/OBSIDIAN_README.md | 17 +- .../obsidian/ObsidianVaultConverter.ts | 4 +- src/converters/obsidian/createFileNode.ts | 16 +- .../obsidian/tests/fixtures/full.tif.json | 290 ++++-------------- .../fixtures/vault/.obsidian/daily-notes.json | 2 +- src/runner.ts | 1 - 6 files changed, 92 insertions(+), 238 deletions(-) diff --git a/src/converters/obsidian/OBSIDIAN_README.md b/src/converters/obsidian/OBSIDIAN_README.md index 1122264..8ae9973 100644 --- a/src/converters/obsidian/OBSIDIAN_README.md +++ b/src/converters/obsidian/OBSIDIAN_README.md @@ -2,12 +2,12 @@ The vault converter works like this: -* go through the vault folder recursively -* create a node for each folder and append it partially to the target file (we leave the children array open) -* convert each file to a node and append it to the target file (see Markdown Nodes explanation) -* close each folder-node as soon as its done +- go through the vault folder recursively +- create a node for each folder and append it partially to the target file (we leave the children array open) +- convert each file to a node and append it to the target file (see Markdown Nodes explanation) +- close each folder-node as soon as its done -Vaults can be quite big, so this append-approach is much more performant. +Vaults can be quite big, so this append-approach is much more performant. We use the VaultContext to store all information that is needed across the whole vault, so that we don't need to go back to the created Tana nodes. # Concepts @@ -26,15 +26,14 @@ The Markdown Nodes are lightly pre-processed to contain only relevant informatio ## Conversion to the Tana IF -Markdown Nodes are converted to Tana IF Nodes, which are then used in the resulting JSON file. We use the hierarchy information in the Markdown Nodes to create the appropriate nesting. +Markdown Nodes are converted to Tana IF Nodes, which are then used in the resulting JSON file. We use the hierarchy information in the Markdown Nodes to create the appropriate nesting. Each Obsidian Link is replaced with a new UID, also each file and folder gets a UID. Via the VaultContext we make sure that the correct UID is used when we replace the Obsidian Links. ### Missing nodes -Missing Links (no file exists for these) are collected and saved in a separate node under "Missing nodes for $YOUR_VAULT_NAME". We could of course not save these links but then we would need to take care how to not lose the Obsidian Link-name (because it was converted to a UID). +Missing Links (no file exists for these) are collected and saved in a separate node under "Missing nodes for $YOUR_VAULT_NAME". We could of course not save these links but then we would need to take care how to not lose the Obsidian Link-name (because it was converted to a UID). ## VaultContext -We need some context information like the summary data that needs to be used across the whole converted vault. The place for this is the VaultContext. - +We need some context information like the summary data that needs to be used across the whole converted vault. The place for this is the VaultContext. diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index 78f8767..fc149a4 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -64,8 +64,8 @@ function loadDailyNotesConfig(vaultContext: VaultContext) { if (fs.existsSync(dailyNotesConfigFile)) { //if file does not exists, daily note config was kept default - let rawjson = fs.readFileSync(dailyNotesConfigFile); - let dailyNoteConfig = JSON.parse(rawjson.toString()); + const rawjson = fs.readFileSync(dailyNotesConfigFile); + const dailyNoteConfig = JSON.parse(rawjson.toString()); vaultContext.dailyNoteFormat = dailyNoteConfig.format; } } diff --git a/src/converters/obsidian/createFileNode.ts b/src/converters/obsidian/createFileNode.ts index a6513b0..7467601 100644 --- a/src/converters/obsidian/createFileNode.ts +++ b/src/converters/obsidian/createFileNode.ts @@ -4,7 +4,19 @@ import { UidRequestType, VaultContext } from './VaultContext'; import moment from 'moment'; function frontMatterToFieldNode(data: FrontmatterData, today: number, context: VaultContext): TanaIntermediateNode { - return { uid: context.randomUid(), name: data.values.join(', '), type: 'field', createdAt: today, editedAt: today }; + let children: TanaIntermediateNode[] | undefined; + + if (data.values && data.values.length > 0) { + children = data.values.map((value) => ({ + uid: context.randomUid(), + name: value, + type: 'node', + createdAt: today, + editedAt: today, + })); + } + + return { uid: context.randomUid(), name: data.key, type: 'field', createdAt: today, editedAt: today, children }; } export function createFileNode( @@ -46,7 +58,7 @@ export function createFileNode( } function dateStringToDateUID(displayName: string, dateFormat: string): string { - let date = moment(displayName, dateFormat, true); + const date = moment(displayName, dateFormat, true); if (date.isValid()) { return date.format('MM-DD-YYYY'); } diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index 4ad0c2a..fa31185 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -21,9 +21,7 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "refs": [ - "3" - ] + "refs": ["3"] }, { "uid": "4", @@ -32,23 +30,8 @@ "editedAt": 1, "type": "node", "children": [ - { - "uid": "5", - "name": "[[6]]", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "refs": [ - "6" - ] - }, - { - "uid": "7", - "name": "Stuff but with\na newline.", - "createdAt": 1, - "editedAt": 1, - "type": "node" - }, + { "uid": "5", "name": "[[6]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["6"] }, + { "uid": "7", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "8", "name": "Heading 2", @@ -69,27 +52,12 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "refs": [ - "11", - "12" - ] + "refs": ["11", "12"] }, - { - "uid": "13", - "name": "Fun", - "createdAt": 1, - "editedAt": 1, - "type": "node" - } + { "uid": "13", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, - { - "uid": "14", - "name": "Out of Level", - "createdAt": 1, - "editedAt": 1, - "type": "node" - } + { "uid": "14", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ] @@ -109,15 +77,7 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "children": [ - { - "uid": "17", - "name": "test4", - "createdAt": 1, - "editedAt": 1, - "type": "node" - } - ] + "children": [{ "uid": "17", "name": "test4", "createdAt": 1, "editedAt": 1, "type": "node" }] }, { "uid": "20", @@ -125,10 +85,7 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": [ - "18", - "19" - ], + "supertags": ["18", "19"], "children": [ { "uid": "21", @@ -136,9 +93,7 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "refs": [ - "3" - ] + "refs": ["3"] }, { "uid": "22", @@ -147,16 +102,7 @@ "editedAt": 1, "type": "node", "children": [ - { - "uid": "23", - "name": "[[6]]", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "refs": [ - "6" - ] - }, + { "uid": "23", "name": "[[6]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["6"] }, { "uid": "24", "name": "Stuff but with\na newline.", @@ -173,13 +119,11 @@ "children": [ { "uid": "26", - "name": "Valid Heading [[49]]", + "name": "Valid Heading [[52]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": [ - "49" - ], + "refs": ["52"], "children": [ { "uid": "28", @@ -187,10 +131,7 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "refs": [ - "11", - "12" - ] + "refs": ["11", "12"] }, { "uid": "29", @@ -198,10 +139,7 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "refs": [ - "30", - "31" - ] + "refs": ["30", "31"] } ] }, @@ -218,9 +156,7 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "refs": [ - "34" - ] + "refs": ["34"] } ] } @@ -230,90 +166,67 @@ } ] }, - { - "uid": "35", - "name": "test3", - "createdAt": 1, - "editedAt": 1, - "type": "node" - } + { "uid": "35", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, { - "uid": "38", + "uid": "41", "name": "test", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": [ - "18", - "19" - ], + "supertags": ["18", "19"], "children": [ { - "uid": "36", - "name": "zero", + "uid": "37", + "name": "field0", "type": "field", "createdAt": 1, - "editedAt": 1 + "editedAt": 1, + "children": [{ "uid": "36", "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1 }] }, { - "uid": "37", - "name": "value1, value2", + "uid": "40", + "name": "field1", "type": "field", "createdAt": 1, - "editedAt": 1 + "editedAt": 1, + "children": [ + { "uid": "38", "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1 }, + { "uid": "39", "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1 } + ] }, { - "uid": "39", + "uid": "42", "name": "Starting without [[3]].", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": [ - "3" - ] + "refs": ["3"] }, { - "uid": "40", + "uid": "43", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ + { "uid": "44", "name": "[[6]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["6"] }, + { "uid": "45", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "41", - "name": "[[6]]", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "refs": [ - "6" - ] - }, - { - "uid": "42", - "name": "Stuff but with\na newline.", - "createdAt": 1, - "editedAt": 1, - "type": "node" - }, - { - "uid": "43", + "uid": "46", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "44", - "name": "Invalid Heading [[45]]", + "uid": "47", + "name": "Invalid Heading [[48]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": [ - "45" - ], + "refs": ["48"], "children": [ { "uid": "34", @@ -321,36 +234,28 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": [ - "46", - "47" - ], - "refs": [ - "11", - "12" - ] + "supertags": ["49", "50"], + "refs": ["11", "12"] }, { - "uid": "48", + "uid": "51", "name": "#inlinetag2 Fun", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": [ - "46" - ] + "supertags": ["49"] } ] }, { - "uid": "49", + "uid": "52", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "50", + "uid": "53", "name": "single image", "createdAt": 1, "editedAt": 1, @@ -358,7 +263,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "51", + "uid": "54", "name": "single image some text", "createdAt": 1, "editedAt": 1, @@ -366,14 +271,14 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "52", - "name": "[[53]] [[54]]", + "uid": "55", + "name": "[[56]] [[57]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "53", + "uid": "56", "name": "multiple images", "createdAt": 1, "editedAt": 1, @@ -381,7 +286,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "54", + "uid": "57", "name": "multiple images 2", "createdAt": 1, "editedAt": 1, @@ -391,14 +296,14 @@ ] }, { - "uid": "55", - "name": "[[56]] [[56]]", + "uid": "58", + "name": "[[59]] [[59]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "56", + "uid": "59", "name": "same image", "createdAt": 1, "editedAt": 1, @@ -408,7 +313,7 @@ ] }, { - "uid": "57", + "uid": "60", "name": "ancient public baths", "createdAt": 1, "editedAt": 1, @@ -426,88 +331,27 @@ ] }, { - "uid": "58", + "uid": "61", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { - "uid": "3", - "name": "heading", - "createdAt": 1, - "editedAt": 1, - "type": "node" - }, - { - "uid": "45", - "name": "Heading 2#Heading here", - "createdAt": 1, - "editedAt": 1, - "type": "node" - }, - { - "uid": "11", - "name": "Link", - "createdAt": 1, - "editedAt": 1, - "type": "node" - }, - { - "uid": "12", - "name": "Link2", - "createdAt": 1, - "editedAt": 1, - "type": "node" - }, - { - "uid": "31", - "name": "missing#^MISSING", - "createdAt": 1, - "editedAt": 1, - "type": "node" - }, - { - "uid": "6", - "name": "Some", - "createdAt": 1, - "editedAt": 1, - "type": "node" - }, - { - "uid": "30", - "name": "test#^MISSING", - "createdAt": 1, - "editedAt": 1, - "type": "node" - } + { "uid": "3", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "48", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "11", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "12", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "31", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "6", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "30", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ], "supertags": [ - { - "name": "supertag1", - "uid": "18" - }, - { - "name": "supertag2", - "uid": "19" - }, - { - "name": "inlinetag2", - "uid": "46" - }, - { - "name": "inlinetag1", - "uid": "47" - } + { "name": "supertag1", "uid": "18" }, + { "name": "supertag2", "uid": "19" }, + { "name": "inlinetag2", "uid": "49" }, + { "name": "inlinetag1", "uid": "50" } ], - "summary": { - "leafNodes": 53, - "topLevelNodes": 1, - "totalNodes": 54, - "calendarNodes": 0, - "fields": 0, - "brokenRefs": 0 - } -} \ No newline at end of file + "summary": { "leafNodes": 56, "topLevelNodes": 1, "totalNodes": 57, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } +} diff --git a/src/converters/obsidian/tests/fixtures/vault/.obsidian/daily-notes.json b/src/converters/obsidian/tests/fixtures/vault/.obsidian/daily-notes.json index c178da5..37edffb 100644 --- a/src/converters/obsidian/tests/fixtures/vault/.obsidian/daily-notes.json +++ b/src/converters/obsidian/tests/fixtures/vault/.obsidian/daily-notes.json @@ -1,4 +1,4 @@ { "format": "DD-MM-YYYY", "autorun": false -} \ No newline at end of file +} diff --git a/src/runner.ts b/src/runner.ts index 2b961bb..f7df5bd 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -5,7 +5,6 @@ import { RoamConverter } from './converters/roam/index'; import { TanaIntermediateFile } from './types/types'; import { WorkflowyConverter } from './converters/workflowy'; import { lstatSync } from 'fs'; -import path from 'path'; import { ObsidianVaultConverter } from './converters/obsidian'; import { VaultContext } from './converters/obsidian/VaultContext'; From 6920df1b5f4e89cfb886a1bd6ea82bba3f7b8f05 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Wed, 12 Oct 2022 00:11:23 +0200 Subject: [PATCH 41/94] Obsidian frontmatter attributes are properly added as attributes --- .../obsidian/ObsidianVaultConverter.ts | 8 +- src/converters/obsidian/VaultContext.ts | 12 +- src/converters/obsidian/createFileNode.ts | 1 + .../obsidian/tests/fixtures/full.tif.json | 182 ++++++++++-------- .../tests/fixtures/vault/04-10-2022.md | 3 + 5 files changed, 119 insertions(+), 87 deletions(-) diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index fc149a4..68c803d 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -51,6 +51,10 @@ export async function ObsidianVaultConverter(vaultContext: VaultContext, today: appendFileSync(targetPath, ',\n "supertags": \n' + JSON.stringify(superTags, null, 2)); } + if (vaultContext.attributes.length > 0) { + appendFileSync(targetPath, ',\n "attributes": \n' + JSON.stringify(vaultContext.attributes, null, 2)); + } + appendFileSync(targetPath, ',\n "summary": \n' + JSON.stringify(vaultContext.summary, null, 2)); //close target object @@ -66,6 +70,8 @@ function loadDailyNotesConfig(vaultContext: VaultContext) { //if file does not exists, daily note config was kept default const rawjson = fs.readFileSync(dailyNotesConfigFile); const dailyNoteConfig = JSON.parse(rawjson.toString()); - vaultContext.dailyNoteFormat = dailyNoteConfig.format; + if (dailyNoteConfig.format) { + vaultContext.dailyNoteFormat = dailyNoteConfig.format; + } } } diff --git a/src/converters/obsidian/VaultContext.ts b/src/converters/obsidian/VaultContext.ts index 8f0c9cb..4fcb4e7 100644 --- a/src/converters/obsidian/VaultContext.ts +++ b/src/converters/obsidian/VaultContext.ts @@ -1,4 +1,4 @@ -import { TanaIntermediateSummary, TanaIntermediateSupertag } from '../..'; +import { TanaIntermediateSummary, TanaIntermediateAttribute, TanaIntermediateSupertag } from '../../types/types'; import { idgenerator as randomGenerator } from '../../utils/utils'; export enum UidRequestType { @@ -91,6 +91,7 @@ export class VaultContext { blockLinkTracker = new Map>(); invalidLinks: { uid: string; link: string }[] = []; superTagTracker = new Map(); + attributes: TanaIntermediateAttribute[] = []; dailyNoteFormat = 'YYYY-MM-DD'; //Default obsidian Daily note format @@ -255,4 +256,13 @@ export class VaultContext { createSuperTagObjects(): TanaIntermediateSupertag[] { return Array.from(this.superTagTracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] })); } + + addAttribute(name: string) { + const foundAttr = this.attributes.filter((attr) => attr.name === name)[0]; + if (foundAttr) { + foundAttr.count++; + } else { + this.attributes.push({ name, values: [], count: 1 }); + } + } } diff --git a/src/converters/obsidian/createFileNode.ts b/src/converters/obsidian/createFileNode.ts index 7467601..1c5036e 100644 --- a/src/converters/obsidian/createFileNode.ts +++ b/src/converters/obsidian/createFileNode.ts @@ -15,6 +15,7 @@ function frontMatterToFieldNode(data: FrontmatterData, today: number, context: V editedAt: today, })); } + context.addAttribute(data.key); return { uid: context.randomUid(), name: data.key, type: 'field', createdAt: today, editedAt: today, children }; } diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index fa31185..5391682 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -17,47 +17,55 @@ "children": [ { "uid": "2", - "name": "Starting without [[3]].", + "name": "field0", + "type": "field", "createdAt": 1, "editedAt": 1, - "type": "node", - "refs": ["3"] + "children": [{ "uid": "1", "name": "value0", "type": "node", "createdAt": 1, "editedAt": 1 }] }, { "uid": "4", + "name": "Starting without [[5]].", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["5"] + }, + { + "uid": "6", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "5", "name": "[[6]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["6"] }, - { "uid": "7", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "7", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, + { "uid": "9", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "8", + "uid": "10", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "9", + "uid": "11", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "10", - "name": "Node with [[11]] [[12]]", + "uid": "12", + "name": "Node with [[13]] [[14]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["11", "12"] + "refs": ["13", "14"] }, - { "uid": "13", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "15", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, - { "uid": "14", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "16", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ] @@ -65,98 +73,98 @@ ] }, { - "uid": "15", + "uid": "17", "name": "folder", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "16", + "uid": "18", "name": "folder", "createdAt": 1, "editedAt": 1, "type": "node", - "children": [{ "uid": "17", "name": "test4", "createdAt": 1, "editedAt": 1, "type": "node" }] + "children": [{ "uid": "19", "name": "test4", "createdAt": 1, "editedAt": 1, "type": "node" }] }, { - "uid": "20", + "uid": "22", "name": "test2", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["18", "19"], + "supertags": ["20", "21"], "children": [ { - "uid": "21", - "name": "Starting without [[3]] 2.", + "uid": "23", + "name": "Starting without [[5]] 2.", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["3"] + "refs": ["5"] }, { - "uid": "22", + "uid": "24", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "23", "name": "[[6]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["6"] }, + { "uid": "25", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, { - "uid": "24", + "uid": "26", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "25", + "uid": "27", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "26", - "name": "Valid Heading [[52]]", + "uid": "28", + "name": "Valid Heading [[54]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["52"], + "refs": ["54"], "children": [ { - "uid": "28", - "name": "Node with [[11]] [[12]]", + "uid": "30", + "name": "Node with [[13]] [[14]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["11", "12"] + "refs": ["13", "14"] }, { - "uid": "29", - "name": "Fun with missing block ref [[30]] [[31]]", + "uid": "31", + "name": "Fun with missing block ref [[32]] [[33]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["30", "31"] + "refs": ["32", "33"] } ] }, { - "uid": "32", + "uid": "34", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "33", - "name": "Referencing a block [[34]]", + "uid": "35", + "name": "Referencing a block [[36]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["34"] + "refs": ["36"] } ] } @@ -166,96 +174,96 @@ } ] }, - { "uid": "35", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "37", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, { - "uid": "41", + "uid": "43", "name": "test", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["18", "19"], + "supertags": ["20", "21"], "children": [ { - "uid": "37", + "uid": "39", "name": "field0", "type": "field", "createdAt": 1, "editedAt": 1, - "children": [{ "uid": "36", "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1 }] + "children": [{ "uid": "38", "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1 }] }, { - "uid": "40", + "uid": "42", "name": "field1", "type": "field", "createdAt": 1, "editedAt": 1, "children": [ - { "uid": "38", "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1 }, - { "uid": "39", "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1 } + { "uid": "40", "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1 }, + { "uid": "41", "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1 } ] }, { - "uid": "42", - "name": "Starting without [[3]].", + "uid": "44", + "name": "Starting without [[5]].", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["3"] + "refs": ["5"] }, { - "uid": "43", + "uid": "45", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "44", "name": "[[6]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["6"] }, - { "uid": "45", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "46", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, + { "uid": "47", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "46", + "uid": "48", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "47", - "name": "Invalid Heading [[48]]", + "uid": "49", + "name": "Invalid Heading [[50]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["48"], + "refs": ["50"], "children": [ { - "uid": "34", - "name": "Block with #inlinetag2 [alias]([[11]]) [[11]] [[12]]", + "uid": "36", + "name": "Block with #inlinetag2 [alias]([[13]]) [[13]] [[14]]", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["49", "50"], - "refs": ["11", "12"] + "supertags": ["51", "52"], + "refs": ["13", "14"] }, { - "uid": "51", + "uid": "53", "name": "#inlinetag2 Fun", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["49"] + "supertags": ["51"] } ] }, { - "uid": "52", + "uid": "54", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "53", + "uid": "55", "name": "single image", "createdAt": 1, "editedAt": 1, @@ -263,7 +271,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "54", + "uid": "56", "name": "single image some text", "createdAt": 1, "editedAt": 1, @@ -271,14 +279,14 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "55", - "name": "[[56]] [[57]]", + "uid": "57", + "name": "[[58]] [[59]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "56", + "uid": "58", "name": "multiple images", "createdAt": 1, "editedAt": 1, @@ -286,7 +294,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "57", + "uid": "59", "name": "multiple images 2", "createdAt": 1, "editedAt": 1, @@ -296,14 +304,14 @@ ] }, { - "uid": "58", - "name": "[[59]] [[59]]", + "uid": "60", + "name": "[[61]] [[61]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "59", + "uid": "61", "name": "same image", "createdAt": 1, "editedAt": 1, @@ -313,7 +321,7 @@ ] }, { - "uid": "60", + "uid": "62", "name": "ancient public baths", "createdAt": 1, "editedAt": 1, @@ -331,27 +339,31 @@ ] }, { - "uid": "61", + "uid": "63", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "3", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "48", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "11", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "12", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "31", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "6", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "30", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "5", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "50", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "13", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "14", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "33", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "8", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "32", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ], "supertags": [ - { "name": "supertag1", "uid": "18" }, - { "name": "supertag2", "uid": "19" }, - { "name": "inlinetag2", "uid": "49" }, - { "name": "inlinetag1", "uid": "50" } + { "name": "supertag1", "uid": "20" }, + { "name": "supertag2", "uid": "21" }, + { "name": "inlinetag2", "uid": "51" }, + { "name": "inlinetag1", "uid": "52" } + ], + "attributes": [ + { "name": "field0", "values": [], "count": 2 }, + { "name": "field1", "values": [], "count": 1 } ], - "summary": { "leafNodes": 56, "topLevelNodes": 1, "totalNodes": 57, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } + "summary": { "leafNodes": 58, "topLevelNodes": 1, "totalNodes": 59, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md b/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md index a4dcc17..aa9cfc8 100644 --- a/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md +++ b/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md @@ -1,3 +1,6 @@ +--- +field0: value0 +--- Starting without [[heading]]. # Heading here From 418b8f15ed1f763844bd5f5f28a4091021dd027c Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Wed, 12 Oct 2022 00:17:33 +0200 Subject: [PATCH 42/94] Obsidian: fix field summary --- src/converters/obsidian/createFileNode.ts | 1 + src/converters/obsidian/tests/fixtures/full.tif.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/converters/obsidian/createFileNode.ts b/src/converters/obsidian/createFileNode.ts index 1c5036e..909cc05 100644 --- a/src/converters/obsidian/createFileNode.ts +++ b/src/converters/obsidian/createFileNode.ts @@ -16,6 +16,7 @@ function frontMatterToFieldNode(data: FrontmatterData, today: number, context: V })); } context.addAttribute(data.key); + context.summary.fields++; return { uid: context.randomUid(), name: data.key, type: 'field', createdAt: today, editedAt: today, children }; } diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index 5391682..bf5dbd8 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -365,5 +365,5 @@ { "name": "field0", "values": [], "count": 2 }, { "name": "field1", "values": [], "count": 1 } ], - "summary": { "leafNodes": 58, "topLevelNodes": 1, "totalNodes": 59, "calendarNodes": 0, "fields": 0, "brokenRefs": 0 } + "summary": { "leafNodes": 58, "topLevelNodes": 1, "totalNodes": 59, "calendarNodes": 0, "fields": 3, "brokenRefs": 0 } } From f8ef05a09064c171b91f39d2bbc6e2d512d1ce33 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Wed, 12 Oct 2022 00:30:22 +0200 Subject: [PATCH 43/94] Obsidian: convert todos --- .../obsidian/convertMarkdownNode.ts | 21 ++++++++++++++++++- .../obsidian/tests/fixtures/full.tif.json | 12 +++++++++-- .../tests/fixtures/vault/04-10-2022.md | 2 +- .../tests/fixtures/vault/folder/test2.md | 2 +- 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/src/converters/obsidian/convertMarkdownNode.ts b/src/converters/obsidian/convertMarkdownNode.ts index 6d91ee0..568e0d1 100644 --- a/src/converters/obsidian/convertMarkdownNode.ts +++ b/src/converters/obsidian/convertMarkdownNode.ts @@ -1,7 +1,7 @@ import { NodeType, TanaIntermediateNode } from '../../types/types'; import { getBracketLinks } from '../../utils/utils'; import { extractImageLinks } from './extractImageLinks'; -import { MarkdownNode } from './extractMarkdownNodes'; +import { HierarchyType, MarkdownNode } from './extractMarkdownNodes'; import { UidRequestType, VaultContext } from './VaultContext'; // eslint is just wrong here @@ -23,6 +23,15 @@ export function convertMarkdownNode( type: 'node' as NodeType, }; + if (obsidianNode.type === HierarchyType.OUTLINE) { + if (content.startsWith('[ ] ')) { + handleTodo(tanaNode); + } + if (content.startsWith('[x] ') || content.startsWith('[X] ')) { + handleDone(tanaNode); + } + } + //LogSeq specific tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim(); @@ -110,3 +119,13 @@ function handleImages(tanaNode: TanaIntermediateNode, today: number, vaultContex tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes]; } + +function handleTodo(tanaNode: TanaIntermediateNode) { + tanaNode.name = tanaNode.name.slice('[ ] '.length); + tanaNode.todoState = 'todo'; +} + +function handleDone(tanaNode: TanaIntermediateNode) { + tanaNode.name = tanaNode.name.slice('[x] '.length); + tanaNode.todoState = 'done'; +} diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index bf5dbd8..5548c5b 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -62,7 +62,14 @@ "type": "node", "refs": ["13", "14"] }, - { "uid": "15", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node" } + { + "uid": "15", + "name": "Fun", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "todoState": "todo" + } ] }, { "uid": "16", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } @@ -139,7 +146,8 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["13", "14"] + "refs": ["13", "14"], + "todoState": "done" }, { "uid": "31", diff --git a/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md b/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md index aa9cfc8..56b0fde 100644 --- a/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md +++ b/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md @@ -14,6 +14,6 @@ a newline. - Some - Node with [[Link]] [[Link2]] - - Fun + - [ ] Fun #### Out of Level diff --git a/src/converters/obsidian/tests/fixtures/vault/folder/test2.md b/src/converters/obsidian/tests/fixtures/vault/folder/test2.md index 112f37a..4e1dbc2 100644 --- a/src/converters/obsidian/tests/fixtures/vault/folder/test2.md +++ b/src/converters/obsidian/tests/fixtures/vault/folder/test2.md @@ -12,7 +12,7 @@ a newline. ## Heading 2 - Valid Heading [[test#Heading 2#Out of Level]] - - Node with [[Link]] [[Link2]] + - [x] Node with [[Link]] [[Link2]] - Fun with missing block ref [[test#^MISSING]] [[missing#^MISSING]] #### Out of Level From b3b0b64f682fc21b8e61bc1886bcd73de348085a Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Wed, 12 Oct 2022 19:49:27 +0200 Subject: [PATCH 44/94] Obsidian: skip [[]] with empty content --- .../obsidian/convertMarkdownNode.ts | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/converters/obsidian/convertMarkdownNode.ts b/src/converters/obsidian/convertMarkdownNode.ts index 568e0d1..1fddabe 100644 --- a/src/converters/obsidian/convertMarkdownNode.ts +++ b/src/converters/obsidian/convertMarkdownNode.ts @@ -50,19 +50,21 @@ export function convertMarkdownNode( tanaNode.supertags = Array.from(supertags); } - const foundUids = getBracketLinks(tanaNode.name, true).map((bracketLink) => { - //handling aliases - const aliasArr = bracketLink.split('|'); - const link = aliasArr[0]; - const alias = aliasArr[1]; - const foundUid = vaultContext.uidRequest(link, UidRequestType.CONTENT); - const result = - alias !== undefined && alias.trim() !== '' - ? '[' + alias.trim() + ']([[' + foundUid + ']])' - : '[[' + foundUid + ']]'; - - return [bracketLink, foundUid, result]; - }); + const foundUids = getBracketLinks(tanaNode.name, true) + .filter((bracketLink) => bracketLink.trim() !== '') + .map((bracketLink) => { + //handling aliases + const aliasArr = bracketLink.split('|'); + const link = aliasArr[0]; + const alias = aliasArr[1]; + const foundUid = vaultContext.uidRequest(link, UidRequestType.CONTENT); + const result = + alias !== undefined && alias.trim() !== '' + ? '[' + alias.trim() + ']([[' + foundUid + ']])' + : '[[' + foundUid + ']]'; + + return [bracketLink, foundUid, result]; + }); if (foundUids.length > 0) { //using Set to filter out links that appear multiple times From b7638bf9aaab41cea17a4540b48dc35952f20697 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Wed, 12 Oct 2022 20:35:42 +0200 Subject: [PATCH 45/94] Obsidian: treat tab properly in outline nodes --- src/converters/obsidian/emptySpace.ts | 3 +++ src/converters/obsidian/extractImageLinks.ts | 15 ++++++--------- src/converters/obsidian/extractMarkdownNodes.ts | 9 +++++++-- ...nNode.test.ts => extractMarkdownNodes.test.ts} | 3 +++ 4 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 src/converters/obsidian/emptySpace.ts rename src/converters/obsidian/tests/{convertMarkdownNode.test.ts => extractMarkdownNodes.test.ts} (97%) diff --git a/src/converters/obsidian/emptySpace.ts b/src/converters/obsidian/emptySpace.ts new file mode 100644 index 0000000..973d706 --- /dev/null +++ b/src/converters/obsidian/emptySpace.ts @@ -0,0 +1,3 @@ +export function isEmptySpace(char: string) { + return char === ' ' || char === '\t'; +} diff --git a/src/converters/obsidian/extractImageLinks.ts b/src/converters/obsidian/extractImageLinks.ts index 0bebd98..d62e691 100644 --- a/src/converters/obsidian/extractImageLinks.ts +++ b/src/converters/obsidian/extractImageLinks.ts @@ -79,13 +79,7 @@ function extractImageLink(content: string, startPositon: number): [string, strin } if (lastFoundImageSignifier === '(' && char === ')') { if (url.startsWith('http://') || url.startsWith('https://')) { - return [ - altText, - //could add titles to the url, which we dont convert - url.split(' ')[0], - index + 1, - '![' + altText + '](' + url + ')', - ]; + return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')']; } else { return index + 1; } @@ -139,8 +133,7 @@ function tryToExtractLinkedImageLink( if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) { return [ embeddedImage[0], - //could add titles to the url, which we dont convert - endUrl.split(' ')[0], + removeTitle(endUrl), index + 1, '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')', ]; @@ -152,3 +145,7 @@ function tryToExtractLinkedImageLink( } return embeddedImage; } + +function removeTitle(url: string) { + return url.split(' ')[0].split('\t')[0]; +} diff --git a/src/converters/obsidian/extractMarkdownNodes.ts b/src/converters/obsidian/extractMarkdownNodes.ts index e5c296f..1aafd3f 100644 --- a/src/converters/obsidian/extractMarkdownNodes.ts +++ b/src/converters/obsidian/extractMarkdownNodes.ts @@ -1,3 +1,5 @@ +import { isEmptySpace } from './emptySpace'; + export enum HierarchyType { ROOT = 'Root', HEADING = 'Heading', @@ -44,6 +46,7 @@ function isOutlinerNodeStart(content: string, pos: number) { const char = content[pos]; const secondChar = content[pos + 1]; + //only real empty string is valid for outline if ((char === '*' || char === '-') && secondChar === ' ') { isOutlinerStart = true; } else { @@ -51,11 +54,12 @@ function isOutlinerNodeStart(content: string, pos: number) { } //outliner nodes always have \n( *) in front of them or are at the start of the file + //including tabs //so need to backtrack empty space to verify if (pos > 0 && content[pos - 1] !== '\n') { let curPos = pos - 1; let curChar = content[curPos]; - while (curChar === ' ') { + while (isEmptySpace(curChar)) { curPos--; curChar = content[curPos]; } @@ -75,6 +79,7 @@ function getHierarchy(curChar: string, content: string, curPosition: number): Hi pos++; char = content[pos]; } + //only real empty string is valid for heading if (char === ' ') { return { type: HierarchyType.HEADING, level: pos - curPosition }; } else { @@ -165,7 +170,7 @@ function findEndPosition(content: string, curPosition: number, hierarchy: Hierar export function countEmptySpace(content: string, curPosition: number, count = 0): number { //we count tab as one empty space - if (content[curPosition] !== ' ' && content[curPosition] !== '\t') { + if (isEmptySpace(content[curPosition])) { return count; } return countEmptySpace(content, curPosition + 1, count + 1); diff --git a/src/converters/obsidian/tests/convertMarkdownNode.test.ts b/src/converters/obsidian/tests/extractMarkdownNodes.test.ts similarity index 97% rename from src/converters/obsidian/tests/convertMarkdownNode.test.ts rename to src/converters/obsidian/tests/extractMarkdownNodes.test.ts index e6c3a19..f018aca 100644 --- a/src/converters/obsidian/tests/convertMarkdownNode.test.ts +++ b/src/converters/obsidian/tests/extractMarkdownNodes.test.ts @@ -106,6 +106,9 @@ On first glance, the expected result seems wrong to me. Looking at the \`paragra test('outliner nodes', () => { expect(extractMarkdownNodes('- Node')).toStrictEqual([{ content: 'Node', level: 0, type: HierarchyType.OUTLINE }]); + //tab + expect(extractMarkdownNodes(' - Node')).toStrictEqual([{ content: 'Node', level: 1, type: HierarchyType.OUTLINE }]); + //space expect(extractMarkdownNodes(' - Node')).toStrictEqual([{ content: 'Node', level: 1, type: HierarchyType.OUTLINE }]); expect( extractMarkdownNodes(`* Text From cc8baa95595234ee65a7a4013d079720b799bf3f Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Wed, 12 Oct 2022 20:39:15 +0200 Subject: [PATCH 46/94] Obsidian: treat tab properly in outline nodes (2) --- src/converters/obsidian/extractMarkdownNodes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/converters/obsidian/extractMarkdownNodes.ts b/src/converters/obsidian/extractMarkdownNodes.ts index 1aafd3f..2efb8c0 100644 --- a/src/converters/obsidian/extractMarkdownNodes.ts +++ b/src/converters/obsidian/extractMarkdownNodes.ts @@ -170,7 +170,7 @@ function findEndPosition(content: string, curPosition: number, hierarchy: Hierar export function countEmptySpace(content: string, curPosition: number, count = 0): number { //we count tab as one empty space - if (isEmptySpace(content[curPosition])) { + if (!isEmptySpace(content[curPosition])) { return count; } return countEmptySpace(content, curPosition + 1, count + 1); From d214165654e07dd57c7efc5186a7f2f915139e6e Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Wed, 12 Oct 2022 20:45:50 +0200 Subject: [PATCH 47/94] Obsidian: rename Outline(r) to Bullet --- .../obsidian/convertMarkdownNode.ts | 2 +- src/converters/obsidian/emptySpace.ts | 8 ++++ .../obsidian/extractMarkdownNodes.ts | 44 ++++++++----------- src/converters/obsidian/obsidianConfig.ts | 19 ++++++++ .../tests/extractMarkdownNodes.test.ts | 35 ++++++++------- 5 files changed, 64 insertions(+), 44 deletions(-) create mode 100644 src/converters/obsidian/obsidianConfig.ts diff --git a/src/converters/obsidian/convertMarkdownNode.ts b/src/converters/obsidian/convertMarkdownNode.ts index 1fddabe..956ee2d 100644 --- a/src/converters/obsidian/convertMarkdownNode.ts +++ b/src/converters/obsidian/convertMarkdownNode.ts @@ -23,7 +23,7 @@ export function convertMarkdownNode( type: 'node' as NodeType, }; - if (obsidianNode.type === HierarchyType.OUTLINE) { + if (obsidianNode.type === HierarchyType.BULLET) { if (content.startsWith('[ ] ')) { handleTodo(tanaNode); } diff --git a/src/converters/obsidian/emptySpace.ts b/src/converters/obsidian/emptySpace.ts index 973d706..e019810 100644 --- a/src/converters/obsidian/emptySpace.ts +++ b/src/converters/obsidian/emptySpace.ts @@ -1,3 +1,11 @@ export function isEmptySpace(char: string) { return char === ' ' || char === '\t'; } + +export function countEmptySpace(content: string, curPosition: number, count = 0): number { + //we count tab as one empty space + if (!isEmptySpace(content[curPosition])) { + return count; + } + return countEmptySpace(content, curPosition + 1, count + 1); +} diff --git a/src/converters/obsidian/extractMarkdownNodes.ts b/src/converters/obsidian/extractMarkdownNodes.ts index 2efb8c0..c9421af 100644 --- a/src/converters/obsidian/extractMarkdownNodes.ts +++ b/src/converters/obsidian/extractMarkdownNodes.ts @@ -1,16 +1,16 @@ -import { isEmptySpace } from './emptySpace'; +import { countEmptySpace, isEmptySpace } from './emptySpace'; export enum HierarchyType { ROOT = 'Root', HEADING = 'Heading', - OUTLINE = 'Outliner Node', + BULLET = 'Bullet Node', PARAGRAPH = 'Paragraph', } export interface Hierarchy { type: HierarchyType; //lower = higher in the hierarchy - //for outliner nodes also used as a measure of empty space + //for bullet nodes also used as a measure of empty space //for heading nodes this is the number of #'s level: number; } @@ -41,19 +41,19 @@ export function extractMarkdownNodes(content: string, startPosition = 0): Markdo return nodeDescs; } -function isOutlinerNodeStart(content: string, pos: number) { - let isOutlinerStart = true; +function isBulletNodeStart(content: string, pos: number) { + let isBulletStart = true; const char = content[pos]; const secondChar = content[pos + 1]; - //only real empty string is valid for outline + //only real empty string is valid for bullet if ((char === '*' || char === '-') && secondChar === ' ') { - isOutlinerStart = true; + isBulletStart = true; } else { - isOutlinerStart = !isNaN(parseInt(char)) && secondChar === '.' && content[pos + 2] === ' '; + isBulletStart = !isNaN(parseInt(char)) && secondChar === '.' && content[pos + 2] === ' '; } - //outliner nodes always have \n( *) in front of them or are at the start of the file + //bullet nodes always have \n( *) in front of them or are at the start of the file //including tabs //so need to backtrack empty space to verify if (pos > 0 && content[pos - 1] !== '\n') { @@ -64,11 +64,11 @@ function isOutlinerNodeStart(content: string, pos: number) { curChar = content[curPos]; } if (!(curChar === '\n' || curChar === undefined)) { - isOutlinerStart = false; + isBulletStart = false; } } - return isOutlinerStart; + return isBulletStart; } function getHierarchy(curChar: string, content: string, curPosition: number): Hierarchy { @@ -90,8 +90,8 @@ function getHierarchy(curChar: string, content: string, curPosition: number): Hi //for nodes we need a precise level === empty space, so we can detect multi line node content const emptySpaces = countEmptySpace(content, curPosition); - if (isOutlinerNodeStart(content, curPosition + emptySpaces)) { - return { type: HierarchyType.OUTLINE, level: Math.max(emptySpaces) }; + if (isBulletNodeStart(content, curPosition + emptySpaces)) { + return { type: HierarchyType.BULLET, level: Math.max(emptySpaces) }; } return { type: HierarchyType.PARAGRAPH, level: 0 }; @@ -114,7 +114,7 @@ function isBlockQuoteStart(content: string, pos: number) { } function isHierarchyStart(content: string, pos: number) { - return isHeadingStart(content, pos) || isOutlinerNodeStart(content, pos) || isBlockQuoteStart(content, pos); + return isHeadingStart(content, pos) || isBulletNodeStart(content, pos) || isBlockQuoteStart(content, pos); } /** @@ -126,12 +126,12 @@ function findEndPosition(content: string, curPosition: number, hierarchy: Hierar if (char === undefined || hierarchy.type === HierarchyType.HEADING) { endPosition = endPosition - 1; - } else if (hierarchy.type === HierarchyType.OUTLINE) { + } else if (hierarchy.type === HierarchyType.BULLET) { // eslint-disable-next-line no-constant-condition while (true) { //new lines that start with the number of empty spaces of the level+1 are considered part of the node const emptySpaces = countEmptySpace(content, endPosition + 1); - if (emptySpaces == hierarchy.level + 2 && !isOutlinerNodeStart(content, endPosition + 1 + emptySpaces)) { + if (emptySpaces == hierarchy.level + 2 && !isBulletNodeStart(content, endPosition + 1 + emptySpaces)) { endPosition = nextNewLine(content, endPosition + 1); char = content[endPosition]; } else { @@ -168,14 +168,6 @@ function findEndPosition(content: string, curPosition: number, hierarchy: Hierar return endPosition; } -export function countEmptySpace(content: string, curPosition: number, count = 0): number { - //we count tab as one empty space - if (!isEmptySpace(content[curPosition])) { - return count; - } - return countEmptySpace(content, curPosition + 1, count + 1); -} - export function nextNewLine(content: string, curPosition: number, count = 0): number { //end of file is also counted as newline for simplicity if (content[curPosition + count] === undefined || content[curPosition + count] === '\n') { @@ -185,10 +177,10 @@ export function nextNewLine(content: string, curPosition: number, count = 0): nu } /** - * We remove the parts of the markdown nodes that just signify their type or have no semantic meaning, e.g. "- " for outline nodes. + * We remove the parts of the markdown nodes that just signify their type or have no semantic meaning, e.g. "- " for bullet nodes. */ export function postProcessMarkdownNodes(content: string, hierarchy: Hierarchy) { - if (hierarchy.type === HierarchyType.OUTLINE) { + if (hierarchy.type === HierarchyType.BULLET) { //remove empty prefix const processed = content.trimStart(); if (!isNaN(parseInt(processed[0]))) { diff --git a/src/converters/obsidian/obsidianConfig.ts b/src/converters/obsidian/obsidianConfig.ts new file mode 100644 index 0000000..2b88731 --- /dev/null +++ b/src/converters/obsidian/obsidianConfig.ts @@ -0,0 +1,19 @@ +import { readFileSync } from 'fs'; + +function readObsidianConfig(vaultPath: string, configName: string): Record { + return JSON.parse(readFileSync(vaultPath + '/.obsidian/' + configName + '.json', 'utf-8')); +} + +//relative is not supported +const supportedLinkFormates = ['shortest', 'absolute']; +const defaultLinkFormate = 'shortest'; + +function readLinkFormat(vaultPath: string) { + const foundReadStyle = readObsidianConfig(vaultPath, 'app').newLinkFormat ?? defaultLinkFormate; + if (!supportedLinkFormates.includes(foundReadStyle)) { + throw ( + 'Unsupported Link Style detected in the Obsidian configuration. Please choose one of: ' + supportedLinkFormates + ); + } + return foundReadStyle; +} diff --git a/src/converters/obsidian/tests/extractMarkdownNodes.test.ts b/src/converters/obsidian/tests/extractMarkdownNodes.test.ts index f018aca..fe254dc 100644 --- a/src/converters/obsidian/tests/extractMarkdownNodes.test.ts +++ b/src/converters/obsidian/tests/extractMarkdownNodes.test.ts @@ -1,5 +1,6 @@ import { expect, test } from '@jest/globals'; -import { extractMarkdownNodes, HierarchyType, countEmptySpace, nextNewLine } from '../extractMarkdownNodes'; +import { countEmptySpace } from '../emptySpace'; +import { extractMarkdownNodes, HierarchyType, nextNewLine } from '../extractMarkdownNodes'; test('headings', () => { expect(extractMarkdownNodes('## Heading')).toStrictEqual([ @@ -72,7 +73,7 @@ https://mek.fyi/posts/why-books-work-and-could-work-better }, ]); - //can deal with *-s not being outliner nodes + //can deal with *-s not being bullet nodes expect( extractMarkdownNodes(`--- On first glance, the expected result seems wrong to me. Looking at the \`paragraph-run-style-emphasis-flip.docx\` test document's XML markup and rendering in Microsoft Word (v15.29), I would expect a **nested** emphasis, not a **"breaking out"** of the outer emphasis:`), @@ -104,12 +105,12 @@ On first glance, the expected result seems wrong to me. Looking at the \`paragra ]); }); -test('outliner nodes', () => { - expect(extractMarkdownNodes('- Node')).toStrictEqual([{ content: 'Node', level: 0, type: HierarchyType.OUTLINE }]); +test('bullet nodes', () => { + expect(extractMarkdownNodes('- Node')).toStrictEqual([{ content: 'Node', level: 0, type: HierarchyType.BULLET }]); //tab - expect(extractMarkdownNodes(' - Node')).toStrictEqual([{ content: 'Node', level: 1, type: HierarchyType.OUTLINE }]); + expect(extractMarkdownNodes(' - Node')).toStrictEqual([{ content: 'Node', level: 1, type: HierarchyType.BULLET }]); //space - expect(extractMarkdownNodes(' - Node')).toStrictEqual([{ content: 'Node', level: 1, type: HierarchyType.OUTLINE }]); + expect(extractMarkdownNodes(' - Node')).toStrictEqual([{ content: 'Node', level: 1, type: HierarchyType.BULLET }]); expect( extractMarkdownNodes(`* Text * Foo @@ -118,17 +119,17 @@ test('outliner nodes', () => { { content: 'Text', level: 0, - type: HierarchyType.OUTLINE, + type: HierarchyType.BULLET, }, { content: 'Foo', level: 2, - type: HierarchyType.OUTLINE, + type: HierarchyType.BULLET, }, { content: 'Bar', level: 2, - type: HierarchyType.OUTLINE, + type: HierarchyType.BULLET, }, ]); expect( @@ -141,17 +142,17 @@ test('outliner nodes', () => { { content: 'Some', level: 0, - type: HierarchyType.OUTLINE, + type: HierarchyType.BULLET, }, { content: 'Node', level: 4, - type: HierarchyType.OUTLINE, + type: HierarchyType.BULLET, }, { content: 'Fun', level: 2, - type: HierarchyType.OUTLINE, + type: HierarchyType.BULLET, }, ]); expect( @@ -166,7 +167,7 @@ test('outliner nodes', () => { As long as the empty space is equivalent. How many you like.`, level: 0, - type: HierarchyType.OUTLINE, + type: HierarchyType.BULLET, }, ]); }); @@ -185,22 +186,22 @@ https://some.url/ { content: '1. Much more foo.', level: 0, - type: HierarchyType.OUTLINE, + type: HierarchyType.BULLET, }, { content: '2. Take modern bar. ', level: 0, - type: HierarchyType.OUTLINE, + type: HierarchyType.BULLET, }, { content: '3. Baz.', level: 0, - type: HierarchyType.OUTLINE, + type: HierarchyType.BULLET, }, { content: '4. etc. ', level: 0, - type: HierarchyType.OUTLINE, + type: HierarchyType.BULLET, }, ]); }); From c5365e9f33fbb84bc23a04616e7aad193a753613 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Wed, 12 Oct 2022 22:07:45 +0200 Subject: [PATCH 48/94] Obsidian: filter out unrelated files --- .../obsidian/tests/fixtures/vault/test.not_md | 1 + src/converters/obsidian/vault.ts | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 src/converters/obsidian/tests/fixtures/vault/test.not_md diff --git a/src/converters/obsidian/tests/fixtures/vault/test.not_md b/src/converters/obsidian/tests/fixtures/vault/test.not_md new file mode 100644 index 0000000..d093121 --- /dev/null +++ b/src/converters/obsidian/tests/fixtures/vault/test.not_md @@ -0,0 +1 @@ +This should not disturb the parsing. \ No newline at end of file diff --git a/src/converters/obsidian/vault.ts b/src/converters/obsidian/vault.ts index 57fc5fa..b0cfafe 100644 --- a/src/converters/obsidian/vault.ts +++ b/src/converters/obsidian/vault.ts @@ -17,6 +17,14 @@ function getChildrenPosition(index: number, dirents: Dirent[]) { return ChildrenPosition.NOT_LAST; } +function readFilteredDir(dir: string) { + return readdirSync(dir, { withFileTypes: true }).filter( + (dirent) => + (dirent.isDirectory() && !dirent.name.endsWith('.github') && !dirent.name.endsWith('.obsidian')) || + (!dirent.isDirectory() && dirent.name.endsWith('.md')), + ); +} + export function handleVault( dir: string, handleDirStart: ReturnType, @@ -25,13 +33,13 @@ export function handleVault( childrenPosition: ChildrenPosition = ChildrenPosition.LAST, ) { handleDirStart(dir); - const dirents = readdirSync(dir, { withFileTypes: true }); + const dirents = readFilteredDir(dir); for (let index = 0; index < dirents.length; index++) { const dirent = dirents[index]; const res = resolve(dir, dirent.name); - if (dirent.isDirectory() && !res.endsWith('.github') && !res.endsWith('.obsidian')) { + if (dirent.isDirectory()) { handleVault(res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents)); - } else if (res.endsWith('.md')) { + } else { handleFile(res, getChildrenPosition(index, dirents)); } } From f54844340a03f15763a5027abd0ecd61cf14e312 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Thu, 13 Oct 2022 00:21:23 +0200 Subject: [PATCH 49/94] Obsidian: simplify hierarchy parsing --- .../obsidian/ObsidianVaultConverter.ts | 1 + .../obsidian/convertMarkdownNode.ts | 2 +- .../obsidian/convertObsidianFile.ts | 2 +- src/converters/obsidian/emptySpace.ts | 11 - .../obsidian/extractMarkdownNodes.ts | 203 ------------------ src/converters/obsidian/markdown/bullet.ts | 57 +++++ .../obsidian/markdown/emptySpace.ts | 26 +++ .../obsidian/markdown/extractMarkdownNodes.ts | 97 +++++++++ src/converters/obsidian/markdown/heading.ts | 30 +++ src/converters/obsidian/markdown/hierarchy.ts | 28 +++ src/converters/obsidian/markdown/newline.ts | 7 + src/converters/obsidian/markdown/paragraph.ts | 28 +++ .../tests/extractMarkdownNodes.test.ts | 8 +- .../obsidian/tests/fixtures/vault/test.md | 2 +- 14 files changed, 283 insertions(+), 219 deletions(-) delete mode 100644 src/converters/obsidian/emptySpace.ts delete mode 100644 src/converters/obsidian/extractMarkdownNodes.ts create mode 100644 src/converters/obsidian/markdown/bullet.ts create mode 100644 src/converters/obsidian/markdown/emptySpace.ts create mode 100644 src/converters/obsidian/markdown/extractMarkdownNodes.ts create mode 100644 src/converters/obsidian/markdown/heading.ts create mode 100644 src/converters/obsidian/markdown/hierarchy.ts create mode 100644 src/converters/obsidian/markdown/newline.ts create mode 100644 src/converters/obsidian/markdown/paragraph.ts diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index 68c803d..88415f1 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -40,6 +40,7 @@ export async function ObsidianVaultConverter(vaultContext: VaultContext, today: const collectedUnlinkedNodes = createUnlinkedTanaNodes(path.basename(vaultContext.vaultPath), today, vaultContext); if (collectedUnlinkedNodes) { + //TODO: summary? appendFileSync(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2)); } diff --git a/src/converters/obsidian/convertMarkdownNode.ts b/src/converters/obsidian/convertMarkdownNode.ts index 956ee2d..49cae56 100644 --- a/src/converters/obsidian/convertMarkdownNode.ts +++ b/src/converters/obsidian/convertMarkdownNode.ts @@ -1,7 +1,7 @@ import { NodeType, TanaIntermediateNode } from '../../types/types'; import { getBracketLinks } from '../../utils/utils'; import { extractImageLinks } from './extractImageLinks'; -import { HierarchyType, MarkdownNode } from './extractMarkdownNodes'; +import { HierarchyType, MarkdownNode } from './markdown/extractMarkdownNodes'; import { UidRequestType, VaultContext } from './VaultContext'; // eslint is just wrong here diff --git a/src/converters/obsidian/convertObsidianFile.ts b/src/converters/obsidian/convertObsidianFile.ts index a681dc2..6e5c292 100644 --- a/src/converters/obsidian/convertObsidianFile.ts +++ b/src/converters/obsidian/convertObsidianFile.ts @@ -1,7 +1,7 @@ import { convertMarkdownNode } from './convertMarkdownNode'; import { createFileNode } from './createFileNode'; import { createTree } from './createTree'; -import { HierarchyType, MarkdownNode, extractMarkdownNodes } from './extractMarkdownNodes'; +import { HierarchyType, MarkdownNode, extractMarkdownNodes } from './markdown/extractMarkdownNodes'; import { HeadingTracker } from './filterHeadingLinks'; import { FrontmatterData, parseFrontmatter } from './parseFrontmatter'; import { VaultContext } from './VaultContext'; diff --git a/src/converters/obsidian/emptySpace.ts b/src/converters/obsidian/emptySpace.ts deleted file mode 100644 index e019810..0000000 --- a/src/converters/obsidian/emptySpace.ts +++ /dev/null @@ -1,11 +0,0 @@ -export function isEmptySpace(char: string) { - return char === ' ' || char === '\t'; -} - -export function countEmptySpace(content: string, curPosition: number, count = 0): number { - //we count tab as one empty space - if (!isEmptySpace(content[curPosition])) { - return count; - } - return countEmptySpace(content, curPosition + 1, count + 1); -} diff --git a/src/converters/obsidian/extractMarkdownNodes.ts b/src/converters/obsidian/extractMarkdownNodes.ts deleted file mode 100644 index c9421af..0000000 --- a/src/converters/obsidian/extractMarkdownNodes.ts +++ /dev/null @@ -1,203 +0,0 @@ -import { countEmptySpace, isEmptySpace } from './emptySpace'; - -export enum HierarchyType { - ROOT = 'Root', - HEADING = 'Heading', - BULLET = 'Bullet Node', - PARAGRAPH = 'Paragraph', -} - -export interface Hierarchy { - type: HierarchyType; - //lower = higher in the hierarchy - //for bullet nodes also used as a measure of empty space - //for heading nodes this is the number of #'s - level: number; -} - -export interface MarkdownNode extends Hierarchy { - content: string; -} - -export function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] { - const nodeDescs: MarkdownNode[] = []; - - for (let index = startPosition; index < content.length; index++) { - const element = content[index]; - if (element == '\n') { - continue; - } - const hierarchy = getHierarchy(element, content, index); - const endPos = findEndPosition(content, index, hierarchy); - nodeDescs.push({ - ...hierarchy, - content: postProcessMarkdownNodes(content.slice(index, endPos), hierarchy), - }); - - //we increment immediately afterwards due to the loop - index = endPos; - } - - return nodeDescs; -} - -function isBulletNodeStart(content: string, pos: number) { - let isBulletStart = true; - - const char = content[pos]; - const secondChar = content[pos + 1]; - //only real empty string is valid for bullet - if ((char === '*' || char === '-') && secondChar === ' ') { - isBulletStart = true; - } else { - isBulletStart = !isNaN(parseInt(char)) && secondChar === '.' && content[pos + 2] === ' '; - } - - //bullet nodes always have \n( *) in front of them or are at the start of the file - //including tabs - //so need to backtrack empty space to verify - if (pos > 0 && content[pos - 1] !== '\n') { - let curPos = pos - 1; - let curChar = content[curPos]; - while (isEmptySpace(curChar)) { - curPos--; - curChar = content[curPos]; - } - if (!(curChar === '\n' || curChar === undefined)) { - isBulletStart = false; - } - } - - return isBulletStart; -} - -function getHierarchy(curChar: string, content: string, curPosition: number): Hierarchy { - if (curChar === '#') { - let pos = curPosition + 1; - let char = content[pos]; - while (char === '#') { - pos++; - char = content[pos]; - } - //only real empty string is valid for heading - if (char === ' ') { - return { type: HierarchyType.HEADING, level: pos - curPosition }; - } else { - //is a paragraph that starts with #'s - return { type: HierarchyType.PARAGRAPH, level: 0 }; - } - } - - //for nodes we need a precise level === empty space, so we can detect multi line node content - const emptySpaces = countEmptySpace(content, curPosition); - if (isBulletNodeStart(content, curPosition + emptySpaces)) { - return { type: HierarchyType.BULLET, level: Math.max(emptySpaces) }; - } - - return { type: HierarchyType.PARAGRAPH, level: 0 }; -} - -function isHeadingStart(content: string, pos: number) { - //yeah yeah RegEx and all, but I really want this to be fast - if (content[pos] !== '#') { - return false; - } - let curPos = pos + 1; - while (content[curPos] === '#') { - curPos++; - } - return content[curPos] == ' '; -} - -function isBlockQuoteStart(content: string, pos: number) { - return content[pos] === '>' && content[pos + 1] === ' '; -} - -function isHierarchyStart(content: string, pos: number) { - return isHeadingStart(content, pos) || isBulletNodeStart(content, pos) || isBlockQuoteStart(content, pos); -} - -/** - * Returns the index in the content-string of the endposition of the current obsidian node. - */ -function findEndPosition(content: string, curPosition: number, hierarchy: Hierarchy): number { - let endPosition = nextNewLine(content, curPosition); - let char = content[endPosition]; - - if (char === undefined || hierarchy.type === HierarchyType.HEADING) { - endPosition = endPosition - 1; - } else if (hierarchy.type === HierarchyType.BULLET) { - // eslint-disable-next-line no-constant-condition - while (true) { - //new lines that start with the number of empty spaces of the level+1 are considered part of the node - const emptySpaces = countEmptySpace(content, endPosition + 1); - if (emptySpaces == hierarchy.level + 2 && !isBulletNodeStart(content, endPosition + 1 + emptySpaces)) { - endPosition = nextNewLine(content, endPosition + 1); - char = content[endPosition]; - } else { - endPosition = endPosition - 1; - break; - } - if (char === undefined) { - endPosition = endPosition - 1; - break; - } - } - } else if (hierarchy.type === HierarchyType.PARAGRAPH) { - let lastChar = char; - endPosition++; - char = content[endPosition]; - //paragraphs end with double newlines or a new hierarchy - // eslint-disable-next-line no-constant-condition - while (true) { - if (char === undefined) { - endPosition = endPosition - 1; - break; - } else if ((char === '\n' && lastChar === '\n') || isHierarchyStart(content, endPosition)) { - endPosition = endPosition - 2; - break; - } - lastChar = char; - endPosition++; - char = content[endPosition]; - } - } - - endPosition++; - - return endPosition; -} - -export function nextNewLine(content: string, curPosition: number, count = 0): number { - //end of file is also counted as newline for simplicity - if (content[curPosition + count] === undefined || content[curPosition + count] === '\n') { - return curPosition + count; - } - return nextNewLine(content, curPosition, count + 1); -} - -/** - * We remove the parts of the markdown nodes that just signify their type or have no semantic meaning, e.g. "- " for bullet nodes. - */ -export function postProcessMarkdownNodes(content: string, hierarchy: Hierarchy) { - if (hierarchy.type === HierarchyType.BULLET) { - //remove empty prefix - const processed = content.trimStart(); - if (!isNaN(parseInt(processed[0]))) { - //if it starts with e.g. "1." we keep the numbering because Tana does not support numbered lists right now - return processed; - } - //remove "* " - return processed.slice(2); - } - - if (hierarchy.type === HierarchyType.HEADING) { - return content.slice(hierarchy.level).trim(); //heading symbols and empty space - } - - if (hierarchy.type === HierarchyType.PARAGRAPH) { - return content.trimEnd(); - } - - return content; -} diff --git a/src/converters/obsidian/markdown/bullet.ts b/src/converters/obsidian/markdown/bullet.ts new file mode 100644 index 0000000..2cf8344 --- /dev/null +++ b/src/converters/obsidian/markdown/bullet.ts @@ -0,0 +1,57 @@ +import { countEmptySpace, findFirstEmptySpacePosBackwards } from './emptySpace'; +import { Hierarchy } from './hierarchy'; +import { nextNewLine } from './newline'; + +export function isBulletNodeStart(content: string, pos: number) { + let isBulletStart = true; + + const char = content[pos]; + const secondChar = content[pos + 1]; + //only real empty string is valid for bullet + if (!((char === '*' || char === '-') && secondChar === ' ')) { + //check for numbered bullets + isBulletStart = !isNaN(parseInt(char)) && secondChar === '.' && content[pos + 2] === ' '; + } + + //bullet nodes always have \n( *) in front of them or are at the start of the file + //so need to backtrack empty space to verify + const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1; + const nonEmptyChar = content[nonEmptyPos]; + if (!(nonEmptyChar === '\n' || nonEmptyChar === undefined)) { + return false; + } + + return isBulletStart; +} + +export function findBulletSlicePosition(content: string, curPosition: number, hierarchy: Hierarchy) { + //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol + let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1); + let char = content[endPosition]; + + // eslint-disable-next-line no-constant-condition + while (true) { + //new lines that start with the number of empty spaces of the level+1 are considered part of the node + const emptySpaces = countEmptySpace(content, endPosition + 1); + if (emptySpaces == hierarchy.level + 2 && !isBulletNodeStart(content, endPosition + 1 + emptySpaces)) { + endPosition = nextNewLine(content, endPosition + 1); + char = content[endPosition]; + } else { + return endPosition; + } + if (char === undefined) { + return endPosition; + } + } +} + +export function postProcessBullet(content: string) { + //remove empty prefix + const processed = content.trimStart(); + if (!isNaN(parseInt(processed[0]))) { + //if it starts with e.g. "1." we keep the numbering because Tana does not support numbered lists right now + return processed; + } + //remove "* " + return processed.slice(2); +} diff --git a/src/converters/obsidian/markdown/emptySpace.ts b/src/converters/obsidian/markdown/emptySpace.ts new file mode 100644 index 0000000..38e5734 --- /dev/null +++ b/src/converters/obsidian/markdown/emptySpace.ts @@ -0,0 +1,26 @@ +export function isEmptySpace(char: string) { + return char === ' ' || char === '\t'; +} + +export function countEmptySpace(content: string, curPosition: number, count = 0): number { + //we count tab as one empty space + if (!isEmptySpace(content[curPosition])) { + return count; + } + return countEmptySpace(content, curPosition + 1, count + 1); +} + +/** + * Backtracks starting from the current position and finds the first position that is not empty space. + * Returns the position of the last empty space. + */ +export function findFirstEmptySpacePosBackwards(content: string, curPosition: number) { + let res = curPosition; + let curChar = content[curPosition]; + while (isEmptySpace(curChar)) { + res--; + curChar = content[res]; + } + + return res + 1; +} diff --git a/src/converters/obsidian/markdown/extractMarkdownNodes.ts b/src/converters/obsidian/markdown/extractMarkdownNodes.ts new file mode 100644 index 0000000..30fc015 --- /dev/null +++ b/src/converters/obsidian/markdown/extractMarkdownNodes.ts @@ -0,0 +1,97 @@ +import { findBulletSlicePosition, isBulletNodeStart, postProcessBullet } from './bullet'; +import { countEmptySpace } from './emptySpace'; +import { findHeadingSlicePosition, countHeadingSymbols, postProcessHeading } from './heading'; +import { Hierarchy, newTypeOfHierachyStarts } from './hierarchy'; +import { findParagraphSlicePosition, postProcessParagraph } from './paragraph'; + +//these types are just needed for splitting and for creating the correct hierarchy +export enum HierarchyType { + ROOT = 'Root', + HEADING = 'Heading', + BULLET = 'Bullet Node', + PARAGRAPH = 'Paragraph', +} + +export interface MarkdownNode { + content: string; + type: HierarchyType; + //lower = higher in the hierarchy + //for bullet nodes also used as a measure of empty space + //for heading nodes this is the number of #'s + level: number; +} + +export function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] { + const nodeDescs: MarkdownNode[] = []; + + for (let index = startPosition; index < content.length; index++) { + const element = content[index]; + if (element == '\n') { + continue; + } + + const [node, slicePosition] = extractMarkdownNode(content, index); + nodeDescs.push(node); + + //-1 because we dont want to assume that the char at the slice position is irrelevant + index = slicePosition - 1; + } + + return nodeDescs; +} +/** + * @returns [MarkdownNode, slicePosition] + */ +function extractMarkdownNode(content: string, curPosition: number): [MarkdownNode, number] { + let hierarchy: Hierarchy; + + const headingSymbols = countHeadingSymbols(content, curPosition); + if (headingSymbols > 0 && content[curPosition + headingSymbols] === ' ') { + hierarchy = { type: HierarchyType.HEADING, level: headingSymbols }; + } else { + //for nodes we need a precise level === empty space, so we can detect multi line node content + const emptySpaces = countEmptySpace(content, curPosition); + if (isBulletNodeStart(content, curPosition + emptySpaces)) { + hierarchy = { type: HierarchyType.BULLET, level: emptySpaces }; + } else { + hierarchy = { type: HierarchyType.PARAGRAPH, level: 0 }; + } + } + + const slicePos = findSlicePosition(content, curPosition, hierarchy); + + return [ + { + ...hierarchy, + content: postProcessMarkdownNodes(content.slice(curPosition, slicePos), hierarchy), + }, + slicePos, + ]; +} + +function findSlicePosition(content: string, curPosition: number, hierarchy: Hierarchy): number { + if (hierarchy.type === HierarchyType.HEADING) { + return findHeadingSlicePosition(content, curPosition, hierarchy); + } else if (hierarchy.type === HierarchyType.BULLET) { + return findBulletSlicePosition(content, curPosition, hierarchy); + } else if (hierarchy.type === HierarchyType.PARAGRAPH) { + return findParagraphSlicePosition(content, curPosition); + } + throw 'Unsupported HierarchyType detected: ' + hierarchy; +} + +export function postProcessMarkdownNodes(content: string, hierarchy: Hierarchy): string { + if (hierarchy.type === HierarchyType.BULLET) { + return postProcessBullet(content); + } + + if (hierarchy.type === HierarchyType.HEADING) { + return postProcessHeading(content, hierarchy); + } + + if (hierarchy.type === HierarchyType.PARAGRAPH) { + return postProcessParagraph(content); + } + + throw 'Unsupported HierarchyType detected: ' + hierarchy; +} diff --git a/src/converters/obsidian/markdown/heading.ts b/src/converters/obsidian/markdown/heading.ts new file mode 100644 index 0000000..749f9f9 --- /dev/null +++ b/src/converters/obsidian/markdown/heading.ts @@ -0,0 +1,30 @@ +import { Hierarchy } from './hierarchy'; +import { nextNewLine } from './newline'; + +export function countHeadingSymbols(content: string, pos: number) { + let curPos = pos; + let count = 0; + while (content[curPos] === '#') { + curPos++; + count++; + } + + return count; +} + +export function isHeadingStart(content: string, pos: number) { + const count = countHeadingSymbols(content, pos); + return count > 0 && content[pos + count] === ' '; +} + +export function findHeadingSlicePosition(content: string, curPosition: number, hierachy: Hierarchy) { + //we can skip the heading symbols and the emtpy space between heading symbols and heading text + return nextNewLine(content, curPosition + hierachy.level + 1); +} + +/* + * Removes heading symbols and empty space at the start of the heading. + */ +export function postProcessHeading(content: string, hierarchy: Hierarchy) { + return content.slice(hierarchy.level).trim(); +} diff --git a/src/converters/obsidian/markdown/hierarchy.ts b/src/converters/obsidian/markdown/hierarchy.ts new file mode 100644 index 0000000..6f35971 --- /dev/null +++ b/src/converters/obsidian/markdown/hierarchy.ts @@ -0,0 +1,28 @@ +import { isBulletNodeStart } from './bullet'; +import { HierarchyType, MarkdownNode } from './extractMarkdownNodes'; +import { isHeadingStart } from './heading'; + +export type Hierarchy = Omit; + +//special case, where we want an extra bullet for block quotes +function isBlockQuoteStart(content: string, pos: number) { + return content[pos] === '>' && content[pos + 1] === ' '; +} + +/** + * Returns a hierachy type, if a new type of hierachy starts at the given position. + * Null means that no hierachy starts there, so the current hierarchy should continue. + */ +export function newTypeOfHierachyStarts(content: string, pos: number): HierarchyType | null { + if (isHeadingStart(content, pos)) { + return HierarchyType.HEADING; + } + if (isBulletNodeStart(content, pos)) { + return HierarchyType.BULLET; + } + if (isBlockQuoteStart(content, pos)) { + return HierarchyType.PARAGRAPH; + } + + return null; +} diff --git a/src/converters/obsidian/markdown/newline.ts b/src/converters/obsidian/markdown/newline.ts new file mode 100644 index 0000000..ebdf665 --- /dev/null +++ b/src/converters/obsidian/markdown/newline.ts @@ -0,0 +1,7 @@ +export function nextNewLine(content: string, curPosition: number, count = 0): number { + //end of file is also counted as newline for simplicity + if (content[curPosition + count] === undefined || content[curPosition + count] === '\n') { + return curPosition + count; + } + return nextNewLine(content, curPosition, count + 1); +} diff --git a/src/converters/obsidian/markdown/paragraph.ts b/src/converters/obsidian/markdown/paragraph.ts new file mode 100644 index 0000000..79f59e6 --- /dev/null +++ b/src/converters/obsidian/markdown/paragraph.ts @@ -0,0 +1,28 @@ +import { newTypeOfHierachyStarts } from './hierarchy'; +import { nextNewLine } from './newline'; + +export function findParagraphSlicePosition(content: string, curPosition: number) { + let endPosition = nextNewLine(content, curPosition); + let char = content[endPosition]; + let lastChar = char; + endPosition++; + char = content[endPosition]; + //paragraphs end with double newlines or a new hierarchy + // eslint-disable-next-line no-constant-condition + while (true) { + if (char === undefined) { + return endPosition; + } else if ((char === '\n' && lastChar === '\n') || newTypeOfHierachyStarts(content, endPosition) !== null) { + endPosition = endPosition - 1; + return endPosition; + } + lastChar = char; + endPosition++; + char = content[endPosition]; + } +} + +export function postProcessParagraph(content: string) { + //I dont think we should trim the front, because people might want have empty space there that is semantically meaningfull + return content.trimEnd(); +} diff --git a/src/converters/obsidian/tests/extractMarkdownNodes.test.ts b/src/converters/obsidian/tests/extractMarkdownNodes.test.ts index fe254dc..040c692 100644 --- a/src/converters/obsidian/tests/extractMarkdownNodes.test.ts +++ b/src/converters/obsidian/tests/extractMarkdownNodes.test.ts @@ -1,8 +1,12 @@ import { expect, test } from '@jest/globals'; -import { countEmptySpace } from '../emptySpace'; -import { extractMarkdownNodes, HierarchyType, nextNewLine } from '../extractMarkdownNodes'; +import { countEmptySpace } from '../markdown/emptySpace'; +import { extractMarkdownNodes, HierarchyType } from '../markdown/extractMarkdownNodes'; +import { nextNewLine } from '../markdown/newline'; test('headings', () => { + expect(extractMarkdownNodes('# Heading')).toStrictEqual([ + { content: 'Heading', level: 1, type: HierarchyType.HEADING }, + ]); expect(extractMarkdownNodes('## Heading')).toStrictEqual([ { content: 'Heading', level: 2, type: HierarchyType.HEADING }, ]); diff --git a/src/converters/obsidian/tests/fixtures/vault/test.md b/src/converters/obsidian/tests/fixtures/vault/test.md index 273bea6..3f80b46 100644 --- a/src/converters/obsidian/tests/fixtures/vault/test.md +++ b/src/converters/obsidian/tests/fixtures/vault/test.md @@ -14,7 +14,7 @@ a newline. ## Heading 2 - Invalid Heading [[test2#Heading 2#Heading here]] - - Block with #inlinetag2 [[Link|alias]] [[Link]] [[Link2]] #inlinetag1 ^BLOCK_UID + - Block with #inlinetag2 [[Link|alias]] [[Link]] [[Link2]] #inlinetag1 ^BLOCK_UID - #inlinetag2 Fun #inlinetag2 #### Out of Level From c7bc12426e7cb263c83e0a77f7cf9ffe2cb7e1fc Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Thu, 13 Oct 2022 14:19:43 +0200 Subject: [PATCH 50/94] Obsidian: refactor importer code --- .../obsidian/ObsidianVaultConverter.ts | 48 ++-- src/converters/obsidian/VaultContext.ts | 268 ------------------ src/converters/obsidian/context.ts | 49 ++++ .../obsidian/convertMarkdownNode.ts | 133 --------- .../obsidian/convertObsidianFile.ts | 86 ------ src/converters/obsidian/createFileNode.ts | 68 ----- src/converters/obsidian/filterHeadingLinks.ts | 48 ---- src/converters/obsidian/markdown/blockIds.ts | 18 ++ src/converters/obsidian/markdown/bullet.ts | 57 ---- src/converters/obsidian/markdown/bullets.ts | 68 +++++ .../obsidian/markdown/extractMarkdownNodes.ts | 97 ------- .../frontmatter.ts} | 16 ++ src/converters/obsidian/markdown/heading.ts | 30 -- src/converters/obsidian/markdown/headings.ts | 39 +++ src/converters/obsidian/markdown/hierarchy.ts | 28 -- .../imageLinks.ts} | 13 +- .../obsidian/markdown/internalLinks.ts | 29 ++ .../obsidian/markdown/markdownNodes.ts | 129 +++++++++ src/converters/obsidian/markdown/newline.ts | 14 +- src/converters/obsidian/markdown/paragraph.ts | 28 -- .../obsidian/markdown/paragraphs.ts | 62 ++++ src/converters/obsidian/markdown/tags.ts | 11 + src/converters/obsidian/markdown/todo.ts | 22 ++ src/converters/obsidian/postProcessTIFFile.ts | 35 --- .../obsidian/tanaconversion/attributes.ts | 10 + .../obsidian/tanaconversion/blocks.ts | 56 ++++ .../obsidian/tanaconversion/fields.ts | 34 +++ .../obsidian/tanaconversion/headingLinks.ts | 106 +++++++ .../obsidian/tanaconversion/imageNodes.ts | 42 +++ .../invalidLinks.ts} | 21 +- .../tanaconversion/markdownNodeConversion.ts | 78 +++++ .../tanaconversion/obsidianFileConversion.ts | 105 +++++++ .../obsidian/tanaconversion/summary.ts | 11 + .../obsidian/tanaconversion/supertags.ts | 35 +++ .../obsidian/tanaconversion/uids.ts | 104 +++++++ .../obsidian/{ => tanaconversion}/vault.ts | 20 +- .../tests/ObsidianVaultConverter.test.ts | 8 +- .../obsidian/tests/VaultContext.test.ts | 46 +-- .../obsidian/tests/extractImageLinks.test.ts | 2 +- .../tests/extractMarkdownNodes.test.ts | 6 +- .../obsidian/tests/filterHeadingLinks.test.ts | 6 +- .../obsidian/tests/parseFrontmatter.test.ts | 2 +- src/converters/obsidian/tests/testUtils.ts | 4 +- .../tests/traverseTreeDepthFirst.test.ts | 4 +- .../obsidian/{ => utils}/createTree.ts | 0 .../obsidian/{ => utils}/obsidianConfig.ts | 1 + .../{ => utils}/traverseTreeDepthFirst.ts | 0 src/converters/roam/index.ts | 2 +- src/runner.ts | 4 +- src/types/types.ts | 2 +- 50 files changed, 1131 insertions(+), 974 deletions(-) delete mode 100644 src/converters/obsidian/VaultContext.ts create mode 100644 src/converters/obsidian/context.ts delete mode 100644 src/converters/obsidian/convertMarkdownNode.ts delete mode 100644 src/converters/obsidian/convertObsidianFile.ts delete mode 100644 src/converters/obsidian/createFileNode.ts delete mode 100644 src/converters/obsidian/filterHeadingLinks.ts create mode 100644 src/converters/obsidian/markdown/blockIds.ts delete mode 100644 src/converters/obsidian/markdown/bullet.ts create mode 100644 src/converters/obsidian/markdown/bullets.ts delete mode 100644 src/converters/obsidian/markdown/extractMarkdownNodes.ts rename src/converters/obsidian/{parseFrontmatter.ts => markdown/frontmatter.ts} (77%) delete mode 100644 src/converters/obsidian/markdown/heading.ts create mode 100644 src/converters/obsidian/markdown/headings.ts delete mode 100644 src/converters/obsidian/markdown/hierarchy.ts rename src/converters/obsidian/{extractImageLinks.ts => markdown/imageLinks.ts} (90%) create mode 100644 src/converters/obsidian/markdown/internalLinks.ts create mode 100644 src/converters/obsidian/markdown/markdownNodes.ts delete mode 100644 src/converters/obsidian/markdown/paragraph.ts create mode 100644 src/converters/obsidian/markdown/paragraphs.ts create mode 100644 src/converters/obsidian/markdown/tags.ts create mode 100644 src/converters/obsidian/markdown/todo.ts delete mode 100644 src/converters/obsidian/postProcessTIFFile.ts create mode 100644 src/converters/obsidian/tanaconversion/attributes.ts create mode 100644 src/converters/obsidian/tanaconversion/blocks.ts create mode 100644 src/converters/obsidian/tanaconversion/fields.ts create mode 100644 src/converters/obsidian/tanaconversion/headingLinks.ts create mode 100644 src/converters/obsidian/tanaconversion/imageNodes.ts rename src/converters/obsidian/{createUnlinkedTanaNodes.ts => tanaconversion/invalidLinks.ts} (52%) create mode 100644 src/converters/obsidian/tanaconversion/markdownNodeConversion.ts create mode 100644 src/converters/obsidian/tanaconversion/obsidianFileConversion.ts create mode 100644 src/converters/obsidian/tanaconversion/summary.ts create mode 100644 src/converters/obsidian/tanaconversion/supertags.ts create mode 100644 src/converters/obsidian/tanaconversion/uids.ts rename src/converters/obsidian/{ => tanaconversion}/vault.ts (85%) rename src/converters/obsidian/{ => utils}/createTree.ts (100%) rename src/converters/obsidian/{ => utils}/obsidianConfig.ts (92%) rename src/converters/obsidian/{ => utils}/traverseTreeDepthFirst.ts (100%) diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index 88415f1..d369416 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -1,44 +1,42 @@ import { appendFileSync, unlinkSync } from 'fs'; import path from 'path'; import fs from 'fs'; -import { createUnlinkedTanaNodes } from './createUnlinkedTanaNodes'; -import { HeadingTracker } from './filterHeadingLinks'; -import { postProcessTIFFIle } from './postProcessTIFFile'; -import { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './vault'; -import { VaultContext } from './VaultContext'; +import { createUnlinkedTanaNodes } from './tanaconversion/invalidLinks'; +import { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vault'; +import { VaultContext } from './context'; +import { createSuperTagObjects } from './tanaconversion/supertags'; +import { shiftFromLeafToTop } from './tanaconversion/summary'; +import { postProcessTIFFIle } from './tanaconversion/headingLinks'; /** * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults. * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly. */ -export async function ObsidianVaultConverter(vaultContext: VaultContext, today: number = Date.now()) { - loadDailyNotesConfig(vaultContext); +export async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) { + loadDailyNotesConfig(context); - const targetPath = `${vaultContext.vaultPath}.tif.json`; + const targetPath = `${context.vaultPath}.tif.json`; try { unlinkSync(targetPath); // eslint-disable-next-line no-empty } catch (e) {} appendFileSync(targetPath, '{\n "version": "TanaIntermediateFile V0.1",\n "nodes": [\n'); - const headingTracker: HeadingTracker = new Map(); - handleVault( - vaultContext.vaultPath, - addParentNodeStart(targetPath, today, vaultContext), + context.vaultPath, + addParentNodeStart(targetPath, today, context), addParentNodeEnd(targetPath), - addFileNode(targetPath, today, vaultContext, headingTracker), + addFileNode(targetPath, today, context), ); //the vault-node needs to be counted as a top level node - vaultContext.summary.leafNodes--; - vaultContext.summary.topLevelNodes++; + shiftFromLeafToTop(context.summary); //post processing can be done before unlinked (it will add unlinked headings) //because the unlinked summary nodes are just created by the converter and have no connection to the rest - await postProcessTIFFIle(targetPath, vaultContext, headingTracker); + await postProcessTIFFIle(targetPath, context); - const collectedUnlinkedNodes = createUnlinkedTanaNodes(path.basename(vaultContext.vaultPath), today, vaultContext); + const collectedUnlinkedNodes = createUnlinkedTanaNodes(path.basename(context.vaultPath), today, context); if (collectedUnlinkedNodes) { //TODO: summary? appendFileSync(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2)); @@ -47,32 +45,32 @@ export async function ObsidianVaultConverter(vaultContext: VaultContext, today: //close vault-node children appendFileSync(targetPath, '\n ]'); - const superTags = vaultContext.createSuperTagObjects(); + const superTags = createSuperTagObjects(context.superTagTracker); if (superTags.length > 0) { appendFileSync(targetPath, ',\n "supertags": \n' + JSON.stringify(superTags, null, 2)); } - if (vaultContext.attributes.length > 0) { - appendFileSync(targetPath, ',\n "attributes": \n' + JSON.stringify(vaultContext.attributes, null, 2)); + if (context.attributes.length > 0) { + appendFileSync(targetPath, ',\n "attributes": \n' + JSON.stringify(context.attributes, null, 2)); } - appendFileSync(targetPath, ',\n "summary": \n' + JSON.stringify(vaultContext.summary, null, 2)); + appendFileSync(targetPath, ',\n "summary": \n' + JSON.stringify(context.summary, null, 2)); //close target object appendFileSync(targetPath, '\n}'); - return vaultContext.summary; + return context.summary; } -function loadDailyNotesConfig(vaultContext: VaultContext) { - const dailyNotesConfigFile = path.join(vaultContext.vaultPath, '/.obsidian/daily-notes.json'); +function loadDailyNotesConfig(context: VaultContext) { + const dailyNotesConfigFile = path.join(context.vaultPath, '/.obsidian/daily-notes.json'); if (fs.existsSync(dailyNotesConfigFile)) { //if file does not exists, daily note config was kept default const rawjson = fs.readFileSync(dailyNotesConfigFile); const dailyNoteConfig = JSON.parse(rawjson.toString()); if (dailyNoteConfig.format) { - vaultContext.dailyNoteFormat = dailyNoteConfig.format; + context.dailyNoteFormat = dailyNoteConfig.format; } } } diff --git a/src/converters/obsidian/VaultContext.ts b/src/converters/obsidian/VaultContext.ts deleted file mode 100644 index 4fcb4e7..0000000 --- a/src/converters/obsidian/VaultContext.ts +++ /dev/null @@ -1,268 +0,0 @@ -import { TanaIntermediateSummary, TanaIntermediateAttribute, TanaIntermediateSupertag } from '../../types/types'; -import { idgenerator as randomGenerator } from '../../utils/utils'; - -export enum UidRequestType { - FILE, - CONTENT, -} - -interface UidData { - type: UidRequestType; - uid: string; - obsidianLink: string; -} - -export interface HeadingUidData { - uid: string; - link: string[]; //without the fileName -} - -enum BlockUidRequestType { - LINK, //the request came from using the block ref - BLOCK, //the request came from finding the block ref -} - -interface BlockUidData { - uid: string; - obsidianLink: string; - type: BlockUidRequestType; -} - -enum LinkType { - DEFAULT, - HEADING, - BLOCK, -} - -/** - * - * @param link the link split by "#" and cleaned. - */ -function detectLinkType(link: string[]) { - if (link.length === 2 && link[1].startsWith('^')) { - return LinkType.BLOCK; - } - - if (link.length > 1) { - return LinkType.HEADING; - } - - return LinkType.DEFAULT; -} - -export function extractBlockId(content: string): [string, string | undefined] { - let id; - - const cleanedContent = content - .split('\n') - .map((line) => { - const splitLine = line.split(' '); - const lastEle = splitLine[splitLine.length - 1]; - if (lastEle.startsWith('^')) { - //we take the last id, rest will be detected as invalid - id = lastEle; - return splitLine.slice(0, -1).join(' '); - } - }) - .join('\n'); - - return [cleanedContent, id]; -} - -/** - * Contains all information that is used across the whole vault, like which Uids have already been used. - */ -export class VaultContext { - summary: TanaIntermediateSummary = { - leafNodes: 0, - topLevelNodes: 0, - totalNodes: 0, - calendarNodes: 0, - fields: 0, - brokenRefs: 0, - }; - //we will need to expand this to be able to support relative paths - - //all normal ([[fileName]]), file or folder uids: - defaultLinkTracker = new Map(); - //all heading temp-uids: - headingLinkTracker = new Map(); - //all block uids: > - blockLinkTracker = new Map>(); - invalidLinks: { uid: string; link: string }[] = []; - superTagTracker = new Map(); - attributes: TanaIntermediateAttribute[] = []; - - dailyNoteFormat = 'YYYY-MM-DD'; //Default obsidian Daily note format - - vaultPath: string; - - constructor(vaultPath: string, public idGenerator: () => string = randomGenerator) { - if (vaultPath.endsWith('/')) { - vaultPath = vaultPath.slice(0, -1); - } - this.vaultPath = vaultPath; - } - - /** - * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content. - * @returns [uid, cleanedContent] - */ - contentUid(fileName: string, content: string) { - const [cleanedContent, id] = extractBlockId(content); - if (id) { - return [this.handleBlockLink([fileName, id], BlockUidRequestType.BLOCK), cleanedContent]; - } else { - return [this.randomUid(), content]; - } - } - - randomUid() { - this.incrementSummary(); - //folders / "summary unlinked nodes" / content-nodes get new uids always - //because these UIDs either are not in the source or need to be connected later - return this.idGenerator(); - } - - /** - * We can not just take the obsidian link because we might already have created a node for that link - * or a folder might have the same link as a file. - * - * This function should return the correct Uid. - * - * A side-effect is the collection of the summary. - */ - uidRequest(obsidianLink: string, requestType: UidRequestType) { - if (requestType === UidRequestType.FILE) { - //we dont use the same split-link because files could contain # - return this.handleDefaultLink(obsidianLink.trim(), requestType); - } - - //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do - const cleanLink = obsidianLink - .split('#') - .map((s) => s.trim()) - .filter((s) => s !== ''); - const linkType = detectLinkType(cleanLink); - switch (linkType) { - case LinkType.DEFAULT: - return this.handleDefaultLink(cleanLink[0], requestType); - case LinkType.BLOCK: - return this.handleBlockLink(cleanLink, BlockUidRequestType.LINK); - case LinkType.HEADING: - return this.handleHeadingLink(cleanLink); - default: - throw 'Invalid link type detected: ' + cleanLink; - } - } - - private handleDefaultLink(obsidianLink: string, requestType: UidRequestType) { - const uidData = this.defaultLinkTracker.get(obsidianLink); - if (!uidData) { - this.incrementSummary(); - const uid = this.idGenerator(); - this.defaultLinkTracker.set(obsidianLink, { uid, obsidianLink, type: requestType }); - return uid; - } - - //at the end every uidData that has been only accessed from content (so inside the markdown file) - //has no matching file node and is therefore unlinked - //otherwise during the creation of the file node, it would have accessed the same Uid - if (uidData.type === UidRequestType.CONTENT) { - uidData.type = requestType; - } - - return uidData.uid; - } - - private handleHeadingLink(link: string[]) { - const fileName = link[0]; - const fileHeadingData = this.headingLinkTracker.get(fileName) ?? []; - this.headingLinkTracker.set(fileName, fileHeadingData); - //these "uids" are replaced and counted later - //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end - const uid = this.idGenerator(); - fileHeadingData.push({ uid, link: link.slice(1) }); - return uid; - } - - private handleBlockLink(link: string[], requestType: BlockUidRequestType) { - const fileName = link[0]; - const blockUidMap = this.blockLinkTracker.get(fileName) ?? new Map(); - this.blockLinkTracker.set(fileName, blockUidMap); - const blockObsidianUid = link[1]; - let blockUidData = blockUidMap.get(blockObsidianUid); - if (!blockUidData) { - blockUidData = { - uid: this.randomUid(), - obsidianLink: link.join('#'), - type: requestType, - }; - } - blockUidMap.set(blockObsidianUid, blockUidData); - - //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid - //because that means we didnt find it in "file" - if (blockUidData.type === BlockUidRequestType.LINK) { - blockUidData.type = requestType; - } - - return blockUidData.uid; - } - - private incrementSummary() { - this.summary.totalNodes++; - this.summary.leafNodes++; - } - - addInvalidLinks(links: { uid: string; link: string }[]) { - links.forEach((link) => { - this.invalidLinks.push(link); - this.incrementSummary(); - }); - } - - getAllInvalidContentLinks() { - const unlinkedNodes: { uid: string; link: string }[] = [...this.invalidLinks]; - for (const node of this.defaultLinkTracker.values()) { - if (node.type === UidRequestType.CONTENT) { - unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink }); - } - } - for (const fileBlockLinks of this.blockLinkTracker.values()) { - for (const blockLink of fileBlockLinks.values()) { - if (blockLink.type === BlockUidRequestType.LINK) { - unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink }); - } - } - } - - return unlinkedNodes; - } - - /** - * - * @param tag without the # - */ - superTagUid(tag: string) { - let uid = this.superTagTracker.get(tag); - if (uid === undefined) { - uid = this.idGenerator(); - this.superTagTracker.set(tag, uid); - } - return uid; - } - - createSuperTagObjects(): TanaIntermediateSupertag[] { - return Array.from(this.superTagTracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] })); - } - - addAttribute(name: string) { - const foundAttr = this.attributes.filter((attr) => attr.name === name)[0]; - if (foundAttr) { - foundAttr.count++; - } else { - this.attributes.push({ name, values: [], count: 1 }); - } - } -} diff --git a/src/converters/obsidian/context.ts b/src/converters/obsidian/context.ts new file mode 100644 index 0000000..0b96ba3 --- /dev/null +++ b/src/converters/obsidian/context.ts @@ -0,0 +1,49 @@ +import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types'; +import { idgenerator as randomGenerator } from '../../utils/utils'; +import { BlockLinkTracker } from './tanaconversion/blocks'; +import { HeadingDummyUidTracker, HeadingTracker } from './tanaconversion/headingLinks'; +import { SuperTagTracker } from './tanaconversion/supertags'; +import { IdGenerator, UidTracker } from './tanaconversion/uids'; + +/** + * Contains all information that is used across the whole vault, like which UIDs have already been used. + */ +export interface VaultContext { + summary: TanaIntermediateSummary; + defaultLinkTracker: UidTracker; + headingTracker: HeadingTracker; + dummyHeadingLinkTracker: HeadingDummyUidTracker; + blockLinkTracker: BlockLinkTracker; + invalidLinks: { uid: string; link: string }[]; + superTagTracker: SuperTagTracker; + attributes: TanaIntermediateAttribute[]; + dailyNoteFormat: string; + vaultPath: string; + idGenerator: IdGenerator; +} + +export function createVaultContext(vaultPath: string, idGenerator: () => string = randomGenerator): VaultContext { + if (vaultPath.endsWith('/')) { + vaultPath = vaultPath.slice(0, -1); + } + return { + summary: { + leafNodes: 0, + topLevelNodes: 0, + totalNodes: 0, + calendarNodes: 0, + fields: 0, + brokenRefs: 0, + }, + idGenerator, + vaultPath, + defaultLinkTracker: new Map(), + headingTracker: new Map(), + dummyHeadingLinkTracker: new Map(), + blockLinkTracker: new Map(), + invalidLinks: [], + superTagTracker: new Map(), + attributes: [], + dailyNoteFormat: 'YYYY-MM-DD', //Default obsidian Daily note format + }; +} diff --git a/src/converters/obsidian/convertMarkdownNode.ts b/src/converters/obsidian/convertMarkdownNode.ts deleted file mode 100644 index 49cae56..0000000 --- a/src/converters/obsidian/convertMarkdownNode.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { NodeType, TanaIntermediateNode } from '../../types/types'; -import { getBracketLinks } from '../../utils/utils'; -import { extractImageLinks } from './extractImageLinks'; -import { HierarchyType, MarkdownNode } from './markdown/extractMarkdownNodes'; -import { UidRequestType, VaultContext } from './VaultContext'; - -// eslint is just wrong here -// eslint-disable-next-line no-useless-escape -const tagRegex = /(?:\s|^)(#([^\[\]]+?))(?:(?=\s)|$)/g; - -export function convertMarkdownNode( - fileName: string, - obsidianNode: MarkdownNode, - today: number, - vaultContext: VaultContext, -): TanaIntermediateNode { - const [uid, content] = vaultContext.contentUid(fileName, obsidianNode.content); - const tanaNode: TanaIntermediateNode = { - uid, - name: content, - createdAt: today, - editedAt: today, - type: 'node' as NodeType, - }; - - if (obsidianNode.type === HierarchyType.BULLET) { - if (content.startsWith('[ ] ')) { - handleTodo(tanaNode); - } - if (content.startsWith('[x] ') || content.startsWith('[X] ')) { - handleDone(tanaNode); - } - } - - //LogSeq specific - tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim(); - - // tags are kept inline but added as separate supertags too - // in obsidian tags are really tags so should be kept that way, but might be used inline, so shouldnt be remove - const tags = tanaNode.name.match(tagRegex); - if (tags) { - const supertags = new Set(tags.map((tag) => vaultContext.superTagUid(tag.trim().slice(1)))); - - //we can remove the last tag without losing meaning because it will show up as a super tag anyways - const lastTag = tags[tags.length - 1]; - if (tanaNode.name.endsWith(lastTag)) { - tanaNode.name = tanaNode.name.slice(0, -lastTag.length); - } - - tanaNode.supertags = Array.from(supertags); - } - - const foundUids = getBracketLinks(tanaNode.name, true) - .filter((bracketLink) => bracketLink.trim() !== '') - .map((bracketLink) => { - //handling aliases - const aliasArr = bracketLink.split('|'); - const link = aliasArr[0]; - const alias = aliasArr[1]; - const foundUid = vaultContext.uidRequest(link, UidRequestType.CONTENT); - const result = - alias !== undefined && alias.trim() !== '' - ? '[' + alias.trim() + ']([[' + foundUid + ']])' - : '[[' + foundUid + ']]'; - - return [bracketLink, foundUid, result]; - }); - - if (foundUids.length > 0) { - //using Set to filter out links that appear multiple times - const refSet = new Set(); - if (!tanaNode.refs) { - tanaNode.refs = []; - } - for (const [link, foundUid, result] of foundUids) { - refSet.add(foundUid); - tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result); - } - tanaNode.refs.push(...Array.from(refSet.values())); - } - - handleImages(tanaNode, today, vaultContext); - - return tanaNode; -} - -function handleImages(tanaNode: TanaIntermediateNode, today: number, vaultContext: VaultContext) { - const imageData = extractImageLinks(tanaNode.name); - if (imageData.length === 0) { - return; - } - if (imageData.length === 1) { - const image = imageData[0]; - tanaNode.type = 'image'; - tanaNode.mediaUrl = image[1].trim(); - tanaNode.name = tanaNode.name.replace(image[3], image[0].trim()); - return; - } - - //more than one image means we add them as child nodes - const childImageNodes: TanaIntermediateNode[] = []; - - imageData.forEach((image) => { - const altText = image[0]; - const url = image[1]; - //filter out duplicate image uses - if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) { - const oldLink = image[3]; - const uid = vaultContext.randomUid(); - tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]'); - childImageNodes.push({ - uid, - name: altText.trim(), - createdAt: today, - editedAt: today, - type: 'image' as NodeType, - mediaUrl: url.trim(), - }); - } - }); - - tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes]; -} - -function handleTodo(tanaNode: TanaIntermediateNode) { - tanaNode.name = tanaNode.name.slice('[ ] '.length); - tanaNode.todoState = 'todo'; -} - -function handleDone(tanaNode: TanaIntermediateNode) { - tanaNode.name = tanaNode.name.slice('[x] '.length); - tanaNode.todoState = 'done'; -} diff --git a/src/converters/obsidian/convertObsidianFile.ts b/src/converters/obsidian/convertObsidianFile.ts deleted file mode 100644 index 6e5c292..0000000 --- a/src/converters/obsidian/convertObsidianFile.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { convertMarkdownNode } from './convertMarkdownNode'; -import { createFileNode } from './createFileNode'; -import { createTree } from './createTree'; -import { HierarchyType, MarkdownNode, extractMarkdownNodes } from './markdown/extractMarkdownNodes'; -import { HeadingTracker } from './filterHeadingLinks'; -import { FrontmatterData, parseFrontmatter } from './parseFrontmatter'; -import { VaultContext } from './VaultContext'; - -export function convertObsidianFile( - fileName: string, //without ending - fileContent: string, - context: VaultContext, - today: number = Date.now(), - headingTracker?: HeadingTracker, -) { - let startIndex = 0; - - let frontmatter: FrontmatterData[] = []; - if (fileContent.startsWith('---\n')) { - const frontMatterEndIndex = fileContent.indexOf('\n---\n'); - if (frontMatterEndIndex !== -1) { - startIndex = frontMatterEndIndex + '\n---\n'.length; - frontmatter = parseFrontmatter(fileContent.slice('---\n'.length, frontMatterEndIndex)); - } - } - - let obsidianNodes = extractMarkdownNodes(fileContent, startIndex); - let displayName = fileName; - - //LogSeq specific - const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/); - if (name) { - displayName = name[1]; - obsidianNodes = obsidianNodes.slice(1); - } - - // common in Obsidian to repeat the filename in the first line, remove first line if so - if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) { - obsidianNodes = obsidianNodes.slice(1); - } - - const headingNodes: (MarkdownNode & { uid: string })[] = []; - - const fileNode = createFileNode(displayName, today, context, frontmatter); - - createTree( - fileNode, - { type: HierarchyType.ROOT, level: -1 } as MarkdownNode, - obsidianNodes, - isChild, - (markdownNode) => { - return convertMarkdownNode(fileName, markdownNode, today, context); - }, - (tanaNode, markdownNode) => { - if (markdownNode.type === HierarchyType.HEADING) { - headingNodes.push({ ...markdownNode, uid: tanaNode.uid }); - } - }, - ); - - headingTracker?.set(fileName, headingNodes); - - return fileNode; -} - -function isChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) { - if (potentialParent.type === HierarchyType.ROOT) { - return true; - } - - //HEADING is always a parent of non-headings - if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) { - return true; - } - - //PARAGRAPH can only be child of HEADING and can not be a parent - if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) { - return false; - } - - if (potentialParent.type === potentialChild.type) { - return potentialParent.level < potentialChild.level; - } - - return false; -} diff --git a/src/converters/obsidian/createFileNode.ts b/src/converters/obsidian/createFileNode.ts deleted file mode 100644 index 909cc05..0000000 --- a/src/converters/obsidian/createFileNode.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { NodeType, TanaIntermediateNode } from '../../types/types'; -import { FrontmatterData } from './parseFrontmatter'; -import { UidRequestType, VaultContext } from './VaultContext'; -import moment from 'moment'; - -function frontMatterToFieldNode(data: FrontmatterData, today: number, context: VaultContext): TanaIntermediateNode { - let children: TanaIntermediateNode[] | undefined; - - if (data.values && data.values.length > 0) { - children = data.values.map((value) => ({ - uid: context.randomUid(), - name: value, - type: 'node', - createdAt: today, - editedAt: today, - })); - } - context.addAttribute(data.key); - context.summary.fields++; - - return { uid: context.randomUid(), name: data.key, type: 'field', createdAt: today, editedAt: today, children }; -} - -export function createFileNode( - displayName: string, - today: number, - context: VaultContext, - frontmatter: FrontmatterData[], -): TanaIntermediateNode { - let supertags: string[] | undefined; - const fieldNodes: TanaIntermediateNode[] = []; - - frontmatter.forEach((data) => { - if (data.key === 'tags') { - supertags = data.values.map((val) => context.superTagUid(val)); - } else { - fieldNodes.push(frontMatterToFieldNode(data, today, context)); - } - }); - - let nodeUid = context.uidRequest(displayName, UidRequestType.FILE); - let nodeType: NodeType = 'node'; - const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat); - - if (dateDisplayName.length > 0) { - nodeUid = dateDisplayName; - nodeType = 'date'; - displayName = dateDisplayName; - } - - return { - uid: nodeUid, - name: displayName, - createdAt: today, - editedAt: today, - type: nodeType, - supertags, - children: fieldNodes.length > 0 ? fieldNodes : undefined, - }; -} - -function dateStringToDateUID(displayName: string, dateFormat: string): string { - const date = moment(displayName, dateFormat, true); - if (date.isValid()) { - return date.format('MM-DD-YYYY'); - } - return ''; -} diff --git a/src/converters/obsidian/filterHeadingLinks.ts b/src/converters/obsidian/filterHeadingLinks.ts deleted file mode 100644 index 1f00feb..0000000 --- a/src/converters/obsidian/filterHeadingLinks.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { HeadingUidData } from './VaultContext'; -import { traverseTreeDepthFirst } from './traverseTreeDepthFirst'; -import { createTree } from './createTree'; - -//children are sorted like in file, important to detect valid heading links -export type HeadingNode = { uid: string; content: string; children?: HeadingNode[] }; - -export type HeadingData = { uid: string; content: string; level: number }; - -export type HeadingTracker = Map; - -export type HeadingLinks = Map; - -export function filterHeadingLinks( - headingLinks: HeadingLinks, - tracker: HeadingTracker, -): [{ old: string; new: string }[], HeadingUidData[]] { - const missingHeadingLinks = []; - const validHeadingLinks = []; - for (const [fileName, headingUidData] of headingLinks.entries()) { - const potentiallyMatchingNodes = tracker.get(fileName); - if (potentiallyMatchingNodes) { - //we use a dummy because the tree function needs one root node - const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 }; - const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' }; - createTree( - dummyTargetRoot, - dummySourceRoot, - potentiallyMatchingNodes, - (potentialParent, potentialChild) => potentialParent.level < potentialChild.level, - (data) => ({ uid: data.uid, content: data.content, children: undefined }), - ); - const headingTree = dummyTargetRoot.children ?? []; - - for (const data of headingUidData) { - const matchingHeadingNode = traverseTreeDepthFirst(headingTree, data.link); - if (matchingHeadingNode) { - validHeadingLinks.push({ old: data.uid, new: matchingHeadingNode.uid }); - } else { - missingHeadingLinks.push(data); - } - } - } else { - missingHeadingLinks.push(...headingUidData); - } - } - return [validHeadingLinks, missingHeadingLinks]; -} diff --git a/src/converters/obsidian/markdown/blockIds.ts b/src/converters/obsidian/markdown/blockIds.ts new file mode 100644 index 0000000..197cae2 --- /dev/null +++ b/src/converters/obsidian/markdown/blockIds.ts @@ -0,0 +1,18 @@ +export function extractBlockId(content: string): [string, string | undefined] { + let id; + + const cleanedContent = content + .split('\n') + .map((line) => { + const splitLine = line.split(' '); + const lastEle = splitLine[splitLine.length - 1]; + if (lastEle.startsWith('^')) { + //we take the last id, rest will be detected as invalid + id = lastEle; + return splitLine.slice(0, -1).join(' '); + } + }) + .join('\n'); + + return [cleanedContent, id]; +} diff --git a/src/converters/obsidian/markdown/bullet.ts b/src/converters/obsidian/markdown/bullet.ts deleted file mode 100644 index 2cf8344..0000000 --- a/src/converters/obsidian/markdown/bullet.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { countEmptySpace, findFirstEmptySpacePosBackwards } from './emptySpace'; -import { Hierarchy } from './hierarchy'; -import { nextNewLine } from './newline'; - -export function isBulletNodeStart(content: string, pos: number) { - let isBulletStart = true; - - const char = content[pos]; - const secondChar = content[pos + 1]; - //only real empty string is valid for bullet - if (!((char === '*' || char === '-') && secondChar === ' ')) { - //check for numbered bullets - isBulletStart = !isNaN(parseInt(char)) && secondChar === '.' && content[pos + 2] === ' '; - } - - //bullet nodes always have \n( *) in front of them or are at the start of the file - //so need to backtrack empty space to verify - const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1; - const nonEmptyChar = content[nonEmptyPos]; - if (!(nonEmptyChar === '\n' || nonEmptyChar === undefined)) { - return false; - } - - return isBulletStart; -} - -export function findBulletSlicePosition(content: string, curPosition: number, hierarchy: Hierarchy) { - //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol - let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1); - let char = content[endPosition]; - - // eslint-disable-next-line no-constant-condition - while (true) { - //new lines that start with the number of empty spaces of the level+1 are considered part of the node - const emptySpaces = countEmptySpace(content, endPosition + 1); - if (emptySpaces == hierarchy.level + 2 && !isBulletNodeStart(content, endPosition + 1 + emptySpaces)) { - endPosition = nextNewLine(content, endPosition + 1); - char = content[endPosition]; - } else { - return endPosition; - } - if (char === undefined) { - return endPosition; - } - } -} - -export function postProcessBullet(content: string) { - //remove empty prefix - const processed = content.trimStart(); - if (!isNaN(parseInt(processed[0]))) { - //if it starts with e.g. "1." we keep the numbering because Tana does not support numbered lists right now - return processed; - } - //remove "* " - return processed.slice(2); -} diff --git a/src/converters/obsidian/markdown/bullets.ts b/src/converters/obsidian/markdown/bullets.ts new file mode 100644 index 0000000..0e3f0cd --- /dev/null +++ b/src/converters/obsidian/markdown/bullets.ts @@ -0,0 +1,68 @@ +import { countEmptySpace, findFirstEmptySpacePosBackwards } from './emptySpace'; +import { HierarchyType } from './markdownNodes'; +import { Hierarchy } from './markdownNodes'; +import { isNewLine, nextNewLine } from './newline'; + +function isNumberedBullet(content: string, pos: number) { + const char = content[pos]; + const secondChar = content[pos + 1]; + return !isNaN(parseInt(char)) && secondChar === '.' && content[pos + 2] === ' '; +} + +export function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy { + let isBulletStart = true; + //skip possible empty space at the start of nodes + const pos = currentPos + countEmptySpace(content, currentPos); + + const char = content[pos]; + const secondChar = content[pos + 1]; + //only real empty string is valid for bullet + if (!((char === '*' || char === '-') && secondChar === ' ')) { + isBulletStart = isNumberedBullet(content, pos); + } + + //bullet nodes always have \n( *) in front of them or are at the start of the file + //so need to backtrack empty space to verify + const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1; + const nonEmptyChar = content[nonEmptyPos]; + if (!isNewLine(nonEmptyChar)) { + return null; + } + //for nodes we need a precise level === empty space, so we can detect multi line node content + return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null; +} + +export function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) { + let posOfBulletText = curPosition + hierarchy.level; + if (isNumberedBullet(content, posOfBulletText)) { + //in case of numbered bullet, we keep the symbol + return posOfBulletText; + } + posOfBulletText += 1 + 1; //bullet symbol and empty space after that + + const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText); + + return posOfBulletText + emptySpaceInBulletText; +} + +export function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) { + //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol + //TODO: numbered? Works but might search one char extra, oh no + let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1); + let char = content[endPosition]; + + // eslint-disable-next-line no-constant-condition + while (true) { + //new lines that start with the number of empty spaces of the level+1 are considered part of the node + const emptySpaces = countEmptySpace(content, endPosition + 1); + if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) { + endPosition = nextNewLine(content, endPosition + 1); + char = content[endPosition]; + } else { + return endPosition; + } + if (char === undefined) { + return endPosition; + } + } +} diff --git a/src/converters/obsidian/markdown/extractMarkdownNodes.ts b/src/converters/obsidian/markdown/extractMarkdownNodes.ts deleted file mode 100644 index 30fc015..0000000 --- a/src/converters/obsidian/markdown/extractMarkdownNodes.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { findBulletSlicePosition, isBulletNodeStart, postProcessBullet } from './bullet'; -import { countEmptySpace } from './emptySpace'; -import { findHeadingSlicePosition, countHeadingSymbols, postProcessHeading } from './heading'; -import { Hierarchy, newTypeOfHierachyStarts } from './hierarchy'; -import { findParagraphSlicePosition, postProcessParagraph } from './paragraph'; - -//these types are just needed for splitting and for creating the correct hierarchy -export enum HierarchyType { - ROOT = 'Root', - HEADING = 'Heading', - BULLET = 'Bullet Node', - PARAGRAPH = 'Paragraph', -} - -export interface MarkdownNode { - content: string; - type: HierarchyType; - //lower = higher in the hierarchy - //for bullet nodes also used as a measure of empty space - //for heading nodes this is the number of #'s - level: number; -} - -export function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] { - const nodeDescs: MarkdownNode[] = []; - - for (let index = startPosition; index < content.length; index++) { - const element = content[index]; - if (element == '\n') { - continue; - } - - const [node, slicePosition] = extractMarkdownNode(content, index); - nodeDescs.push(node); - - //-1 because we dont want to assume that the char at the slice position is irrelevant - index = slicePosition - 1; - } - - return nodeDescs; -} -/** - * @returns [MarkdownNode, slicePosition] - */ -function extractMarkdownNode(content: string, curPosition: number): [MarkdownNode, number] { - let hierarchy: Hierarchy; - - const headingSymbols = countHeadingSymbols(content, curPosition); - if (headingSymbols > 0 && content[curPosition + headingSymbols] === ' ') { - hierarchy = { type: HierarchyType.HEADING, level: headingSymbols }; - } else { - //for nodes we need a precise level === empty space, so we can detect multi line node content - const emptySpaces = countEmptySpace(content, curPosition); - if (isBulletNodeStart(content, curPosition + emptySpaces)) { - hierarchy = { type: HierarchyType.BULLET, level: emptySpaces }; - } else { - hierarchy = { type: HierarchyType.PARAGRAPH, level: 0 }; - } - } - - const slicePos = findSlicePosition(content, curPosition, hierarchy); - - return [ - { - ...hierarchy, - content: postProcessMarkdownNodes(content.slice(curPosition, slicePos), hierarchy), - }, - slicePos, - ]; -} - -function findSlicePosition(content: string, curPosition: number, hierarchy: Hierarchy): number { - if (hierarchy.type === HierarchyType.HEADING) { - return findHeadingSlicePosition(content, curPosition, hierarchy); - } else if (hierarchy.type === HierarchyType.BULLET) { - return findBulletSlicePosition(content, curPosition, hierarchy); - } else if (hierarchy.type === HierarchyType.PARAGRAPH) { - return findParagraphSlicePosition(content, curPosition); - } - throw 'Unsupported HierarchyType detected: ' + hierarchy; -} - -export function postProcessMarkdownNodes(content: string, hierarchy: Hierarchy): string { - if (hierarchy.type === HierarchyType.BULLET) { - return postProcessBullet(content); - } - - if (hierarchy.type === HierarchyType.HEADING) { - return postProcessHeading(content, hierarchy); - } - - if (hierarchy.type === HierarchyType.PARAGRAPH) { - return postProcessParagraph(content); - } - - throw 'Unsupported HierarchyType detected: ' + hierarchy; -} diff --git a/src/converters/obsidian/parseFrontmatter.ts b/src/converters/obsidian/markdown/frontmatter.ts similarity index 77% rename from src/converters/obsidian/parseFrontmatter.ts rename to src/converters/obsidian/markdown/frontmatter.ts index 140bdb0..e4d9f0b 100644 --- a/src/converters/obsidian/parseFrontmatter.ts +++ b/src/converters/obsidian/markdown/frontmatter.ts @@ -3,6 +3,22 @@ export type FrontmatterData = { values: string[]; }; +/** + * @returns [frontMatterData, position after end of frontmatter relevant chars] + */ +export function extractFrontmatter(content: string): [FrontmatterData[], number] | null { + if (content.startsWith('---\n')) { + const frontMatterEndIndex = content.indexOf('\n---\n'); + if (frontMatterEndIndex !== -1) { + return [ + parseFrontmatter(content.slice('---\n'.length, frontMatterEndIndex)), + frontMatterEndIndex + '\n---\n'.length, + ]; + } + } + return null; +} + /** * * @param frontmatter without the starting "---" or ending "---" diff --git a/src/converters/obsidian/markdown/heading.ts b/src/converters/obsidian/markdown/heading.ts deleted file mode 100644 index 749f9f9..0000000 --- a/src/converters/obsidian/markdown/heading.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Hierarchy } from './hierarchy'; -import { nextNewLine } from './newline'; - -export function countHeadingSymbols(content: string, pos: number) { - let curPos = pos; - let count = 0; - while (content[curPos] === '#') { - curPos++; - count++; - } - - return count; -} - -export function isHeadingStart(content: string, pos: number) { - const count = countHeadingSymbols(content, pos); - return count > 0 && content[pos + count] === ' '; -} - -export function findHeadingSlicePosition(content: string, curPosition: number, hierachy: Hierarchy) { - //we can skip the heading symbols and the emtpy space between heading symbols and heading text - return nextNewLine(content, curPosition + hierachy.level + 1); -} - -/* - * Removes heading symbols and empty space at the start of the heading. - */ -export function postProcessHeading(content: string, hierarchy: Hierarchy) { - return content.slice(hierarchy.level).trim(); -} diff --git a/src/converters/obsidian/markdown/headings.ts b/src/converters/obsidian/markdown/headings.ts new file mode 100644 index 0000000..3ed07e3 --- /dev/null +++ b/src/converters/obsidian/markdown/headings.ts @@ -0,0 +1,39 @@ +import { countEmptySpace } from './emptySpace'; +import { HierarchyType } from './markdownNodes'; +import { Hierarchy } from './markdownNodes'; +import { lastPositionIsNewline, nextNewLine } from './newline'; + +export function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy { + if (!lastPositionIsNewline(content, pos)) { + return null; + } + const count = countHeadingSymbols(content, pos); + if (!(count > 0 && content[pos + count] === ' ')) { + return null; + } + + return { type: HierarchyType.HEADING, level: count }; +} + +function countHeadingSymbols(content: string, pos: number) { + let curPos = pos; + let count = 0; + while (content[curPos] === '#') { + curPos++; + count++; + } + + return count; +} + +export function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) { + const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and " " between heading symbols and text + const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText); + + return posOfHeadingText + emptySpaceInHeadingText; +} + +export function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) { + //for the search we can skip the heading symbols and the empty space between heading symbols and heading text + return nextNewLine(content, headingTextPos + hierarchy.level + 1); +} diff --git a/src/converters/obsidian/markdown/hierarchy.ts b/src/converters/obsidian/markdown/hierarchy.ts deleted file mode 100644 index 6f35971..0000000 --- a/src/converters/obsidian/markdown/hierarchy.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { isBulletNodeStart } from './bullet'; -import { HierarchyType, MarkdownNode } from './extractMarkdownNodes'; -import { isHeadingStart } from './heading'; - -export type Hierarchy = Omit; - -//special case, where we want an extra bullet for block quotes -function isBlockQuoteStart(content: string, pos: number) { - return content[pos] === '>' && content[pos + 1] === ' '; -} - -/** - * Returns a hierachy type, if a new type of hierachy starts at the given position. - * Null means that no hierachy starts there, so the current hierarchy should continue. - */ -export function newTypeOfHierachyStarts(content: string, pos: number): HierarchyType | null { - if (isHeadingStart(content, pos)) { - return HierarchyType.HEADING; - } - if (isBulletNodeStart(content, pos)) { - return HierarchyType.BULLET; - } - if (isBlockQuoteStart(content, pos)) { - return HierarchyType.PARAGRAPH; - } - - return null; -} diff --git a/src/converters/obsidian/extractImageLinks.ts b/src/converters/obsidian/markdown/imageLinks.ts similarity index 90% rename from src/converters/obsidian/extractImageLinks.ts rename to src/converters/obsidian/markdown/imageLinks.ts index d62e691..8811405 100644 --- a/src/converters/obsidian/extractImageLinks.ts +++ b/src/converters/obsidian/markdown/imageLinks.ts @@ -23,15 +23,13 @@ export function extractImageLinks(content: string) { return imageData; } -//TODO: improve performance, this halfed the conversion speed of Eleanors vault - -function extractImageLink(content: string, startPositon: number): [string, string, number, string] | number | null { +function extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null { let lastFoundImageSignifier; let altText = ''; let url = ''; //I will atone for my sins, but you are not making me try to do this with RegEx - for (let index = startPositon; index < content.length; index++) { + for (let index = startPosition; index < content.length; index++) { const char = content[index]; if (char === '\n') { return index + 1; @@ -91,18 +89,17 @@ function extractImageLink(content: string, startPositon: number): [string, strin /** * If we detect the possible start of a linked image "[", we try to extract it. - * */ function tryToExtractLinkedImageLink( content: string, - startPositon: number, + startPosition: number, ): [string, string, number, string] | number | null { //in Markdown this is called a linked image (so an image with a URL that you can click on) //a linked image has a normal image link embedded - const embeddedImage = extractImageLink(content, startPositon + 1); + const embeddedImage = extractImageLink(content, startPosition + 1); if (Array.isArray(embeddedImage)) { const endPosition = embeddedImage[2]; - const expectedEndPositon = startPositon + 1 + embeddedImage[3].length; + const expectedEndPositon = startPosition + 1 + embeddedImage[3].length; if (endPosition !== expectedEndPositon) { //in this case we found another image, but not an embedded one //dont need to do work twice, so can use this diff --git a/src/converters/obsidian/markdown/internalLinks.ts b/src/converters/obsidian/markdown/internalLinks.ts new file mode 100644 index 0000000..cb0c94a --- /dev/null +++ b/src/converters/obsidian/markdown/internalLinks.ts @@ -0,0 +1,29 @@ +export enum LinkType { + DEFAULT, + HEADING, + BLOCK, +} + +export function cleanUpLink(link: string) { + //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do + return link + .split('#') + .map((s) => s.trim()) + .filter((s) => s !== ''); +} + +/** + * + * @param link the link split by "#" and cleaned. + */ +export function detectLinkType(link: string[]) { + if (link.length === 2 && link[1].startsWith('^')) { + return LinkType.BLOCK; + } + + if (link.length > 1) { + return LinkType.HEADING; + } + + return LinkType.DEFAULT; +} diff --git a/src/converters/obsidian/markdown/markdownNodes.ts b/src/converters/obsidian/markdown/markdownNodes.ts new file mode 100644 index 0000000..6d8fe72 --- /dev/null +++ b/src/converters/obsidian/markdown/markdownNodes.ts @@ -0,0 +1,129 @@ +import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets'; +import { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings'; +import { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs'; + +//these types are just needed for splitting and for creating the correct hierarchy +export enum HierarchyType { + ROOT = 'Root', + HEADING = 'Heading', + BULLET = 'Bullet Node', + PARAGRAPH = 'Paragraph', +} + +export interface MarkdownNode { + content: string; + type: HierarchyType; + //lower = higher in the hierarchy + //for bullet nodes also used as a measure of empty space + //for heading nodes this is the number of #'s + level: number; +} + +export type Hierarchy = Omit; + +export function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] { + const nodeDescs: MarkdownNode[] = []; + + for (let index = startPosition; index < content.length; index++) { + const element = content[index]; + if (element == '\n') { + continue; + } + + const [node, slicePosition] = extractMarkdownNode(content, index); + nodeDescs.push(node); + + //-1 because we dont want to assume that the char at the slice position is irrelevant + index = slicePosition - 1; + } + + return nodeDescs; +} +/** + * @returns [MarkdownNode, slicePosition] + */ +function extractMarkdownNode(content: string, curPosition: number): [MarkdownNode, number] { + const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition); + const startPos = findSliceStartPosition(content, curPosition, hierarchy); + const slicePos = findSliceEndPosition(content, curPosition, hierarchy); + + return [ + { + ...hierarchy, + //we only trim the end because the beginning might hold meaning + content: content.slice(startPos, slicePos).trimEnd(), + }, + slicePos, + ]; +} + +/** + * If we know that a hierarchy ends, here we can detect the next one. + */ +export function detectNextHierarchy(content: string, curPosition: number): Hierarchy { + let hierachy = detectHeadingHierarchy(content, curPosition); + if (hierachy) { + return hierachy; + } else { + hierachy = detectBulletHierarchy(content, curPosition); + if (hierachy) { + return hierachy; + } + } + return { type: HierarchyType.PARAGRAPH, level: 0 }; +} + +/** + * Finds the position where to start slicing the current hierarchy. Might apply trimming. + */ +function findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number { + //the current position is never \n because we skip that + switch (hierarchy.type) { + case HierarchyType.HEADING: + return findHeadingSliceStartPosition(content, curPosition, hierarchy); + case HierarchyType.BULLET: + return findBulletSliceStartPosition(content, curPosition, hierarchy); + case HierarchyType.PARAGRAPH: + return findParagraphSliceStartPosition(curPosition); + default: + throw 'Unsupported HierarchyType detected: ' + hierarchy; + } +} + +/** + * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position. + */ +function findSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy): number { + switch (hierarchy.type) { + case HierarchyType.HEADING: + return findHeadingSliceEndPosition(content, curPosition, hierarchy); + case HierarchyType.BULLET: + return findBulletSliceEndPosition(content, curPosition, hierarchy); + case HierarchyType.PARAGRAPH: + return findParagraphSliceEndPosition(content, curPosition); + default: + throw 'Unsupported HierarchyType detected: ' + hierarchy; + } +} + +export function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) { + if (potentialParent.type === HierarchyType.ROOT) { + return true; + } + + //HEADING is always a parent of non-headings + if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) { + return true; + } + + //PARAGRAPH can only be child of HEADING and can not be a parent + if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) { + return false; + } + + if (potentialParent.type === potentialChild.type) { + return potentialParent.level < potentialChild.level; + } + + return false; +} diff --git a/src/converters/obsidian/markdown/newline.ts b/src/converters/obsidian/markdown/newline.ts index ebdf665..0d53601 100644 --- a/src/converters/obsidian/markdown/newline.ts +++ b/src/converters/obsidian/markdown/newline.ts @@ -1,7 +1,17 @@ export function nextNewLine(content: string, curPosition: number, count = 0): number { - //end of file is also counted as newline for simplicity - if (content[curPosition + count] === undefined || content[curPosition + count] === '\n') { + const curChar = content[curPosition + count]; + if (isNewLine(curChar)) { return curPosition + count; } return nextNewLine(content, curPosition, count + 1); } + +export function lastPositionIsNewline(content: string, curPosition: number) { + const lastPosChar = content[curPosition - 1]; + return isNewLine(lastPosChar); +} + +export function isNewLine(char: string | undefined) { + //end of file is also counted as newline for simplicity + return char === undefined || char === '\n'; +} diff --git a/src/converters/obsidian/markdown/paragraph.ts b/src/converters/obsidian/markdown/paragraph.ts deleted file mode 100644 index 79f59e6..0000000 --- a/src/converters/obsidian/markdown/paragraph.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { newTypeOfHierachyStarts } from './hierarchy'; -import { nextNewLine } from './newline'; - -export function findParagraphSlicePosition(content: string, curPosition: number) { - let endPosition = nextNewLine(content, curPosition); - let char = content[endPosition]; - let lastChar = char; - endPosition++; - char = content[endPosition]; - //paragraphs end with double newlines or a new hierarchy - // eslint-disable-next-line no-constant-condition - while (true) { - if (char === undefined) { - return endPosition; - } else if ((char === '\n' && lastChar === '\n') || newTypeOfHierachyStarts(content, endPosition) !== null) { - endPosition = endPosition - 1; - return endPosition; - } - lastChar = char; - endPosition++; - char = content[endPosition]; - } -} - -export function postProcessParagraph(content: string) { - //I dont think we should trim the front, because people might want have empty space there that is semantically meaningfull - return content.trimEnd(); -} diff --git a/src/converters/obsidian/markdown/paragraphs.ts b/src/converters/obsidian/markdown/paragraphs.ts new file mode 100644 index 0000000..a473e51 --- /dev/null +++ b/src/converters/obsidian/markdown/paragraphs.ts @@ -0,0 +1,62 @@ +import { detectBulletHierarchy } from './bullets'; +import { HierarchyType } from './markdownNodes'; +import { detectHeadingHierarchy } from './headings'; +import { Hierarchy } from './markdownNodes'; +import { lastPositionIsNewline, nextNewLine } from './newline'; + +export function findParagraphSliceStartPosition(curPosition: number) { + //we don't trim the start + return curPosition; +} + +export function findParagraphSliceEndPosition(content: string, curPosition: number): number { + let endPosition = nextNewLine(content, curPosition); + let char = content[endPosition]; + let lastChar = char; + endPosition++; + char = content[endPosition]; + //paragraphs end with double newlines or a new hierarchy + // eslint-disable-next-line no-constant-condition + while (true) { + if (char === undefined) { + return endPosition; + } else if (char === '\n' && lastChar === '\n') { + return endPosition - 1; + } else { + //we could use this hierarchy because we already detected it, however this would overcomplicate the whole process + const hierachy = newTypeOfHierarchyStarts(content, endPosition); + if (hierachy) { + return endPosition - 1; + } + } + lastChar = char; + endPosition++; + char = content[endPosition]; + } +} + +//special case, where we want an extra bullet for block quotes +//TODO: same for code blocks + code block endings +function detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null { + if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') { + return { type: HierarchyType.PARAGRAPH, level: 0 }; + } + return null; +} + +function newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null { + let hierachy: Hierarchy | null = detectHeadingHierarchy(content, pos); + if (hierachy) { + return hierachy; + } + hierachy = detectBulletHierarchy(content, pos); + if (hierachy) { + return hierachy; + } + hierachy = detectBlockQuoteHierarchy(content, pos); + if (hierachy) { + return hierachy; + } + + return null; +} diff --git a/src/converters/obsidian/markdown/tags.ts b/src/converters/obsidian/markdown/tags.ts new file mode 100644 index 0000000..3b9fc3a --- /dev/null +++ b/src/converters/obsidian/markdown/tags.ts @@ -0,0 +1,11 @@ +// eslint is just wrong here +// eslint-disable-next-line no-useless-escape +const tagRegex = /(?:\s|^)(#([^\[\]]+?))(?:(?=\s)|$)/g; + +export function detectTags(content: string) { + return content.match(tagRegex); +} + +export function cleanUpTag(tag: string) { + return tag.trim().slice(1); //remove the # +} diff --git a/src/converters/obsidian/markdown/todo.ts b/src/converters/obsidian/markdown/todo.ts new file mode 100644 index 0000000..45ca0f0 --- /dev/null +++ b/src/converters/obsidian/markdown/todo.ts @@ -0,0 +1,22 @@ +import { Hierarchy, HierarchyType } from './markdownNodes'; + +function detectTodoType(content: string) { + if (content.startsWith('[ ] ')) { + return 'todo'; + } + if (content.startsWith('[x] ') || content.startsWith('[X] ')) { + return 'done'; + } + + return undefined; +} + +export function removeTodo(content: string, hierachy: Hierarchy): [string, 'todo' | 'done'] | null { + if (hierachy.type === HierarchyType.BULLET) { + const type = detectTodoType(content); + if (type) { + return [content.slice('[ ] '.length), type]; + } + } + return null; +} diff --git a/src/converters/obsidian/postProcessTIFFile.ts b/src/converters/obsidian/postProcessTIFFile.ts deleted file mode 100644 index bef03b7..0000000 --- a/src/converters/obsidian/postProcessTIFFile.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { VaultContext } from './VaultContext'; -import * as readline from 'node:readline/promises'; -import { appendFileSync, createReadStream, renameSync, unlinkSync } from 'node:fs'; -import { filterHeadingLinks, HeadingTracker } from './filterHeadingLinks'; - -/** - * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases. - * E.g. heading#heading2#heading5 is valid. - * - * We replace the dummy heading link UIDs with the actual ones from where we found the heading. - */ -export async function postProcessTIFFIle(filePath: string, context: VaultContext, tracker: HeadingTracker) { - const [validHeadingLinks, missingHeadingLinks] = filterHeadingLinks(context.headingLinkTracker, tracker); - context.addInvalidLinks( - missingHeadingLinks.map((headingLink) => ({ uid: headingLink.uid, link: headingLink.link.join('#') })), - ); - - const tempPath = filePath + '_TEMP'; - //the converter is build to append to the file, so we dont want to load the whole file into memory at the end, that would be counter to the whole idea - const readStream = createReadStream(filePath, 'utf-8'); - const readlineInterface = readline.createInterface(readStream); - const regexes = validHeadingLinks.map((link) => ({ - old: new RegExp(link.old, 'g'), - new: link.new, - })); - for await (const line of readlineInterface) { - let updatedLine = line; - regexes.forEach((regEx) => { - updatedLine = updatedLine.replace(regEx.old, regEx.new); - }); - appendFileSync(tempPath, updatedLine); - } - unlinkSync(filePath); - renameSync(tempPath, filePath); -} diff --git a/src/converters/obsidian/tanaconversion/attributes.ts b/src/converters/obsidian/tanaconversion/attributes.ts new file mode 100644 index 0000000..2e39741 --- /dev/null +++ b/src/converters/obsidian/tanaconversion/attributes.ts @@ -0,0 +1,10 @@ +import { TanaIntermediateAttribute } from '../../../types/types'; + +export function addAttribute(name: string, attributes: TanaIntermediateAttribute[]) { + const foundAttr = attributes.filter((attr) => attr.name === name)[0]; + if (foundAttr) { + foundAttr.count++; + } else { + attributes.push({ name, values: [], count: 1 }); + } +} diff --git a/src/converters/obsidian/tanaconversion/blocks.ts b/src/converters/obsidian/tanaconversion/blocks.ts new file mode 100644 index 0000000..ef91fe9 --- /dev/null +++ b/src/converters/obsidian/tanaconversion/blocks.ts @@ -0,0 +1,56 @@ +import { VaultContext } from '../context'; +import { untrackedUidRequest } from './uids'; + +/** + * all block UIDs: > + */ +export type BlockLinkTracker = Map>; + +export enum BlockUidRequestType { + LINK, //the request came from using the block ref + BLOCK, //the request came from finding the block ref +} + +export interface BlockUidData { + uid: string; + obsidianLink: string; + type: BlockUidRequestType; +} + +export function blockLinkUidRequest(link: string[], requestType: BlockUidRequestType, context: VaultContext) { + const fileName = link[0]; + const blockUidMap = context.blockLinkTracker.get(fileName) ?? new Map(); + context.blockLinkTracker.set(fileName, blockUidMap); + const blockObsidianUid = link[1]; + let blockUidData = blockUidMap.get(blockObsidianUid); + if (!blockUidData) { + blockUidData = { + uid: untrackedUidRequest(context), + obsidianLink: link.join('#'), + type: requestType, + }; + } + blockUidMap.set(blockObsidianUid, blockUidData); + + if (blockUidData.type === BlockUidRequestType.LINK) { + blockUidData.type = requestType; + } + + return blockUidData.uid; +} + +export function filterInvalidBlockLinks(tracker: BlockLinkTracker) { + const unlinkedNodes: { uid: string; link: string }[] = []; + + for (const fileBlockLinks of tracker.values()) { + for (const blockLink of fileBlockLinks.values()) { + //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid + //because that means we didn't find it in "file" + if (blockLink.type === BlockUidRequestType.LINK) { + unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink }); + } + } + } + + return unlinkedNodes; +} diff --git a/src/converters/obsidian/tanaconversion/fields.ts b/src/converters/obsidian/tanaconversion/fields.ts new file mode 100644 index 0000000..e95ad80 --- /dev/null +++ b/src/converters/obsidian/tanaconversion/fields.ts @@ -0,0 +1,34 @@ +import { TanaIntermediateNode } from '../../../types/types'; +import { VaultContext } from '../context'; +import { FrontmatterData } from '../markdown/frontmatter'; +import { addAttribute } from './attributes'; +import { untrackedUidRequest } from './uids'; + +export function frontMatterToFieldNode( + data: FrontmatterData, + today: number, + context: VaultContext, +): TanaIntermediateNode { + let children: TanaIntermediateNode[] | undefined; + + if (data.values && data.values.length > 0) { + children = data.values.map((value) => ({ + uid: untrackedUidRequest(context), + name: value, + type: 'node', + createdAt: today, + editedAt: today, + })); + } + addAttribute(data.key, context.attributes); + context.summary.fields++; + + return { + uid: untrackedUidRequest(context), + name: data.key, + type: 'field', + createdAt: today, + editedAt: today, + children, + }; +} diff --git a/src/converters/obsidian/tanaconversion/headingLinks.ts b/src/converters/obsidian/tanaconversion/headingLinks.ts new file mode 100644 index 0000000..d79cb1d --- /dev/null +++ b/src/converters/obsidian/tanaconversion/headingLinks.ts @@ -0,0 +1,106 @@ +import { createTree } from '../utils/createTree'; +import { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst'; +import { VaultContext } from '../context'; +import { HeadingUidData } from './uids'; +import { createReadStream, appendFileSync, unlinkSync, renameSync } from 'fs'; +import { incrementSummary } from './summary'; +import * as readline from 'node:readline/promises'; + +//children are sorted like in file, important to detect valid heading links +export type HeadingNode = { uid: string; content: string; children?: HeadingNode[] }; + +export type HeadingData = { uid: string; content: string; level: number }; + +export type HeadingTracker = Map; + +//all heading temp / dummy-UIDs: +export type HeadingDummyUidTracker = Map; + +/** + * A heading link is [[fileName#heading...]] + */ +export function headingLinkUidRequest(link: string[], context: VaultContext) { + const fileName = link[0]; + const fileHeadingData = context.dummyHeadingLinkTracker.get(fileName) ?? []; + context.dummyHeadingLinkTracker.set(fileName, fileHeadingData); + //these "UIDs" are replaced and counted later + //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end + const uid = context.idGenerator(); + fileHeadingData.push({ uid, link: link.slice(1) }); + return uid; +} + +/** + * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault. + * Returns the mapping and the dummy UIDs that could not be mapped. + */ +export function matchHeadingLinks( + dummyHeadingLinks: HeadingDummyUidTracker, + tracker: HeadingTracker, +): [{ old: string; new: string }[], HeadingUidData[]] { + const missingHeadingLinks = []; + const validHeadingLinks = []; + for (const [fileName, dummyHeadingUidData] of dummyHeadingLinks.entries()) { + const potentiallyMatchingNodes = tracker.get(fileName); + if (potentiallyMatchingNodes) { + //we use a dummy because the tree function needs one root node + const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 }; + const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' }; + createTree( + dummyTargetRoot, + dummySourceRoot, + potentiallyMatchingNodes, + (potentialParent, potentialChild) => potentialParent.level < potentialChild.level, + (data) => ({ uid: data.uid, content: data.content, children: undefined }), + ); + const headingTree = dummyTargetRoot.children ?? []; + + for (const dummyData of dummyHeadingUidData) { + const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link); + if (matchingHeadingNode) { + validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid }); + } else { + missingHeadingLinks.push(dummyData); + } + } + } else { + missingHeadingLinks.push(...dummyHeadingUidData); + } + } + return [validHeadingLinks, missingHeadingLinks]; +} + +/** + * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases. + * E.g. heading#heading2#heading5 is valid. + * + * We replace the dummy heading link UIDs with the actual ones from where we found the heading. + */ +export async function postProcessTIFFIle(filePath: string, context: VaultContext) { + const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks( + context.dummyHeadingLinkTracker, + context.headingTracker, + ); + missingHeadingLinks.forEach((headingLink) => { + context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') }); + incrementSummary(context.summary); + }); + + const tempPath = filePath + '_TEMP'; + //the converter is build to append to the file, so we dont want to load the whole file into memory at the end, that would be counter to the whole idea + const readStream = createReadStream(filePath, 'utf-8'); + const readlineInterface = readline.createInterface(readStream); + const regExes = validHeadingLinks.map((link) => ({ + old: new RegExp(link.old, 'g'), + new: link.new, + })); + for await (const line of readlineInterface) { + let updatedLine = line; + regExes.forEach((regEx) => { + updatedLine = updatedLine.replace(regEx.old, regEx.new); + }); + appendFileSync(tempPath, updatedLine); + } + unlinkSync(filePath); + renameSync(tempPath, filePath); +} diff --git a/src/converters/obsidian/tanaconversion/imageNodes.ts b/src/converters/obsidian/tanaconversion/imageNodes.ts new file mode 100644 index 0000000..909f2bb --- /dev/null +++ b/src/converters/obsidian/tanaconversion/imageNodes.ts @@ -0,0 +1,42 @@ +import { TanaIntermediateNode, NodeType } from '../../../types/types'; +import { VaultContext } from '../context'; +import { extractImageLinks } from '../markdown/imageLinks'; +import { untrackedUidRequest } from './uids'; + +export function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) { + const imageData = extractImageLinks(tanaNode.name); + if (imageData.length === 0) { + return; + } + if (imageData.length === 1) { + const image = imageData[0]; + tanaNode.type = 'image'; + tanaNode.mediaUrl = image[1].trim(); + tanaNode.name = tanaNode.name.replace(image[3], image[0].trim()); + return; + } + + //more than one image means we add them as child nodes + const childImageNodes: TanaIntermediateNode[] = []; + + imageData.forEach((image) => { + const altText = image[0]; + const url = image[1]; + //filter out duplicate image uses + if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) { + const oldLink = image[3]; + const uid = untrackedUidRequest(context); + tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]'); + childImageNodes.push({ + uid, + name: altText.trim(), + createdAt: today, + editedAt: today, + type: 'image' as NodeType, + mediaUrl: url.trim(), + }); + } + }); + + tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes]; +} diff --git a/src/converters/obsidian/createUnlinkedTanaNodes.ts b/src/converters/obsidian/tanaconversion/invalidLinks.ts similarity index 52% rename from src/converters/obsidian/createUnlinkedTanaNodes.ts rename to src/converters/obsidian/tanaconversion/invalidLinks.ts index 968b988..cd6c047 100644 --- a/src/converters/obsidian/createUnlinkedTanaNodes.ts +++ b/src/converters/obsidian/tanaconversion/invalidLinks.ts @@ -1,13 +1,22 @@ -import { NodeType, TanaIntermediateNode } from '../../types/types'; -import { VaultContext } from './VaultContext'; +import { NodeType, TanaIntermediateNode } from '../../../types/types'; +import { filterInvalidBlockLinks } from './blocks'; +import { filterInvalidContentLinks, untrackedUidRequest } from './uids'; +import { VaultContext } from '../context'; + +export function getAllInvalidLinks(context: VaultContext) { + return [ + ...context.invalidLinks, + ...filterInvalidContentLinks(context.defaultLinkTracker), + ...filterInvalidBlockLinks(context.blockLinkTracker), + ]; +} export function createUnlinkedTanaNodes( importName: string, today: number, - vaultContext: VaultContext, + context: VaultContext, ): TanaIntermediateNode | null { - const unlinkedNodes = vaultContext - .getAllInvalidContentLinks() + const unlinkedNodes = getAllInvalidLinks(context) .sort((a, b) => a.link.localeCompare(b.link)) .map((node) => ({ uid: node.uid, @@ -23,7 +32,7 @@ export function createUnlinkedTanaNodes( const rootNodeName = 'Missing Nodes for ' + importName; const rootNode: TanaIntermediateNode = { - uid: vaultContext.randomUid(), + uid: untrackedUidRequest(context), name: rootNodeName, createdAt: today, editedAt: today, diff --git a/src/converters/obsidian/tanaconversion/markdownNodeConversion.ts b/src/converters/obsidian/tanaconversion/markdownNodeConversion.ts new file mode 100644 index 0000000..6716e95 --- /dev/null +++ b/src/converters/obsidian/tanaconversion/markdownNodeConversion.ts @@ -0,0 +1,78 @@ +import { NodeType, TanaIntermediateNode } from '../../../types/types'; +import { getBracketLinks } from '../../../utils/utils'; +import { MarkdownNode } from '../markdown/markdownNodes'; +import { VaultContext } from '../context'; +import { superTagUidRequests } from './supertags'; +import { contentUidRequest, uidRequest, UidRequestType } from './uids'; +import { removeTodo } from '../markdown/todo'; +import { detectTags } from '../markdown/tags'; +import { handleImages } from './imageNodes'; + +export function convertMarkdownNode( + fileName: string, + obsidianNode: MarkdownNode, + today: number, + context: VaultContext, +): TanaIntermediateNode { + const [uid, content] = contentUidRequest(fileName, obsidianNode.content, context); + const tanaNode: TanaIntermediateNode = { + uid, + name: content, + createdAt: today, + editedAt: today, + type: 'node' as NodeType, + }; + + const [updatedContent, todoState] = removeTodo(content, obsidianNode) ?? [content, undefined]; + tanaNode.name = updatedContent; + tanaNode.todoState = todoState; + + //LogSeq specific + tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim(); + + // tags are kept inline but added as separate supertags too + // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed + const tags = detectTags(tanaNode.name); + if (tags) { + //we can remove the last tag without losing meaning because it will show up as a super tag anyways + const lastTag = tags[tags.length - 1]; + if (tanaNode.name.endsWith(lastTag)) { + tanaNode.name = tanaNode.name.slice(0, -lastTag.length); + } + + tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true); + } + + const foundUIDs = getBracketLinks(tanaNode.name, true) + .filter((bracketLink) => bracketLink.trim() !== '') + .map((bracketLink) => { + //handling aliases + const aliasArr = bracketLink.split('|'); + const link = aliasArr[0]; + const alias = aliasArr[1]; + const foundUid = uidRequest(link, UidRequestType.CONTENT, context); + const result = + alias !== undefined && alias.trim() !== '' + ? '[' + alias.trim() + ']([[' + foundUid + ']])' + : '[[' + foundUid + ']]'; + + return [bracketLink, foundUid, result]; + }); + + if (foundUIDs.length > 0) { + //using Set to filter out links that appear multiple times + const refSet = new Set(); + if (!tanaNode.refs) { + tanaNode.refs = []; + } + for (const [link, foundUid, result] of foundUIDs) { + refSet.add(foundUid); + tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result); + } + tanaNode.refs.push(...Array.from(refSet.values())); + } + + handleImages(tanaNode, today, context); + + return tanaNode; +} diff --git a/src/converters/obsidian/tanaconversion/obsidianFileConversion.ts b/src/converters/obsidian/tanaconversion/obsidianFileConversion.ts new file mode 100644 index 0000000..2971575 --- /dev/null +++ b/src/converters/obsidian/tanaconversion/obsidianFileConversion.ts @@ -0,0 +1,105 @@ +import { convertMarkdownNode } from './markdownNodeConversion'; +import { createTree } from '../utils/createTree'; +import { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../markdown/markdownNodes'; +import { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter'; +import { VaultContext } from '../context'; +import moment from 'moment'; +import { TanaIntermediateNode, NodeType } from '../../../types/types'; +import { frontMatterToFieldNode } from './fields'; +import { superTagUidRequests } from './supertags'; +import { uidRequest, UidRequestType } from './uids'; +import { HeadingData } from './headingLinks'; + +export function convertObsidianFile( + fileName: string, //without ending + fileContent: string, + context: VaultContext, + today: number = Date.now(), +) { + const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0]; + + let obsidianNodes = extractMarkdownNodes(fileContent, startIndex); + let displayName = fileName; + + //LogSeq specific + const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/); + if (name) { + displayName = name[1]; + obsidianNodes = obsidianNodes.slice(1); + } + + // common in Obsidian to repeat the filename in the first line, remove first line if so + if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) { + obsidianNodes = obsidianNodes.slice(1); + } + + const headingData: HeadingData[] = []; + + const fileNode = createFileNode(displayName, today, context, frontmatterData); + + createTree( + fileNode, + { type: HierarchyType.ROOT, level: -1 } as MarkdownNode, + obsidianNodes, + isMarkdownNodeChild, + (markdownNode) => { + return convertMarkdownNode(fileName, markdownNode, today, context); + }, + (tanaNode, markdownNode) => { + if (markdownNode.type === HierarchyType.HEADING) { + headingData.push({ ...markdownNode, uid: tanaNode.uid }); + } + }, + ); + + context.headingTracker.set(fileName, headingData); + + return fileNode; +} + +function createFileNode( + displayName: string, + today: number, + context: VaultContext, + frontmatter: FrontmatterData[], +): TanaIntermediateNode { + let supertags: string[] | undefined; + const fieldNodes: TanaIntermediateNode[] = []; + + frontmatter.forEach((data) => { + if (data.key === 'tags') { + supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator); + } else { + fieldNodes.push(frontMatterToFieldNode(data, today, context)); + } + }); + + let nodeUid = uidRequest(displayName, UidRequestType.FILE, context); + let nodeType: NodeType = 'node'; + const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat); + + if (dateDisplayName.length > 0) { + nodeUid = dateDisplayName; + nodeType = 'date'; + displayName = dateDisplayName; + context.summary.calendarNodes++; + } + + return { + uid: nodeUid, + name: displayName, + createdAt: today, + editedAt: today, + type: nodeType, + supertags, + children: fieldNodes.length > 0 ? fieldNodes : undefined, + }; +} + +function dateStringToDateUID(displayName: string, dateFormat: string): string { + const date = moment(displayName, dateFormat, true); + if (date.isValid()) { + return date.format('MM-DD-YYYY'); + } + return ''; +} diff --git a/src/converters/obsidian/tanaconversion/summary.ts b/src/converters/obsidian/tanaconversion/summary.ts new file mode 100644 index 0000000..e755a30 --- /dev/null +++ b/src/converters/obsidian/tanaconversion/summary.ts @@ -0,0 +1,11 @@ +import { TanaIntermediateSummary } from '../../../types/types'; + +export function incrementSummary(summary: TanaIntermediateSummary) { + summary.totalNodes++; + summary.leafNodes++; +} + +export function shiftFromLeafToTop(summary: TanaIntermediateSummary) { + summary.leafNodes--; + summary.topLevelNodes++; +} diff --git a/src/converters/obsidian/tanaconversion/supertags.ts b/src/converters/obsidian/tanaconversion/supertags.ts new file mode 100644 index 0000000..f5d4e28 --- /dev/null +++ b/src/converters/obsidian/tanaconversion/supertags.ts @@ -0,0 +1,35 @@ +import { TanaIntermediateSupertag } from '../../../types/types'; +import { cleanUpTag } from '../markdown/tags'; +import { IdGenerator } from './uids'; + +export type SuperTagTracker = Map; + +/** + * Returns distinct matching super tag UIDs. + */ +export function superTagUidRequests( + tags: string[], + tracker: SuperTagTracker, + idGenerator: IdGenerator, + clean?: boolean, +) { + return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean)))); +} + +export function superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) { + let cleanTag = tag; + if (clean) { + cleanTag = cleanUpTag(tag); + } + + let uid = tracker.get(cleanTag); + if (uid === undefined) { + uid = idGenerator(); + tracker.set(cleanTag, uid); + } + return uid; +} + +export function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] { + return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] })); +} diff --git a/src/converters/obsidian/tanaconversion/uids.ts b/src/converters/obsidian/tanaconversion/uids.ts new file mode 100644 index 0000000..a3c1657 --- /dev/null +++ b/src/converters/obsidian/tanaconversion/uids.ts @@ -0,0 +1,104 @@ +import { VaultContext } from '../context'; +import { extractBlockId } from '../markdown/blockIds'; +import { cleanUpLink, detectLinkType, LinkType } from '../markdown/internalLinks'; +import { blockLinkUidRequest, BlockUidRequestType } from './blocks'; +import { headingLinkUidRequest } from './headingLinks'; +import { incrementSummary } from './summary'; + +export enum UidRequestType { + FILE, + CONTENT, +} + +interface UidData { + type: UidRequestType; + uid: string; + obsidianLink: string; +} + +export interface HeadingUidData { + uid: string; + link: string[]; //without the fileName +} + +export type IdGenerator = () => string; + +//all normal ([[fileName]]), file or folder UIDs: +export type UidTracker = Map; + +/** + * We can not just take the obsidian link because we might already have created a node for that link + * or a folder might have the same link as a file. + * + * This function should return the correct Uid. + * + * A side-effect is the collection of the summary. + */ +export function uidRequest(obsidianLink: string, requestType: UidRequestType, context: VaultContext) { + if (requestType === UidRequestType.FILE) { + //we don't use the same split-link because files could contain # + return standardLinkUidRequest(obsidianLink.trim(), requestType, context); + } + + const cleanLink = cleanUpLink(obsidianLink); + const linkType = detectLinkType(cleanLink); + switch (linkType) { + case LinkType.DEFAULT: + return standardLinkUidRequest(cleanLink[0], requestType, context); + case LinkType.BLOCK: + return blockLinkUidRequest(cleanLink, BlockUidRequestType.LINK, context); + case LinkType.HEADING: + return headingLinkUidRequest(cleanLink, context); + default: + throw 'Invalid link type detected: ' + cleanLink; + } +} + +export function untrackedUidRequest(context: VaultContext) { + incrementSummary(context.summary); + //folders / "summary unlinked nodes" / content-nodes get new UIDs always + //because these UIDs either are not in the source or need to be connected later + return context.idGenerator(); +} + +/** + * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content. + * @returns [uid, cleanedContent] + */ +export function contentUidRequest(fileName: string, content: string, context: VaultContext) { + const [cleanedContent, id] = extractBlockId(content); + if (id) { + return [blockLinkUidRequest([fileName, id], BlockUidRequestType.BLOCK, context), cleanedContent]; + } else { + return [untrackedUidRequest(context), content]; + } +} + +function standardLinkUidRequest(obsidianLink: string, requestType: UidRequestType, context: VaultContext) { + const uidData = context.defaultLinkTracker.get(obsidianLink); + if (!uidData) { + incrementSummary(context.summary); + const uid = context.idGenerator(); + context.defaultLinkTracker.set(obsidianLink, { uid, obsidianLink, type: requestType }); + return uid; + } + + if (uidData.type === UidRequestType.CONTENT) { + uidData.type = requestType; + } + + return uidData.uid; +} + +export function filterInvalidContentLinks(tracker: UidTracker) { + const unlinkedNodes: { uid: string; link: string }[] = []; + for (const node of tracker.values()) { + //at the end every uidData that has been only accessed from content (so inside the markdown file) + //has no matching file node and is therefore unlinked + //otherwise during the creation of the file node, it would have accessed the same Uid + if (node.type === UidRequestType.CONTENT) { + unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink }); + } + } + return unlinkedNodes; +} diff --git a/src/converters/obsidian/vault.ts b/src/converters/obsidian/tanaconversion/vault.ts similarity index 85% rename from src/converters/obsidian/vault.ts rename to src/converters/obsidian/tanaconversion/vault.ts index b0cfafe..0c0fb8e 100644 --- a/src/converters/obsidian/vault.ts +++ b/src/converters/obsidian/tanaconversion/vault.ts @@ -1,8 +1,8 @@ import { appendFileSync, Dirent, readdirSync, readFileSync } from 'fs'; import path, { resolve } from 'path'; -import { convertObsidianFile } from './convertObsidianFile'; -import { HeadingTracker } from './filterHeadingLinks'; -import { VaultContext } from './VaultContext'; +import { convertObsidianFile } from './obsidianFileConversion'; +import { VaultContext } from '../context'; +import { untrackedUidRequest } from './uids'; enum ChildrenPosition { NOT_LAST = 'NOT_LAST', @@ -46,10 +46,10 @@ export function handleVault( handleDirEnd(childrenPosition); } -export function addParentNodeStart(targetPath: string, today: number, vaultContext: VaultContext) { +export function addParentNodeStart(targetPath: string, today: number, context: VaultContext) { return (dir: string) => { const name = path.basename(dir); - const uid = vaultContext.randomUid(); + const uid = untrackedUidRequest(context); appendFileSync( targetPath, `{ @@ -77,19 +77,13 @@ export function addParentNodeEnd(targetPath: string) { }; } -export function addFileNode( - targetPath: string, - today: number, - vaultContext: VaultContext, - headingTracker: HeadingTracker, -) { +export function addFileNode(targetPath: string, today: number, context: VaultContext) { return (file: string, childrenPosition: ChildrenPosition) => { const fileNode = convertObsidianFile( path.basename(file).replace('.md', ''), readFileSync(file, 'utf-8'), - vaultContext, + context, today, - headingTracker, ); appendFileSync(targetPath, JSON.stringify(fileNode, null, 2)); if (childrenPosition !== ChildrenPosition.LAST) { diff --git a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts index f5305ba..8f66f1a 100644 --- a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts +++ b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts @@ -1,16 +1,16 @@ import { expect, test } from '@jest/globals'; import { readFileSync, unlinkSync } from 'fs'; import { ObsidianVaultConverter } from '../ObsidianVaultConverter'; -import { VaultContext } from '../VaultContext'; +import { createVaultContext } from '../context'; import { deterministicGenerator } from './testUtils'; test('obsidian vault converter', async () => { - const vaultContext = new VaultContext('./src/converters/obsidian/tests/fixtures/vault', deterministicGenerator()); - await ObsidianVaultConverter(vaultContext, 1); + const context = createVaultContext('./src/converters/obsidian/tests/fixtures/vault', deterministicGenerator()); + await ObsidianVaultConverter(context, 1); const result = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/vault.tif.json', 'utf-8')); // console.log(JSON.stringify(result)); unlinkSync('./src/converters/obsidian/tests/fixtures/vault.tif.json'); const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/full.tif.json', 'utf-8')); - expect(vaultContext.dailyNoteFormat).toBe('DD-MM-YYYY'); + expect(context.dailyNoteFormat).toBe('DD-MM-YYYY'); expect(result).toStrictEqual(expected); }); diff --git a/src/converters/obsidian/tests/VaultContext.test.ts b/src/converters/obsidian/tests/VaultContext.test.ts index ff74651..9cb4d8b 100644 --- a/src/converters/obsidian/tests/VaultContext.test.ts +++ b/src/converters/obsidian/tests/VaultContext.test.ts @@ -1,13 +1,15 @@ import { expect, test } from '@jest/globals'; -import { UidRequestType, VaultContext } from '../VaultContext'; +import { getAllInvalidLinks } from '../tanaconversion/invalidLinks'; +import { contentUidRequest, untrackedUidRequest, uidRequest, UidRequestType } from '../tanaconversion/uids'; +import { createVaultContext } from '../context'; import { deterministicGenerator } from './testUtils'; test('VaultContext uid test', () => { - const vaultContext = new VaultContext('', deterministicGenerator()); - expect(vaultContext.uidRequest('link', UidRequestType.CONTENT)).toBe('0'); + const context = createVaultContext('', deterministicGenerator()); + expect(uidRequest('link', UidRequestType.CONTENT, context)).toBe('0'); //no change on second call - expect(vaultContext.uidRequest('link', UidRequestType.CONTENT)).toBe('0'); - expect(vaultContext.summary).toEqual({ + expect(uidRequest('link', UidRequestType.CONTENT, context)).toBe('0'); + expect(context.summary).toEqual({ leafNodes: 1, topLevelNodes: 0, totalNodes: 1, @@ -15,9 +17,9 @@ test('VaultContext uid test', () => { fields: 0, brokenRefs: 0, }); - //folders get different uids - expect(vaultContext.randomUid()).toBe('1'); - expect(vaultContext.summary).toEqual({ + //folders get different UIDs + expect(untrackedUidRequest(context)).toBe('1'); + expect(context.summary).toEqual({ leafNodes: 2, topLevelNodes: 0, totalNodes: 2, @@ -25,39 +27,39 @@ test('VaultContext uid test', () => { fields: 0, brokenRefs: 0, }); - //folders always have fresh uids, so folders with the same name work - expect(vaultContext.randomUid()).toBe('2'); - //having folder uids does not change other uids - expect(vaultContext.uidRequest('link', UidRequestType.CONTENT)).toBe('0'); + //folders always have fresh UIDs, so folders with the same name work + expect(untrackedUidRequest(context)).toBe('2'); + //having folder UIDs does not change other UIDs + expect(uidRequest('link', UidRequestType.CONTENT, context)).toBe('0'); }); test('VaultContext uid block link test', () => { //first reading the file, then encountering the block ref - const vaultContext = new VaultContext('', deterministicGenerator()); - const [uid, content] = vaultContext.contentUid('fileName', 'content ^uid'); + const context = createVaultContext('', deterministicGenerator()); + const [uid, content] = contentUidRequest('fileName', 'content ^uid', context); expect(uid).toBe('0'); expect(content).toBe('content'); - const uid2 = vaultContext.uidRequest('fileName#^uid', UidRequestType.CONTENT); + const uid2 = uidRequest('fileName#^uid', UidRequestType.CONTENT, context); expect(uid2).toBe('0'); //first encountering the block ref, then reading the file - const uid3 = vaultContext.uidRequest('fileName#^uid3', UidRequestType.CONTENT); + const uid3 = uidRequest('fileName#^uid3', UidRequestType.CONTENT, context); expect(uid3).toBe('1'); - const [uid4, content2] = vaultContext.contentUid('fileName', 'content ^uid3'); + const [uid4, content2] = contentUidRequest('fileName', 'content ^uid3', context); expect(uid4).toBe('1'); expect(content2).toBe('content'); //different file - const uid5 = vaultContext.uidRequest('fileName2#^uid3', UidRequestType.CONTENT); + const uid5 = uidRequest('fileName2#^uid3', UidRequestType.CONTENT, context); expect(uid5).toBe('2'); - const [uid6, content3] = vaultContext.contentUid('fileName2', 'content ^uid3'); + const [uid6, content3] = contentUidRequest('fileName2', 'content ^uid3', context); expect(uid6).toBe('2'); expect(content3).toBe('content'); }); test('VaultContext invalid nodes test', () => { - const vaultContext = new VaultContext('', deterministicGenerator()); + const context = createVaultContext('', deterministicGenerator()); //the block link has not been accessed from its source / has not been found - just used - vaultContext.uidRequest('fileName#^uid', UidRequestType.CONTENT); - expect(vaultContext.getAllInvalidContentLinks()).toStrictEqual([{ uid: '0', link: 'fileName#^uid' }]); + uidRequest('fileName#^uid', UidRequestType.CONTENT, context); + expect(getAllInvalidLinks(context)).toStrictEqual([{ uid: '0', link: 'fileName#^uid' }]); }); diff --git a/src/converters/obsidian/tests/extractImageLinks.test.ts b/src/converters/obsidian/tests/extractImageLinks.test.ts index 1cb16d1..e1ec6a1 100644 --- a/src/converters/obsidian/tests/extractImageLinks.test.ts +++ b/src/converters/obsidian/tests/extractImageLinks.test.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { extractImageLinks } from '../extractImageLinks'; +import { extractImageLinks } from '../markdown/imageLinks'; //TODO: write some test utils to check permutations easier diff --git a/src/converters/obsidian/tests/extractMarkdownNodes.test.ts b/src/converters/obsidian/tests/extractMarkdownNodes.test.ts index 040c692..29bcfcb 100644 --- a/src/converters/obsidian/tests/extractMarkdownNodes.test.ts +++ b/src/converters/obsidian/tests/extractMarkdownNodes.test.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; import { countEmptySpace } from '../markdown/emptySpace'; -import { extractMarkdownNodes, HierarchyType } from '../markdown/extractMarkdownNodes'; +import { extractMarkdownNodes, HierarchyType } from '../markdown/markdownNodes'; import { nextNewLine } from '../markdown/newline'; test('headings', () => { @@ -193,7 +193,7 @@ https://some.url/ type: HierarchyType.BULLET, }, { - content: '2. Take modern bar. ', + content: '2. Take modern bar.', level: 0, type: HierarchyType.BULLET, }, @@ -203,7 +203,7 @@ https://some.url/ type: HierarchyType.BULLET, }, { - content: '4. etc. ', + content: '4. etc.', level: 0, type: HierarchyType.BULLET, }, diff --git a/src/converters/obsidian/tests/filterHeadingLinks.test.ts b/src/converters/obsidian/tests/filterHeadingLinks.test.ts index ea711fb..7184174 100644 --- a/src/converters/obsidian/tests/filterHeadingLinks.test.ts +++ b/src/converters/obsidian/tests/filterHeadingLinks.test.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { filterHeadingLinks, HeadingLinks, HeadingTracker } from '../filterHeadingLinks'; +import { HeadingDummyUidTracker, HeadingTracker, matchHeadingLinks } from '../tanaconversion/headingLinks'; test('filterHeadingLinks test', () => { const headingTracker: HeadingTracker = new Map(); @@ -16,7 +16,7 @@ test('filterHeadingLinks test', () => { { uid: '1', level: 1, content: '1' }, ]); headingTracker.set('fileName3', []); //empty is handled fine - const headingLinks: HeadingLinks = new Map(); + const headingLinks: HeadingDummyUidTracker = new Map(); headingLinks.set('fileName', [ { uid: 'OLD_2', link: ['1', '2'] }, { uid: 'OLD_3', link: ['1', '2', '3'] }, @@ -27,7 +27,7 @@ test('filterHeadingLinks test', () => { { uid: 'INVALID_LEVELS', link: ['1', '2', '1_2'] }, ]); - const [valid, invalid] = filterHeadingLinks(headingLinks, headingTracker); + const [valid, invalid] = matchHeadingLinks(headingLinks, headingTracker); expect(valid).toStrictEqual([ { old: 'OLD_2', new: '2' }, { old: 'OLD_3', new: '3' }, //same target heading leads to same UID diff --git a/src/converters/obsidian/tests/parseFrontmatter.test.ts b/src/converters/obsidian/tests/parseFrontmatter.test.ts index c3486ee..e416442 100644 --- a/src/converters/obsidian/tests/parseFrontmatter.test.ts +++ b/src/converters/obsidian/tests/parseFrontmatter.test.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { parseFrontmatter } from '../parseFrontmatter'; +import { parseFrontmatter } from '../markdown/frontmatter'; test('parseFrontmatter test', () => { expect(parseFrontmatter('')).toStrictEqual([]); diff --git a/src/converters/obsidian/tests/testUtils.ts b/src/converters/obsidian/tests/testUtils.ts index bb3f2b8..eb9605f 100644 --- a/src/converters/obsidian/tests/testUtils.ts +++ b/src/converters/obsidian/tests/testUtils.ts @@ -2,8 +2,8 @@ export function deterministicGenerator() { let uid = 0; return () => { - const uidStr = uid.toString(); + const UIDstr = uid.toString(); uid++; - return uidStr; + return UIDstr; }; } diff --git a/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts b/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts index 7d4f169..c4672d4 100644 --- a/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts +++ b/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; -import { HeadingNode } from '../filterHeadingLinks'; -import { traverseTreeDepthFirst } from '../traverseTreeDepthFirst'; +import { HeadingNode } from '../postprocessing/matchHeadingLinks'; +import { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst'; test('traverseTreeBreadthFirst test', () => { //sinlge heading works diff --git a/src/converters/obsidian/createTree.ts b/src/converters/obsidian/utils/createTree.ts similarity index 100% rename from src/converters/obsidian/createTree.ts rename to src/converters/obsidian/utils/createTree.ts diff --git a/src/converters/obsidian/obsidianConfig.ts b/src/converters/obsidian/utils/obsidianConfig.ts similarity index 92% rename from src/converters/obsidian/obsidianConfig.ts rename to src/converters/obsidian/utils/obsidianConfig.ts index 2b88731..bd02cac 100644 --- a/src/converters/obsidian/obsidianConfig.ts +++ b/src/converters/obsidian/utils/obsidianConfig.ts @@ -8,6 +8,7 @@ function readObsidianConfig(vaultPath: string, configName: string): Record Date: Thu, 13 Oct 2022 18:25:05 +0200 Subject: [PATCH 51/94] Obsidian: codeblock conversion --- .../obsidian/ObsidianVaultConverter.ts | 2 +- src/converters/obsidian/context.ts | 2 +- .../{markdown => hierarchy}/bullets.ts | 4 +- .../obsidian/hierarchy/codeblocks.ts | 67 +++++++++++++++ .../{markdown => hierarchy}/headings.ts | 7 +- .../{markdown => hierarchy}/markdownNodes.ts | 65 ++++++++++---- .../{markdown => hierarchy}/paragraphs.ts | 39 +++++---- src/converters/obsidian/markdown/blockIds.ts | 2 +- src/converters/obsidian/markdown/todo.ts | 6 +- .../{blocks.ts => blockLinks.ts} | 0 ...ianFileConversion.ts => fileConversion.ts} | 4 +- .../obsidian/tanaconversion/invalidLinks.ts | 2 +- ...ownNodeConversion.ts => nodeConversion.ts} | 21 ++++- .../obsidian/tanaconversion/uids.ts | 6 +- .../{vault.ts => vaultConversion.ts} | 2 +- .../obsidian/tests/codeblocks.test.ts | 84 +++++++++++++++++++ .../{VaultContext.test.ts => context.test.ts} | 0 .../obsidian/tests/fixtures/full.tif.json | 62 ++++++++------ .../obsidian/tests/fixtures/vault/test.md | 12 ++- ...rontmatter.test.ts => frontmatter.test.ts} | 0 ...dingLinks.test.ts => headingLinks.test.ts} | 2 +- ...tImageLinks.test.ts => imageLinks.test.ts} | 2 +- ...ownNodes.test.ts => markdownNodes.test.ts} | 14 ++-- .../tests/traverseTreeDepthFirst.test.ts | 2 +- 24 files changed, 318 insertions(+), 89 deletions(-) rename src/converters/obsidian/{markdown => hierarchy}/bullets.ts (96%) create mode 100644 src/converters/obsidian/hierarchy/codeblocks.ts rename src/converters/obsidian/{markdown => hierarchy}/headings.ts (85%) rename src/converters/obsidian/{markdown => hierarchy}/markdownNodes.ts (63%) rename src/converters/obsidian/{markdown => hierarchy}/paragraphs.ts (62%) rename src/converters/obsidian/tanaconversion/{blocks.ts => blockLinks.ts} (100%) rename src/converters/obsidian/tanaconversion/{obsidianFileConversion.ts => fileConversion.ts} (96%) rename src/converters/obsidian/tanaconversion/{markdownNodeConversion.ts => nodeConversion.ts} (78%) rename src/converters/obsidian/tanaconversion/{vault.ts => vaultConversion.ts} (97%) create mode 100644 src/converters/obsidian/tests/codeblocks.test.ts rename src/converters/obsidian/tests/{VaultContext.test.ts => context.test.ts} (100%) rename src/converters/obsidian/tests/{parseFrontmatter.test.ts => frontmatter.test.ts} (100%) rename src/converters/obsidian/tests/{filterHeadingLinks.test.ts => headingLinks.test.ts} (97%) rename src/converters/obsidian/tests/{extractImageLinks.test.ts => imageLinks.test.ts} (99%) rename src/converters/obsidian/tests/{extractMarkdownNodes.test.ts => markdownNodes.test.ts} (91%) diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index d369416..a9b42e8 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -2,7 +2,7 @@ import { appendFileSync, unlinkSync } from 'fs'; import path from 'path'; import fs from 'fs'; import { createUnlinkedTanaNodes } from './tanaconversion/invalidLinks'; -import { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vault'; +import { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion'; import { VaultContext } from './context'; import { createSuperTagObjects } from './tanaconversion/supertags'; import { shiftFromLeafToTop } from './tanaconversion/summary'; diff --git a/src/converters/obsidian/context.ts b/src/converters/obsidian/context.ts index 0b96ba3..7a03f88 100644 --- a/src/converters/obsidian/context.ts +++ b/src/converters/obsidian/context.ts @@ -1,6 +1,6 @@ import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types'; import { idgenerator as randomGenerator } from '../../utils/utils'; -import { BlockLinkTracker } from './tanaconversion/blocks'; +import { BlockLinkTracker } from './tanaconversion/blockLinks'; import { HeadingDummyUidTracker, HeadingTracker } from './tanaconversion/headingLinks'; import { SuperTagTracker } from './tanaconversion/supertags'; import { IdGenerator, UidTracker } from './tanaconversion/uids'; diff --git a/src/converters/obsidian/markdown/bullets.ts b/src/converters/obsidian/hierarchy/bullets.ts similarity index 96% rename from src/converters/obsidian/markdown/bullets.ts rename to src/converters/obsidian/hierarchy/bullets.ts index 0e3f0cd..556d43b 100644 --- a/src/converters/obsidian/markdown/bullets.ts +++ b/src/converters/obsidian/hierarchy/bullets.ts @@ -1,7 +1,7 @@ -import { countEmptySpace, findFirstEmptySpacePosBackwards } from './emptySpace'; +import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace'; import { HierarchyType } from './markdownNodes'; import { Hierarchy } from './markdownNodes'; -import { isNewLine, nextNewLine } from './newline'; +import { isNewLine, nextNewLine } from '../markdown/newline'; function isNumberedBullet(content: string, pos: number) { const char = content[pos]; diff --git a/src/converters/obsidian/hierarchy/codeblocks.ts b/src/converters/obsidian/hierarchy/codeblocks.ts new file mode 100644 index 0000000..a5efd79 --- /dev/null +++ b/src/converters/obsidian/hierarchy/codeblocks.ts @@ -0,0 +1,67 @@ +import { countEmptySpace } from '../markdown/emptySpace'; +import { lastPositionIsNewline, nextNewLine } from '../markdown/newline'; +import { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes'; + +export function findCodeBlockSliceStartPosition(curPosition: number) { + return curPosition; +} + +export function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) { + return curPosition + hierarchy.level; +} + +/** + * Codeblocks are a special case because they are fenced. So we need a special post processing approach. + */ +export function postProcessCodeBlock(obsidianNode: MarkdownNode) { + //cutting off ``` + codeLanguage + //might have empty space after codeLanguage + const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length; + const emptySpace = countEmptySpace(obsidianNode.content, startingPos); + //cutting newline at the start, cutting ``` + possibly newline at the end + return obsidianNode.content + .trimEnd() + .slice(startingPos + emptySpace + 1, -3) + .trimEnd(); +} + +export function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null { + if (!lastPositionIsNewline(content, curPosition)) { + return null; + } + if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) { + const newLinePos = nextNewLine(content, curPosition + 3); + const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd(); + //check that only one word after the `s + if (codeLanguage.includes(' ')) { + return null; + } + + let pos = newLinePos + 1; + let char1 = content[pos]; + let char2 = content[pos + 1]; + let char3 = content[pos + 2]; + while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') { + pos++; + char1 = content[pos]; + char2 = content[pos + 1]; + char3 = content[pos + 2]; + } + if ([char1, char2, char3].some((val) => val === undefined)) { + return null; + } + const secondNewLinePos = nextNewLine(content, pos + 3); + const secondLine = content.slice(pos + 3, secondNewLinePos).trim(); + //no text after the closing code block fence allowed + if (secondLine !== '') { + return null; + } + return { + type: HierarchyType.CODEBLOCK, + //might end at the end of file or at a newline + level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\n' ? 1 : 0), + codeLanguage: codeLanguage !== '' ? codeLanguage : undefined, + }; + } + return null; +} diff --git a/src/converters/obsidian/markdown/headings.ts b/src/converters/obsidian/hierarchy/headings.ts similarity index 85% rename from src/converters/obsidian/markdown/headings.ts rename to src/converters/obsidian/hierarchy/headings.ts index 3ed07e3..c35e33e 100644 --- a/src/converters/obsidian/markdown/headings.ts +++ b/src/converters/obsidian/hierarchy/headings.ts @@ -1,7 +1,6 @@ -import { countEmptySpace } from './emptySpace'; -import { HierarchyType } from './markdownNodes'; -import { Hierarchy } from './markdownNodes'; -import { lastPositionIsNewline, nextNewLine } from './newline'; +import { countEmptySpace } from '../markdown/emptySpace'; +import { lastPositionIsNewline, nextNewLine } from '../markdown/newline'; +import { Hierarchy, HierarchyType } from './markdownNodes'; export function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy { if (!lastPositionIsNewline(content, pos)) { diff --git a/src/converters/obsidian/markdown/markdownNodes.ts b/src/converters/obsidian/hierarchy/markdownNodes.ts similarity index 63% rename from src/converters/obsidian/markdown/markdownNodes.ts rename to src/converters/obsidian/hierarchy/markdownNodes.ts index 6d8fe72..c075965 100644 --- a/src/converters/obsidian/markdown/markdownNodes.ts +++ b/src/converters/obsidian/hierarchy/markdownNodes.ts @@ -1,4 +1,5 @@ import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets'; +import { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks'; import { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings'; import { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs'; @@ -8,6 +9,7 @@ export enum HierarchyType { HEADING = 'Heading', BULLET = 'Bullet Node', PARAGRAPH = 'Paragraph', + CODEBLOCK = 'Code Block', } export interface MarkdownNode { @@ -16,7 +18,9 @@ export interface MarkdownNode { //lower = higher in the hierarchy //for bullet nodes also used as a measure of empty space //for heading nodes this is the number of #'s + //for code blocks this is the length of the block in chars level: number; + codeLanguage?: string; } export type Hierarchy = Omit; @@ -30,8 +34,20 @@ export function extractMarkdownNodes(content: string, startPosition = 0): Markdo continue; } - const [node, slicePosition] = extractMarkdownNode(content, index); - nodeDescs.push(node); + let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index); + if (node.content.trim() !== '') { + nodeDescs.push(node); + } + //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake + while (nextHierarchy) { + while (content[slicePosition] === '\n') { + slicePosition++; + } + [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition); + if (node.content.trim() !== '') { + nodeDescs.push(node); + } + } //-1 because we dont want to assume that the char at the slice position is irrelevant index = slicePosition - 1; @@ -40,12 +56,15 @@ export function extractMarkdownNodes(content: string, startPosition = 0): Markdo return nodeDescs; } /** - * @returns [MarkdownNode, slicePosition] + * @returns [MarkdownNode, slicePosition, possibly nextHierarchy] */ -function extractMarkdownNode(content: string, curPosition: number): [MarkdownNode, number] { +function extractMarkdownNode( + content: string, + curPosition: number, +): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] { const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition); const startPos = findSliceStartPosition(content, curPosition, hierarchy); - const slicePos = findSliceEndPosition(content, curPosition, hierarchy); + const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy); return [ { @@ -54,6 +73,7 @@ function extractMarkdownNode(content: string, curPosition: number): [MarkdownNod content: content.slice(startPos, slicePos).trimEnd(), }, slicePos, + nextHierarchy, ]; } @@ -61,13 +81,17 @@ function extractMarkdownNode(content: string, curPosition: number): [MarkdownNod * If we know that a hierarchy ends, here we can detect the next one. */ export function detectNextHierarchy(content: string, curPosition: number): Hierarchy { - let hierachy = detectHeadingHierarchy(content, curPosition); - if (hierachy) { - return hierachy; + let hierarchy = detectHeadingHierarchy(content, curPosition); + if (hierarchy) { + return hierarchy; } else { - hierachy = detectBulletHierarchy(content, curPosition); - if (hierachy) { - return hierachy; + hierarchy = detectBulletHierarchy(content, curPosition); + if (hierarchy) { + return hierarchy; + } + hierarchy = detectCodeBlockHierarchy(content, curPosition); + if (hierarchy) { + return hierarchy; } } return { type: HierarchyType.PARAGRAPH, level: 0 }; @@ -85,6 +109,8 @@ function findSliceStartPosition(content: string, curPosition: number, hierarchy: return findBulletSliceStartPosition(content, curPosition, hierarchy); case HierarchyType.PARAGRAPH: return findParagraphSliceStartPosition(curPosition); + case HierarchyType.CODEBLOCK: + return findCodeBlockSliceStartPosition(curPosition); default: throw 'Unsupported HierarchyType detected: ' + hierarchy; } @@ -93,14 +119,20 @@ function findSliceStartPosition(content: string, curPosition: number, hierarchy: /** * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position. */ -function findSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy): number { +function findSliceEndPosition( + content: string, + curPosition: number, + hierarchy: Hierarchy, +): [number] | [number, Hierarchy] { switch (hierarchy.type) { case HierarchyType.HEADING: - return findHeadingSliceEndPosition(content, curPosition, hierarchy); + return [findHeadingSliceEndPosition(content, curPosition, hierarchy)]; case HierarchyType.BULLET: - return findBulletSliceEndPosition(content, curPosition, hierarchy); + return [findBulletSliceEndPosition(content, curPosition, hierarchy)]; case HierarchyType.PARAGRAPH: return findParagraphSliceEndPosition(content, curPosition); + case HierarchyType.CODEBLOCK: + return [findCodeBlockSliceEndPosition(curPosition, hierarchy)]; default: throw 'Unsupported HierarchyType detected: ' + hierarchy; } @@ -121,6 +153,11 @@ export function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChil return false; } + //CODEBLOCK can only be child of HEADING and can not be a parent + if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) { + return false; + } + if (potentialParent.type === potentialChild.type) { return potentialParent.level < potentialChild.level; } diff --git a/src/converters/obsidian/markdown/paragraphs.ts b/src/converters/obsidian/hierarchy/paragraphs.ts similarity index 62% rename from src/converters/obsidian/markdown/paragraphs.ts rename to src/converters/obsidian/hierarchy/paragraphs.ts index a473e51..1b22bab 100644 --- a/src/converters/obsidian/markdown/paragraphs.ts +++ b/src/converters/obsidian/hierarchy/paragraphs.ts @@ -2,14 +2,15 @@ import { detectBulletHierarchy } from './bullets'; import { HierarchyType } from './markdownNodes'; import { detectHeadingHierarchy } from './headings'; import { Hierarchy } from './markdownNodes'; -import { lastPositionIsNewline, nextNewLine } from './newline'; +import { lastPositionIsNewline, nextNewLine } from '../markdown/newline'; +import { detectCodeBlockHierarchy } from './codeblocks'; export function findParagraphSliceStartPosition(curPosition: number) { //we don't trim the start return curPosition; } -export function findParagraphSliceEndPosition(content: string, curPosition: number): number { +export function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] { let endPosition = nextNewLine(content, curPosition); let char = content[endPosition]; let lastChar = char; @@ -19,16 +20,16 @@ export function findParagraphSliceEndPosition(content: string, curPosition: numb // eslint-disable-next-line no-constant-condition while (true) { if (char === undefined) { - return endPosition; + return [endPosition]; } else if (char === '\n' && lastChar === '\n') { - return endPosition - 1; + return [endPosition - 1]; } else { - //we could use this hierarchy because we already detected it, however this would overcomplicate the whole process - const hierachy = newTypeOfHierarchyStarts(content, endPosition); - if (hierachy) { - return endPosition - 1; + const hierarchy = newTypeOfHierarchyStarts(content, endPosition); + if (hierarchy) { + return [endPosition - 1, hierarchy]; } } + //TODO: jump to newline? lastChar = char; endPosition++; char = content[endPosition]; @@ -45,17 +46,21 @@ function detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | nu } function newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null { - let hierachy: Hierarchy | null = detectHeadingHierarchy(content, pos); - if (hierachy) { - return hierachy; + let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos); + if (hierarchy) { + return hierarchy; } - hierachy = detectBulletHierarchy(content, pos); - if (hierachy) { - return hierachy; + hierarchy = detectBulletHierarchy(content, pos); + if (hierarchy) { + return hierarchy; } - hierachy = detectBlockQuoteHierarchy(content, pos); - if (hierachy) { - return hierachy; + hierarchy = detectBlockQuoteHierarchy(content, pos); + if (hierarchy) { + return hierarchy; + } + hierarchy = detectCodeBlockHierarchy(content, pos); + if (hierarchy) { + return hierarchy; } return null; diff --git a/src/converters/obsidian/markdown/blockIds.ts b/src/converters/obsidian/markdown/blockIds.ts index 197cae2..3c84ad5 100644 --- a/src/converters/obsidian/markdown/blockIds.ts +++ b/src/converters/obsidian/markdown/blockIds.ts @@ -1,4 +1,4 @@ -export function extractBlockId(content: string): [string, string | undefined] { +export function removeBlockId(content: string): [string, string | undefined] { let id; const cleanedContent = content diff --git a/src/converters/obsidian/markdown/todo.ts b/src/converters/obsidian/markdown/todo.ts index 45ca0f0..76451eb 100644 --- a/src/converters/obsidian/markdown/todo.ts +++ b/src/converters/obsidian/markdown/todo.ts @@ -1,4 +1,4 @@ -import { Hierarchy, HierarchyType } from './markdownNodes'; +import { Hierarchy, HierarchyType } from '../hierarchy/markdownNodes'; function detectTodoType(content: string) { if (content.startsWith('[ ] ')) { @@ -11,8 +11,8 @@ function detectTodoType(content: string) { return undefined; } -export function removeTodo(content: string, hierachy: Hierarchy): [string, 'todo' | 'done'] | null { - if (hierachy.type === HierarchyType.BULLET) { +export function removeTodo(content: string, hierarchy: Hierarchy): [string, 'todo' | 'done'] | null { + if (hierarchy.type === HierarchyType.BULLET) { const type = detectTodoType(content); if (type) { return [content.slice('[ ] '.length), type]; diff --git a/src/converters/obsidian/tanaconversion/blocks.ts b/src/converters/obsidian/tanaconversion/blockLinks.ts similarity index 100% rename from src/converters/obsidian/tanaconversion/blocks.ts rename to src/converters/obsidian/tanaconversion/blockLinks.ts diff --git a/src/converters/obsidian/tanaconversion/obsidianFileConversion.ts b/src/converters/obsidian/tanaconversion/fileConversion.ts similarity index 96% rename from src/converters/obsidian/tanaconversion/obsidianFileConversion.ts rename to src/converters/obsidian/tanaconversion/fileConversion.ts index 2971575..e24e090 100644 --- a/src/converters/obsidian/tanaconversion/obsidianFileConversion.ts +++ b/src/converters/obsidian/tanaconversion/fileConversion.ts @@ -1,6 +1,6 @@ -import { convertMarkdownNode } from './markdownNodeConversion'; +import { convertMarkdownNode } from './nodeConversion'; import { createTree } from '../utils/createTree'; -import { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../markdown/markdownNodes'; +import { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes'; import { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter'; import { VaultContext } from '../context'; import moment from 'moment'; diff --git a/src/converters/obsidian/tanaconversion/invalidLinks.ts b/src/converters/obsidian/tanaconversion/invalidLinks.ts index cd6c047..8640044 100644 --- a/src/converters/obsidian/tanaconversion/invalidLinks.ts +++ b/src/converters/obsidian/tanaconversion/invalidLinks.ts @@ -1,5 +1,5 @@ import { NodeType, TanaIntermediateNode } from '../../../types/types'; -import { filterInvalidBlockLinks } from './blocks'; +import { filterInvalidBlockLinks } from './blockLinks'; import { filterInvalidContentLinks, untrackedUidRequest } from './uids'; import { VaultContext } from '../context'; diff --git a/src/converters/obsidian/tanaconversion/markdownNodeConversion.ts b/src/converters/obsidian/tanaconversion/nodeConversion.ts similarity index 78% rename from src/converters/obsidian/tanaconversion/markdownNodeConversion.ts rename to src/converters/obsidian/tanaconversion/nodeConversion.ts index 6716e95..704df7a 100644 --- a/src/converters/obsidian/tanaconversion/markdownNodeConversion.ts +++ b/src/converters/obsidian/tanaconversion/nodeConversion.ts @@ -1,12 +1,25 @@ import { NodeType, TanaIntermediateNode } from '../../../types/types'; import { getBracketLinks } from '../../../utils/utils'; -import { MarkdownNode } from '../markdown/markdownNodes'; +import { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes'; import { VaultContext } from '../context'; import { superTagUidRequests } from './supertags'; -import { contentUidRequest, uidRequest, UidRequestType } from './uids'; +import { contentUidRequest, uidRequest, UidRequestType, untrackedUidRequest } from './uids'; import { removeTodo } from '../markdown/todo'; import { detectTags } from '../markdown/tags'; import { handleImages } from './imageNodes'; +import { postProcessCodeBlock } from '../hierarchy/codeblocks'; + +function convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) { + const tanaNode: TanaIntermediateNode = { + uid: untrackedUidRequest(context), + name: postProcessCodeBlock(obsidianNode), + createdAt: today, + editedAt: today, + codeLanguage: obsidianNode.codeLanguage, + type: 'codeblock' as NodeType, + }; + return tanaNode; +} export function convertMarkdownNode( fileName: string, @@ -14,6 +27,10 @@ export function convertMarkdownNode( today: number, context: VaultContext, ): TanaIntermediateNode { + if (obsidianNode.type === HierarchyType.CODEBLOCK) { + return convertCodeBlock(obsidianNode, today, context); + } + const [uid, content] = contentUidRequest(fileName, obsidianNode.content, context); const tanaNode: TanaIntermediateNode = { uid, diff --git a/src/converters/obsidian/tanaconversion/uids.ts b/src/converters/obsidian/tanaconversion/uids.ts index a3c1657..16f7b19 100644 --- a/src/converters/obsidian/tanaconversion/uids.ts +++ b/src/converters/obsidian/tanaconversion/uids.ts @@ -1,7 +1,7 @@ import { VaultContext } from '../context'; -import { extractBlockId } from '../markdown/blockIds'; +import { removeBlockId } from '../markdown/blockIds'; import { cleanUpLink, detectLinkType, LinkType } from '../markdown/internalLinks'; -import { blockLinkUidRequest, BlockUidRequestType } from './blocks'; +import { blockLinkUidRequest, BlockUidRequestType } from './blockLinks'; import { headingLinkUidRequest } from './headingLinks'; import { incrementSummary } from './summary'; @@ -66,7 +66,7 @@ export function untrackedUidRequest(context: VaultContext) { * @returns [uid, cleanedContent] */ export function contentUidRequest(fileName: string, content: string, context: VaultContext) { - const [cleanedContent, id] = extractBlockId(content); + const [cleanedContent, id] = removeBlockId(content); if (id) { return [blockLinkUidRequest([fileName, id], BlockUidRequestType.BLOCK, context), cleanedContent]; } else { diff --git a/src/converters/obsidian/tanaconversion/vault.ts b/src/converters/obsidian/tanaconversion/vaultConversion.ts similarity index 97% rename from src/converters/obsidian/tanaconversion/vault.ts rename to src/converters/obsidian/tanaconversion/vaultConversion.ts index 0c0fb8e..9109aa8 100644 --- a/src/converters/obsidian/tanaconversion/vault.ts +++ b/src/converters/obsidian/tanaconversion/vaultConversion.ts @@ -1,6 +1,6 @@ import { appendFileSync, Dirent, readdirSync, readFileSync } from 'fs'; import path, { resolve } from 'path'; -import { convertObsidianFile } from './obsidianFileConversion'; +import { convertObsidianFile } from './fileConversion'; import { VaultContext } from '../context'; import { untrackedUidRequest } from './uids'; diff --git a/src/converters/obsidian/tests/codeblocks.test.ts b/src/converters/obsidian/tests/codeblocks.test.ts new file mode 100644 index 0000000..c527ab5 --- /dev/null +++ b/src/converters/obsidian/tests/codeblocks.test.ts @@ -0,0 +1,84 @@ +import { expect, test } from '@jest/globals'; +import { detectCodeBlockHierarchy, postProcessCodeBlock } from '../hierarchy/codeblocks'; +import { HierarchyType } from '../hierarchy/markdownNodes'; + +test('codeblocks hierarchy test', () => { + const noCodeBlock = [ + '', + ' ', + '\n', + ' \n', + '\n ', + '# heading\nparagraph\n', + '``` illegal\n```', + '```\n```illegal', + '```\n``` illegal', + '```Clojure is cool\n```', + ]; + noCodeBlock.forEach((s) => { + expect(detectCodeBlockHierarchy(s, 0)).toStrictEqual(null); + }); + expect(detectCodeBlockHierarchy('```\n```', 0)).toStrictEqual({ + codeLanguage: undefined, + level: '```\n```'.length, + type: HierarchyType.CODEBLOCK, + }); + expect(detectCodeBlockHierarchy('```\n```\n', 0)).toStrictEqual({ + codeLanguage: undefined, + level: '```\n```\n'.length, + type: HierarchyType.CODEBLOCK, + }); + expect(detectCodeBlockHierarchy('```\n```\nAnything', 0)).toStrictEqual({ + codeLanguage: undefined, + level: '```\n```\n'.length, + type: HierarchyType.CODEBLOCK, + }); + expect(detectCodeBlockHierarchy('\n```\n```\nAnything', 1)).toStrictEqual({ + codeLanguage: undefined, + level: '```\n```\n'.length, + type: HierarchyType.CODEBLOCK, + }); + expect(detectCodeBlockHierarchy('```\n```', 0)).toStrictEqual({ + codeLanguage: undefined, + level: '```\n```'.length, + type: HierarchyType.CODEBLOCK, + }); + expect(detectCodeBlockHierarchy('```codeLanguage\n```', 0)).toStrictEqual({ + codeLanguage: 'codeLanguage', + level: '```codeLanguage\n```'.length, + type: HierarchyType.CODEBLOCK, + }); + expect(detectCodeBlockHierarchy('```codeLanguage\n(fn (destroy))```\n', 0)).toStrictEqual({ + codeLanguage: 'codeLanguage', + level: '```codeLanguage\n(fn (destroy))```\n'.length, + type: HierarchyType.CODEBLOCK, + }); +}); + +test('codeblocks post processing test', () => { + expect( + postProcessCodeBlock({ + type: HierarchyType.CODEBLOCK, + content: '```codeLanguage\n(fn (destroy))```\n', + level: 0, + codeLanguage: 'codeLanguage', + }), + ).toEqual('(fn (destroy))'); + expect( + postProcessCodeBlock({ + type: HierarchyType.CODEBLOCK, + content: '```codeLanguage\n(fn (destroy))```', + level: 0, + codeLanguage: 'codeLanguage', + }), + ).toEqual('(fn (destroy))'); + //keeping empty lines inside the code, could have meaning + expect( + postProcessCodeBlock({ + type: HierarchyType.CODEBLOCK, + content: '```codeLanguage\n\n(fn (destroy))```', + level: 0, + codeLanguage: 'codeLanguage', + }), + ).toEqual('\n(fn (destroy))'); +}); diff --git a/src/converters/obsidian/tests/VaultContext.test.ts b/src/converters/obsidian/tests/context.test.ts similarity index 100% rename from src/converters/obsidian/tests/VaultContext.test.ts rename to src/converters/obsidian/tests/context.test.ts diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index 5548c5b..e72ffda 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -134,11 +134,11 @@ "children": [ { "uid": "28", - "name": "Valid Heading [[54]]", + "name": "Valid Heading [[56]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["54"], + "refs": ["56"], "children": [ { "uid": "30", @@ -146,8 +146,8 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["13", "14"], - "todoState": "done" + "todoState": "done", + "refs": ["13", "14"] }, { "uid": "31", @@ -236,13 +236,14 @@ "editedAt": 1, "type": "node", "children": [ + { "uid": "49", "name": "```", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "49", - "name": "Invalid Heading [[50]]", + "uid": "50", + "name": "Invalid Heading [[51]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["50"], + "refs": ["51"], "children": [ { "uid": "36", @@ -250,28 +251,37 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["51", "52"], + "supertags": ["52", "53"], "refs": ["13", "14"] }, { - "uid": "53", + "uid": "54", "name": "#inlinetag2 Fun", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["51"] + "supertags": ["52"] } ] }, { - "uid": "54", + "uid": "55", + "name": "(defn meta-data-finished? [process]\n (let [{meta-data :meta-data, :or {}} process\n {a :a, b :b, c :c} meta-data] ; any one could be missing!\n (not-any? nil? [a b c])))", + "createdAt": 1, + "editedAt": 1, + "codeLanguage": "Clojure", + "type": "codeblock" + }, + { + "uid": "56", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ + { "uid": "57", "name": "code here", "createdAt": 1, "editedAt": 1, "type": "codeblock" }, { - "uid": "55", + "uid": "58", "name": "single image", "createdAt": 1, "editedAt": 1, @@ -279,7 +289,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "56", + "uid": "59", "name": "single image some text", "createdAt": 1, "editedAt": 1, @@ -287,14 +297,14 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "57", - "name": "[[58]] [[59]]", + "uid": "60", + "name": "[[61]] [[62]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "58", + "uid": "61", "name": "multiple images", "createdAt": 1, "editedAt": 1, @@ -302,7 +312,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "59", + "uid": "62", "name": "multiple images 2", "createdAt": 1, "editedAt": 1, @@ -312,14 +322,14 @@ ] }, { - "uid": "60", - "name": "[[61]] [[61]]", + "uid": "63", + "name": "[[64]] [[64]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "61", + "uid": "64", "name": "same image", "createdAt": 1, "editedAt": 1, @@ -329,7 +339,7 @@ ] }, { - "uid": "62", + "uid": "65", "name": "ancient public baths", "createdAt": 1, "editedAt": 1, @@ -347,14 +357,14 @@ ] }, { - "uid": "63", + "uid": "66", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { "uid": "5", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "50", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "51", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "13", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "14", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "33", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, @@ -366,12 +376,12 @@ "supertags": [ { "name": "supertag1", "uid": "20" }, { "name": "supertag2", "uid": "21" }, - { "name": "inlinetag2", "uid": "51" }, - { "name": "inlinetag1", "uid": "52" } + { "name": "inlinetag2", "uid": "52" }, + { "name": "inlinetag1", "uid": "53" } ], "attributes": [ { "name": "field0", "values": [], "count": 2 }, { "name": "field1", "values": [], "count": 1 } ], - "summary": { "leafNodes": 58, "topLevelNodes": 1, "totalNodes": 59, "calendarNodes": 0, "fields": 3, "brokenRefs": 0 } + "summary": { "leafNodes": 61, "topLevelNodes": 1, "totalNodes": 62, "calendarNodes": 1, "fields": 3, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/vault/test.md b/src/converters/obsidian/tests/fixtures/vault/test.md index 3f80b46..7f05bb6 100644 --- a/src/converters/obsidian/tests/fixtures/vault/test.md +++ b/src/converters/obsidian/tests/fixtures/vault/test.md @@ -12,12 +12,22 @@ Stuff but with a newline. ## Heading 2 - +``` - Invalid Heading [[test2#Heading 2#Heading here]] - Block with #inlinetag2 [[Link|alias]] [[Link]] [[Link2]] #inlinetag1 ^BLOCK_UID - #inlinetag2 Fun #inlinetag2 +```Clojure +(defn meta-data-finished? [process] + (let [{meta-data :meta-data, :or {}} process + {a :a, b :b, c :c} meta-data] ; any one could be missing! + (not-any? nil? [a b c]))) +``` #### Out of Level +``` +code here +``` + ![single image](https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100) diff --git a/src/converters/obsidian/tests/parseFrontmatter.test.ts b/src/converters/obsidian/tests/frontmatter.test.ts similarity index 100% rename from src/converters/obsidian/tests/parseFrontmatter.test.ts rename to src/converters/obsidian/tests/frontmatter.test.ts diff --git a/src/converters/obsidian/tests/filterHeadingLinks.test.ts b/src/converters/obsidian/tests/headingLinks.test.ts similarity index 97% rename from src/converters/obsidian/tests/filterHeadingLinks.test.ts rename to src/converters/obsidian/tests/headingLinks.test.ts index 7184174..5cbf27b 100644 --- a/src/converters/obsidian/tests/filterHeadingLinks.test.ts +++ b/src/converters/obsidian/tests/headingLinks.test.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals'; import { HeadingDummyUidTracker, HeadingTracker, matchHeadingLinks } from '../tanaconversion/headingLinks'; -test('filterHeadingLinks test', () => { +test('headingLinks test', () => { const headingTracker: HeadingTracker = new Map(); headingTracker.set('fileName', [ { uid: '1', level: 1, content: '1' }, diff --git a/src/converters/obsidian/tests/extractImageLinks.test.ts b/src/converters/obsidian/tests/imageLinks.test.ts similarity index 99% rename from src/converters/obsidian/tests/extractImageLinks.test.ts rename to src/converters/obsidian/tests/imageLinks.test.ts index e1ec6a1..ea84646 100644 --- a/src/converters/obsidian/tests/extractImageLinks.test.ts +++ b/src/converters/obsidian/tests/imageLinks.test.ts @@ -3,7 +3,7 @@ import { extractImageLinks } from '../markdown/imageLinks'; //TODO: write some test utils to check permutations easier -test('extractImageLinks test', () => { +test('imageLinks test', () => { const noLinks = [ '', ' ', diff --git a/src/converters/obsidian/tests/extractMarkdownNodes.test.ts b/src/converters/obsidian/tests/markdownNodes.test.ts similarity index 91% rename from src/converters/obsidian/tests/extractMarkdownNodes.test.ts rename to src/converters/obsidian/tests/markdownNodes.test.ts index 29bcfcb..323a40e 100644 --- a/src/converters/obsidian/tests/extractMarkdownNodes.test.ts +++ b/src/converters/obsidian/tests/markdownNodes.test.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; import { countEmptySpace } from '../markdown/emptySpace'; -import { extractMarkdownNodes, HierarchyType } from '../markdown/markdownNodes'; +import { extractMarkdownNodes, HierarchyType } from '../hierarchy/markdownNodes'; import { nextNewLine } from '../markdown/newline'; test('headings', () => { @@ -28,17 +28,17 @@ test('paragraphs', () => { expect(extractMarkdownNodes('Starting without heading.\n\n')).toStrictEqual([ { content: 'Starting without heading.', level: 0, type: HierarchyType.PARAGRAPH }, ]); - expect(extractMarkdownNodes('Directly followed by hierachy.\n# Heading')).toStrictEqual([ - { content: 'Directly followed by hierachy.', level: 0, type: HierarchyType.PARAGRAPH }, + expect(extractMarkdownNodes('Directly followed by hierarchy.\n# Heading')).toStrictEqual([ + { content: 'Directly followed by hierarchy.', level: 0, type: HierarchyType.PARAGRAPH }, { content: 'Heading', level: 1, type: HierarchyType.HEADING }, ]); - expect(extractMarkdownNodes('# Heading\nPrefixed by hierachy.')).toStrictEqual([ + expect(extractMarkdownNodes('# Heading\nPrefixed by hierarchy.')).toStrictEqual([ { content: 'Heading', level: 1, type: HierarchyType.HEADING }, - { content: 'Prefixed by hierachy.', level: 0, type: HierarchyType.PARAGRAPH }, + { content: 'Prefixed by hierarchy.', level: 0, type: HierarchyType.PARAGRAPH }, ]); - expect(extractMarkdownNodes('# Heading\n\nPrefixed by hierachy.')).toStrictEqual([ + expect(extractMarkdownNodes('# Heading\n\nPrefixed by hierarchy.')).toStrictEqual([ { content: 'Heading', level: 1, type: HierarchyType.HEADING }, - { content: 'Prefixed by hierachy.', level: 0, type: HierarchyType.PARAGRAPH }, + { content: 'Prefixed by hierarchy.', level: 0, type: HierarchyType.PARAGRAPH }, ]); expect(extractMarkdownNodes('Stuff but with\na newline.\n\n')).toStrictEqual([ { content: 'Stuff but with\na newline.', level: 0, type: HierarchyType.PARAGRAPH }, diff --git a/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts b/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts index c4672d4..b235883 100644 --- a/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts +++ b/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { HeadingNode } from '../postprocessing/matchHeadingLinks'; +import { HeadingNode } from '../tanaconversion/headingLinks'; import { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst'; test('traverseTreeBreadthFirst test', () => { From 45723e903e778fc5723a7dbd0e51f273fcab370f Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Thu, 13 Oct 2022 19:54:00 +0200 Subject: [PATCH 52/94] Obsidian: added to README --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index bbaced0..4d366aa 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Supported formats: - Workflowy (OPML) - Roam Research JSON +- Obsidian Markdown If you need to do some something special with your data before putting it into Tana you can just fork this project and hack the current converters into doing what you need. As long as the resulting file follows the format you will be able to import it into Tana. @@ -23,6 +24,10 @@ If you are making changes that you think will benefit other users, please create `yarn convert:workflowy datasets/my_workflowy_export.opml` +#### Converting Obsidian Markdown Vault to Tana JSON + +`yarn convert:obsidian datasets/my_obsidian_vault/` + # ✍️ Contributing We are always looking for new importers and as well as improvements to existing ones! Contributions from open-source developers are greatly appreciated. From cdd540d5ed1ceadc41f23dd5a155ca23bb19dfa3 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Fri, 14 Oct 2022 09:32:36 +0200 Subject: [PATCH 53/94] Obsidian: refactor UID gen --- src/converters/obsidian/markdown/file.ts | 34 +++++++ .../obsidian/markdown/internalLinks.ts | 29 ------ .../obsidian/tanaconversion/blockLinks.ts | 25 ++++-- .../obsidian/tanaconversion/fields.ts | 2 +- .../obsidian/tanaconversion/fileConversion.ts | 24 ++++- .../obsidian/tanaconversion/headingLinks.ts | 6 +- .../obsidian/tanaconversion/imageNodes.ts | 2 +- .../obsidian/tanaconversion/invalidLinks.ts | 16 +++- .../obsidian/tanaconversion/nodeConversion.ts | 90 ++++++++++++++++++- .../obsidian/tanaconversion/uids.ts | 89 ------------------ .../tanaconversion/untrackedUidRequest.ts | 9 ++ .../tanaconversion/vaultConversion.ts | 5 +- src/converters/obsidian/tests/context.test.ts | 23 ++--- .../obsidian/tests/fixtures/vault/test.md | 2 +- 14 files changed, 210 insertions(+), 146 deletions(-) create mode 100644 src/converters/obsidian/markdown/file.ts delete mode 100644 src/converters/obsidian/markdown/internalLinks.ts create mode 100644 src/converters/obsidian/tanaconversion/untrackedUidRequest.ts diff --git a/src/converters/obsidian/markdown/file.ts b/src/converters/obsidian/markdown/file.ts new file mode 100644 index 0000000..58d3bac --- /dev/null +++ b/src/converters/obsidian/markdown/file.ts @@ -0,0 +1,34 @@ +import path from 'path'; + +export type FileDesc = { name?: string; path?: string }; + +export function isPath(searchStr: string) { + return path.basename(searchStr) !== searchStr; +} + +export function findAnyMatchingFile(fileName: string, filePath: string, tracker: Map) { + const files = Array.from(tracker.keys()); + const pathMatch = files.find((desc) => desc.path === filePath); + if (pathMatch) { + return pathMatch; + } + const nameMatch = files.find((desc) => desc.name === fileName); + return nameMatch; +} + +export function findMatchingFile(searchStr: string, tracker: Map, strIsPath: boolean) { + const files = Array.from(tracker.keys()); + + if (strIsPath) { + return files.find((desc) => desc.path === searchStr); + } else { + return files.find((desc) => desc.name === searchStr); + } +} + +export function createFileDesc(searchStr: string, strIsPath: boolean): FileDesc { + if (strIsPath) { + return { path: searchStr }; + } + return { name: searchStr }; +} diff --git a/src/converters/obsidian/markdown/internalLinks.ts b/src/converters/obsidian/markdown/internalLinks.ts deleted file mode 100644 index cb0c94a..0000000 --- a/src/converters/obsidian/markdown/internalLinks.ts +++ /dev/null @@ -1,29 +0,0 @@ -export enum LinkType { - DEFAULT, - HEADING, - BLOCK, -} - -export function cleanUpLink(link: string) { - //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do - return link - .split('#') - .map((s) => s.trim()) - .filter((s) => s !== ''); -} - -/** - * - * @param link the link split by "#" and cleaned. - */ -export function detectLinkType(link: string[]) { - if (link.length === 2 && link[1].startsWith('^')) { - return LinkType.BLOCK; - } - - if (link.length > 1) { - return LinkType.HEADING; - } - - return LinkType.DEFAULT; -} diff --git a/src/converters/obsidian/tanaconversion/blockLinks.ts b/src/converters/obsidian/tanaconversion/blockLinks.ts index ef91fe9..126af60 100644 --- a/src/converters/obsidian/tanaconversion/blockLinks.ts +++ b/src/converters/obsidian/tanaconversion/blockLinks.ts @@ -1,5 +1,5 @@ import { VaultContext } from '../context'; -import { untrackedUidRequest } from './uids'; +import { untrackedUidRequest } from './untrackedUidRequest'; /** * all block UIDs: > @@ -17,7 +17,7 @@ export interface BlockUidData { type: BlockUidRequestType; } -export function blockLinkUidRequest(link: string[], requestType: BlockUidRequestType, context: VaultContext) { +export function blockLinkUidRequestForUsing(link: string[], context: VaultContext) { const fileName = link[0]; const blockUidMap = context.blockLinkTracker.get(fileName) ?? new Map(); context.blockLinkTracker.set(fileName, blockUidMap); @@ -27,14 +27,29 @@ export function blockLinkUidRequest(link: string[], requestType: BlockUidRequest blockUidData = { uid: untrackedUidRequest(context), obsidianLink: link.join('#'), - type: requestType, + type: BlockUidRequestType.LINK, }; } blockUidMap.set(blockObsidianUid, blockUidData); - if (blockUidData.type === BlockUidRequestType.LINK) { - blockUidData.type = requestType; + return blockUidData.uid; +} + +export function blockLinkUidRequestForDefining(link: string[], context: VaultContext) { + const fileName = link[0]; + const blockUidMap = context.blockLinkTracker.get(fileName) ?? new Map(); + context.blockLinkTracker.set(fileName, blockUidMap); + const blockObsidianUid = link[1]; + let blockUidData = blockUidMap.get(blockObsidianUid); + if (!blockUidData) { + blockUidData = { + uid: untrackedUidRequest(context), + obsidianLink: link.join('#'), + type: BlockUidRequestType.BLOCK, + }; } + blockUidData.type = BlockUidRequestType.BLOCK; + blockUidMap.set(blockObsidianUid, blockUidData); return blockUidData.uid; } diff --git a/src/converters/obsidian/tanaconversion/fields.ts b/src/converters/obsidian/tanaconversion/fields.ts index e95ad80..d5e30e6 100644 --- a/src/converters/obsidian/tanaconversion/fields.ts +++ b/src/converters/obsidian/tanaconversion/fields.ts @@ -2,7 +2,7 @@ import { TanaIntermediateNode } from '../../../types/types'; import { VaultContext } from '../context'; import { FrontmatterData } from '../markdown/frontmatter'; import { addAttribute } from './attributes'; -import { untrackedUidRequest } from './uids'; +import { untrackedUidRequest } from './untrackedUidRequest'; export function frontMatterToFieldNode( data: FrontmatterData, diff --git a/src/converters/obsidian/tanaconversion/fileConversion.ts b/src/converters/obsidian/tanaconversion/fileConversion.ts index e24e090..15c1d61 100644 --- a/src/converters/obsidian/tanaconversion/fileConversion.ts +++ b/src/converters/obsidian/tanaconversion/fileConversion.ts @@ -7,11 +7,13 @@ import moment from 'moment'; import { TanaIntermediateNode, NodeType } from '../../../types/types'; import { frontMatterToFieldNode } from './fields'; import { superTagUidRequests } from './supertags'; -import { uidRequest, UidRequestType } from './uids'; +import { UidRequestType } from './uids'; import { HeadingData } from './headingLinks'; +import { incrementSummary } from './summary'; export function convertObsidianFile( fileName: string, //without ending + filePath: string, fileContent: string, context: VaultContext, today: number = Date.now(), @@ -35,7 +37,7 @@ export function convertObsidianFile( const headingData: HeadingData[] = []; - const fileNode = createFileNode(displayName, today, context, frontmatterData); + const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData); createTree( fileNode, @@ -57,12 +59,28 @@ export function convertObsidianFile( return fileNode; } +function requestUidForFile(fileName: string, context: VaultContext) { + const obsidianLink = fileName.trim(); + const uidData = context.defaultLinkTracker.get(obsidianLink); + if (!uidData) { + incrementSummary(context.summary); + const uid = context.idGenerator(); + context.defaultLinkTracker.set(obsidianLink, { uid, obsidianLink, type: UidRequestType.FILE }); + return uid; + } + uidData.type = UidRequestType.FILE; + + return uidData.uid; +} + function createFileNode( displayName: string, + filePath: string, today: number, context: VaultContext, frontmatter: FrontmatterData[], ): TanaIntermediateNode { + console.log(filePath); let supertags: string[] | undefined; const fieldNodes: TanaIntermediateNode[] = []; @@ -74,7 +92,7 @@ function createFileNode( } }); - let nodeUid = uidRequest(displayName, UidRequestType.FILE, context); + let nodeUid = requestUidForFile(displayName, context); let nodeType: NodeType = 'node'; const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat); diff --git a/src/converters/obsidian/tanaconversion/headingLinks.ts b/src/converters/obsidian/tanaconversion/headingLinks.ts index d79cb1d..5753f58 100644 --- a/src/converters/obsidian/tanaconversion/headingLinks.ts +++ b/src/converters/obsidian/tanaconversion/headingLinks.ts @@ -1,7 +1,6 @@ import { createTree } from '../utils/createTree'; import { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst'; import { VaultContext } from '../context'; -import { HeadingUidData } from './uids'; import { createReadStream, appendFileSync, unlinkSync, renameSync } from 'fs'; import { incrementSummary } from './summary'; import * as readline from 'node:readline/promises'; @@ -11,6 +10,11 @@ export type HeadingNode = { uid: string; content: string; children?: HeadingNode export type HeadingData = { uid: string; content: string; level: number }; +export interface HeadingUidData { + uid: string; + link: string[]; //without the fileName +} + export type HeadingTracker = Map; //all heading temp / dummy-UIDs: diff --git a/src/converters/obsidian/tanaconversion/imageNodes.ts b/src/converters/obsidian/tanaconversion/imageNodes.ts index 909f2bb..bbe3baf 100644 --- a/src/converters/obsidian/tanaconversion/imageNodes.ts +++ b/src/converters/obsidian/tanaconversion/imageNodes.ts @@ -1,7 +1,7 @@ import { TanaIntermediateNode, NodeType } from '../../../types/types'; import { VaultContext } from '../context'; import { extractImageLinks } from '../markdown/imageLinks'; -import { untrackedUidRequest } from './uids'; +import { untrackedUidRequest } from './untrackedUidRequest'; export function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) { const imageData = extractImageLinks(tanaNode.name); diff --git a/src/converters/obsidian/tanaconversion/invalidLinks.ts b/src/converters/obsidian/tanaconversion/invalidLinks.ts index 8640044..92cb32c 100644 --- a/src/converters/obsidian/tanaconversion/invalidLinks.ts +++ b/src/converters/obsidian/tanaconversion/invalidLinks.ts @@ -1,7 +1,21 @@ import { NodeType, TanaIntermediateNode } from '../../../types/types'; import { filterInvalidBlockLinks } from './blockLinks'; -import { filterInvalidContentLinks, untrackedUidRequest } from './uids'; +import { untrackedUidRequest } from './untrackedUidRequest'; import { VaultContext } from '../context'; +import { UidTracker, UidRequestType } from './uids'; + +export function filterInvalidContentLinks(tracker: UidTracker) { + const unlinkedNodes: { uid: string; link: string }[] = []; + for (const node of tracker.values()) { + //at the end every uidData that has been only accessed from content (so inside the markdown file) + //has no matching file node and is therefore unlinked + //otherwise during the creation of the file node, it would have accessed the same Uid + if (node.type === UidRequestType.CONTENT) { + unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink }); + } + } + return unlinkedNodes; +} export function getAllInvalidLinks(context: VaultContext) { return [ diff --git a/src/converters/obsidian/tanaconversion/nodeConversion.ts b/src/converters/obsidian/tanaconversion/nodeConversion.ts index 704df7a..8489a2e 100644 --- a/src/converters/obsidian/tanaconversion/nodeConversion.ts +++ b/src/converters/obsidian/tanaconversion/nodeConversion.ts @@ -3,11 +3,16 @@ import { getBracketLinks } from '../../../utils/utils'; import { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes'; import { VaultContext } from '../context'; import { superTagUidRequests } from './supertags'; -import { contentUidRequest, uidRequest, UidRequestType, untrackedUidRequest } from './uids'; +import { UidRequestType } from './uids'; +import { untrackedUidRequest } from './untrackedUidRequest'; import { removeTodo } from '../markdown/todo'; import { detectTags } from '../markdown/tags'; import { handleImages } from './imageNodes'; import { postProcessCodeBlock } from '../hierarchy/codeblocks'; +import { removeBlockId } from '../markdown/blockIds'; +import { blockLinkUidRequestForDefining, blockLinkUidRequestForUsing } from './blockLinks'; +import { headingLinkUidRequest } from './headingLinks'; +import { incrementSummary } from './summary'; function convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) { const tanaNode: TanaIntermediateNode = { @@ -31,7 +36,7 @@ export function convertMarkdownNode( return convertCodeBlock(obsidianNode, today, context); } - const [uid, content] = contentUidRequest(fileName, obsidianNode.content, context); + const [uid, content] = requestUidForContentNode(fileName, obsidianNode.content, context); const tanaNode: TanaIntermediateNode = { uid, name: content, @@ -67,7 +72,7 @@ export function convertMarkdownNode( const aliasArr = bracketLink.split('|'); const link = aliasArr[0]; const alias = aliasArr[1]; - const foundUid = uidRequest(link, UidRequestType.CONTENT, context); + const foundUid = requestUidForLink(link, context); const result = alias !== undefined && alias.trim() !== '' ? '[' + alias.trim() + ']([[' + foundUid + ']])' @@ -93,3 +98,82 @@ export function convertMarkdownNode( return tanaNode; } + +export enum LinkType { + DEFAULT, + HEADING, + BLOCK, +} + +export function cleanUpLink(link: string) { + //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do + return link + .split('#') + .map((s) => s.trim()) + .filter((s) => s !== ''); +} + +/** + * + * @param link the link split by "#" and cleaned. + */ +export function detectLinkType(link: string[]) { + if (link.length === 2 && link[1].startsWith('^')) { + return LinkType.BLOCK; + } + + if (link.length > 1) { + return LinkType.HEADING; + } + + return LinkType.DEFAULT; +} + +/** + * We can not just take the obsidian link because we might already have created a node for that link + * or a folder might have the same link as a file. + * + * This function should return the correct Uid. + * + * A side-effect is the collection of the summary. + */ +export function requestUidForLink(obsidianLink: string, context: VaultContext) { + const cleanLink = cleanUpLink(obsidianLink); + const linkType = detectLinkType(cleanLink); + switch (linkType) { + case LinkType.DEFAULT: + return standardLinkUidRequest(cleanLink[0], context); + case LinkType.BLOCK: + return blockLinkUidRequestForUsing(cleanLink, context); + case LinkType.HEADING: + return headingLinkUidRequest(cleanLink, context); + default: + throw 'Invalid link type detected: ' + cleanLink; + } +} + +function standardLinkUidRequest(obsidianLink: string, context: VaultContext) { + const uidData = context.defaultLinkTracker.get(obsidianLink); + if (!uidData) { + incrementSummary(context.summary); + const uid = context.idGenerator(); + context.defaultLinkTracker.set(obsidianLink, { uid, obsidianLink, type: UidRequestType.CONTENT }); + return uid; + } + + return uidData.uid; +} + +/** + * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content. + * @returns [uid, cleanedContent] + */ +export function requestUidForContentNode(fileName: string, content: string, context: VaultContext) { + const [cleanedContent, id] = removeBlockId(content); + if (id) { + //found the id, now define the UID + return [blockLinkUidRequestForDefining([fileName, id], context), cleanedContent]; + } else { + return [untrackedUidRequest(context), content]; + } +} diff --git a/src/converters/obsidian/tanaconversion/uids.ts b/src/converters/obsidian/tanaconversion/uids.ts index 16f7b19..f20107b 100644 --- a/src/converters/obsidian/tanaconversion/uids.ts +++ b/src/converters/obsidian/tanaconversion/uids.ts @@ -1,10 +1,3 @@ -import { VaultContext } from '../context'; -import { removeBlockId } from '../markdown/blockIds'; -import { cleanUpLink, detectLinkType, LinkType } from '../markdown/internalLinks'; -import { blockLinkUidRequest, BlockUidRequestType } from './blockLinks'; -import { headingLinkUidRequest } from './headingLinks'; -import { incrementSummary } from './summary'; - export enum UidRequestType { FILE, CONTENT, @@ -16,89 +9,7 @@ interface UidData { obsidianLink: string; } -export interface HeadingUidData { - uid: string; - link: string[]; //without the fileName -} - export type IdGenerator = () => string; //all normal ([[fileName]]), file or folder UIDs: export type UidTracker = Map; - -/** - * We can not just take the obsidian link because we might already have created a node for that link - * or a folder might have the same link as a file. - * - * This function should return the correct Uid. - * - * A side-effect is the collection of the summary. - */ -export function uidRequest(obsidianLink: string, requestType: UidRequestType, context: VaultContext) { - if (requestType === UidRequestType.FILE) { - //we don't use the same split-link because files could contain # - return standardLinkUidRequest(obsidianLink.trim(), requestType, context); - } - - const cleanLink = cleanUpLink(obsidianLink); - const linkType = detectLinkType(cleanLink); - switch (linkType) { - case LinkType.DEFAULT: - return standardLinkUidRequest(cleanLink[0], requestType, context); - case LinkType.BLOCK: - return blockLinkUidRequest(cleanLink, BlockUidRequestType.LINK, context); - case LinkType.HEADING: - return headingLinkUidRequest(cleanLink, context); - default: - throw 'Invalid link type detected: ' + cleanLink; - } -} - -export function untrackedUidRequest(context: VaultContext) { - incrementSummary(context.summary); - //folders / "summary unlinked nodes" / content-nodes get new UIDs always - //because these UIDs either are not in the source or need to be connected later - return context.idGenerator(); -} - -/** - * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content. - * @returns [uid, cleanedContent] - */ -export function contentUidRequest(fileName: string, content: string, context: VaultContext) { - const [cleanedContent, id] = removeBlockId(content); - if (id) { - return [blockLinkUidRequest([fileName, id], BlockUidRequestType.BLOCK, context), cleanedContent]; - } else { - return [untrackedUidRequest(context), content]; - } -} - -function standardLinkUidRequest(obsidianLink: string, requestType: UidRequestType, context: VaultContext) { - const uidData = context.defaultLinkTracker.get(obsidianLink); - if (!uidData) { - incrementSummary(context.summary); - const uid = context.idGenerator(); - context.defaultLinkTracker.set(obsidianLink, { uid, obsidianLink, type: requestType }); - return uid; - } - - if (uidData.type === UidRequestType.CONTENT) { - uidData.type = requestType; - } - - return uidData.uid; -} - -export function filterInvalidContentLinks(tracker: UidTracker) { - const unlinkedNodes: { uid: string; link: string }[] = []; - for (const node of tracker.values()) { - //at the end every uidData that has been only accessed from content (so inside the markdown file) - //has no matching file node and is therefore unlinked - //otherwise during the creation of the file node, it would have accessed the same Uid - if (node.type === UidRequestType.CONTENT) { - unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink }); - } - } - return unlinkedNodes; -} diff --git a/src/converters/obsidian/tanaconversion/untrackedUidRequest.ts b/src/converters/obsidian/tanaconversion/untrackedUidRequest.ts new file mode 100644 index 0000000..bdb05f4 --- /dev/null +++ b/src/converters/obsidian/tanaconversion/untrackedUidRequest.ts @@ -0,0 +1,9 @@ +import { VaultContext } from '../context'; +import { incrementSummary } from './summary'; + +export function untrackedUidRequest(context: VaultContext) { + incrementSummary(context.summary); + //folders / "summary unlinked nodes" / content-nodes get new UIDs always + //because these UIDs either are not in the source or need to be connected later + return context.idGenerator(); +} diff --git a/src/converters/obsidian/tanaconversion/vaultConversion.ts b/src/converters/obsidian/tanaconversion/vaultConversion.ts index 9109aa8..5c69c38 100644 --- a/src/converters/obsidian/tanaconversion/vaultConversion.ts +++ b/src/converters/obsidian/tanaconversion/vaultConversion.ts @@ -2,7 +2,7 @@ import { appendFileSync, Dirent, readdirSync, readFileSync } from 'fs'; import path, { resolve } from 'path'; import { convertObsidianFile } from './fileConversion'; import { VaultContext } from '../context'; -import { untrackedUidRequest } from './uids'; +import { untrackedUidRequest } from './untrackedUidRequest'; enum ChildrenPosition { NOT_LAST = 'NOT_LAST', @@ -79,8 +79,11 @@ export function addParentNodeEnd(targetPath: string) { export function addFileNode(targetPath: string, today: number, context: VaultContext) { return (file: string, childrenPosition: ChildrenPosition) => { + const absoluteFilePath = file.slice(file.indexOf(context.vaultPath)); + const fileNode = convertObsidianFile( path.basename(file).replace('.md', ''), + absoluteFilePath, readFileSync(file, 'utf-8'), context, today, diff --git a/src/converters/obsidian/tests/context.test.ts b/src/converters/obsidian/tests/context.test.ts index 9cb4d8b..bd148b7 100644 --- a/src/converters/obsidian/tests/context.test.ts +++ b/src/converters/obsidian/tests/context.test.ts @@ -1,14 +1,15 @@ import { expect, test } from '@jest/globals'; import { getAllInvalidLinks } from '../tanaconversion/invalidLinks'; -import { contentUidRequest, untrackedUidRequest, uidRequest, UidRequestType } from '../tanaconversion/uids'; +import { untrackedUidRequest } from '../tanaconversion/untrackedUidRequest'; import { createVaultContext } from '../context'; import { deterministicGenerator } from './testUtils'; +import { requestUidForContentNode, requestUidForLink } from '../tanaconversion/nodeConversion'; test('VaultContext uid test', () => { const context = createVaultContext('', deterministicGenerator()); - expect(uidRequest('link', UidRequestType.CONTENT, context)).toBe('0'); + expect(requestUidForLink('link', context)).toBe('0'); //no change on second call - expect(uidRequest('link', UidRequestType.CONTENT, context)).toBe('0'); + expect(requestUidForLink('link', context)).toBe('0'); expect(context.summary).toEqual({ leafNodes: 1, topLevelNodes: 0, @@ -30,29 +31,29 @@ test('VaultContext uid test', () => { //folders always have fresh UIDs, so folders with the same name work expect(untrackedUidRequest(context)).toBe('2'); //having folder UIDs does not change other UIDs - expect(uidRequest('link', UidRequestType.CONTENT, context)).toBe('0'); + expect(requestUidForLink('link', context)).toBe('0'); }); test('VaultContext uid block link test', () => { //first reading the file, then encountering the block ref const context = createVaultContext('', deterministicGenerator()); - const [uid, content] = contentUidRequest('fileName', 'content ^uid', context); + const [uid, content] = requestUidForContentNode('fileName', 'content ^uid', context); expect(uid).toBe('0'); expect(content).toBe('content'); - const uid2 = uidRequest('fileName#^uid', UidRequestType.CONTENT, context); + const uid2 = requestUidForLink('fileName#^uid', context); expect(uid2).toBe('0'); //first encountering the block ref, then reading the file - const uid3 = uidRequest('fileName#^uid3', UidRequestType.CONTENT, context); + const uid3 = requestUidForLink('fileName#^uid3', context); expect(uid3).toBe('1'); - const [uid4, content2] = contentUidRequest('fileName', 'content ^uid3', context); + const [uid4, content2] = requestUidForContentNode('fileName', 'content ^uid3', context); expect(uid4).toBe('1'); expect(content2).toBe('content'); //different file - const uid5 = uidRequest('fileName2#^uid3', UidRequestType.CONTENT, context); + const uid5 = requestUidForLink('fileName2#^uid3', context); expect(uid5).toBe('2'); - const [uid6, content3] = contentUidRequest('fileName2', 'content ^uid3', context); + const [uid6, content3] = requestUidForContentNode('fileName2', 'content ^uid3', context); expect(uid6).toBe('2'); expect(content3).toBe('content'); }); @@ -60,6 +61,6 @@ test('VaultContext uid block link test', () => { test('VaultContext invalid nodes test', () => { const context = createVaultContext('', deterministicGenerator()); //the block link has not been accessed from its source / has not been found - just used - uidRequest('fileName#^uid', UidRequestType.CONTENT, context); + requestUidForLink('fileName#^uid', context); expect(getAllInvalidLinks(context)).toStrictEqual([{ uid: '0', link: 'fileName#^uid' }]); }); diff --git a/src/converters/obsidian/tests/fixtures/vault/test.md b/src/converters/obsidian/tests/fixtures/vault/test.md index 7f05bb6..18e3f37 100644 --- a/src/converters/obsidian/tests/fixtures/vault/test.md +++ b/src/converters/obsidian/tests/fixtures/vault/test.md @@ -14,7 +14,7 @@ a newline. ## Heading 2 ``` - Invalid Heading [[test2#Heading 2#Heading here]] - - Block with #inlinetag2 [[Link|alias]] [[Link]] [[Link2]] #inlinetag1 ^BLOCK_UID + - Block with #inlinetag2 [[Link|alias]] [[Link]] [[Link2]] #inlinetag1 ^BLOCK_UID - #inlinetag2 Fun #inlinetag2 ```Clojure (defn meta-data-finished? [process] From d3b52877964d7ca4a5de01b76044ab0bde553791 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Fri, 14 Oct 2022 11:37:53 +0200 Subject: [PATCH 54/94] Obsidian: absolute link support for standard links --- src/converters/obsidian/context.ts | 15 +- src/converters/obsidian/markdown/file.ts | 54 ++++-- .../obsidian/tanaconversion/fileConversion.ts | 14 +- .../obsidian/tanaconversion/invalidLinks.ts | 4 +- .../obsidian/tanaconversion/nodeConversion.ts | 18 +- .../obsidian/tanaconversion/supertags.ts | 2 +- .../obsidian/tanaconversion/uids.ts | 9 - .../tanaconversion/vaultConversion.ts | 3 +- .../obsidian/tests/fixtures/full.tif.json | 181 +++++++++++------- .../tests/fixtures/vault/04-10-2022.md | 10 + .../tests/fixtures/vault/folder/test2.md | 2 +- 11 files changed, 194 insertions(+), 118 deletions(-) diff --git a/src/converters/obsidian/context.ts b/src/converters/obsidian/context.ts index 7a03f88..e3307e7 100644 --- a/src/converters/obsidian/context.ts +++ b/src/converters/obsidian/context.ts @@ -1,9 +1,20 @@ +import { resolve } from 'path'; import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types'; import { idgenerator as randomGenerator } from '../../utils/utils'; +import { FileDesc } from './markdown/file'; import { BlockLinkTracker } from './tanaconversion/blockLinks'; import { HeadingDummyUidTracker, HeadingTracker } from './tanaconversion/headingLinks'; import { SuperTagTracker } from './tanaconversion/supertags'; -import { IdGenerator, UidTracker } from './tanaconversion/uids'; +import { IdGenerator, UidRequestType } from './tanaconversion/uids'; + +//all normal ([[fileName]]), file or folder UIDs: +export type UidTracker = Map; + +interface UidData { + type: UidRequestType; + uid: string; + obsidianLink: string; +} /** * Contains all information that is used across the whole vault, like which UIDs have already been used. @@ -26,6 +37,8 @@ export function createVaultContext(vaultPath: string, idGenerator: () => string if (vaultPath.endsWith('/')) { vaultPath = vaultPath.slice(0, -1); } + vaultPath = resolve(vaultPath); + return { summary: { leafNodes: 0, diff --git a/src/converters/obsidian/markdown/file.ts b/src/converters/obsidian/markdown/file.ts index 58d3bac..b9e160b 100644 --- a/src/converters/obsidian/markdown/file.ts +++ b/src/converters/obsidian/markdown/file.ts @@ -6,29 +6,51 @@ export function isPath(searchStr: string) { return path.basename(searchStr) !== searchStr; } -export function findAnyMatchingFile(fileName: string, filePath: string, tracker: Map) { +export function fullRetrieveDataForFile( + fileName: string, + filePath: string, + tracker: Map, + defaultData: () => Data, +) { const files = Array.from(tracker.keys()); - const pathMatch = files.find((desc) => desc.path === filePath); - if (pathMatch) { - return pathMatch; + let match = files.find((desc) => desc.path === filePath); + if (!match) { + match = files.find((desc) => desc.name === fileName); } - const nameMatch = files.find((desc) => desc.name === fileName); - return nameMatch; + if (!match) { + match = { path: filePath, name: fileName }; + tracker.set(match, defaultData()); + } + + //update + match.name = fileName; + match.path = filePath; + + return tracker.get(match) as Data; } -export function findMatchingFile(searchStr: string, tracker: Map, strIsPath: boolean) { +export function partialRetrieveDataForFile( + searchStr: string, + tracker: Map, + defaultData: () => Data, +) { const files = Array.from(tracker.keys()); - - if (strIsPath) { - return files.find((desc) => desc.path === searchStr); + const isPathBool = isPath(searchStr); + let match; + if (isPathBool) { + match = files.find((desc) => desc.path === searchStr); } else { - return files.find((desc) => desc.name === searchStr); + match = files.find((desc) => desc.name === searchStr); } -} -export function createFileDesc(searchStr: string, strIsPath: boolean): FileDesc { - if (strIsPath) { - return { path: searchStr }; + if (!match) { + if (isPath(searchStr)) { + match = { path: searchStr }; + } else { + match = { name: searchStr }; + } + tracker.set(match, defaultData()); } - return { name: searchStr }; + + return tracker.get(match) as Data; } diff --git a/src/converters/obsidian/tanaconversion/fileConversion.ts b/src/converters/obsidian/tanaconversion/fileConversion.ts index 15c1d61..ea91b0d 100644 --- a/src/converters/obsidian/tanaconversion/fileConversion.ts +++ b/src/converters/obsidian/tanaconversion/fileConversion.ts @@ -10,6 +10,7 @@ import { superTagUidRequests } from './supertags'; import { UidRequestType } from './uids'; import { HeadingData } from './headingLinks'; import { incrementSummary } from './summary'; +import { fullRetrieveDataForFile } from '../markdown/file'; export function convertObsidianFile( fileName: string, //without ending @@ -59,15 +60,13 @@ export function convertObsidianFile( return fileNode; } -function requestUidForFile(fileName: string, context: VaultContext) { +function requestUidForFile(fileName: string, filePath: string, context: VaultContext) { const obsidianLink = fileName.trim(); - const uidData = context.defaultLinkTracker.get(obsidianLink); - if (!uidData) { + const uidData = fullRetrieveDataForFile(obsidianLink, filePath, context.defaultLinkTracker, () => { incrementSummary(context.summary); const uid = context.idGenerator(); - context.defaultLinkTracker.set(obsidianLink, { uid, obsidianLink, type: UidRequestType.FILE }); - return uid; - } + return { uid, obsidianLink, type: UidRequestType.CONTENT }; + }); uidData.type = UidRequestType.FILE; return uidData.uid; @@ -80,7 +79,6 @@ function createFileNode( context: VaultContext, frontmatter: FrontmatterData[], ): TanaIntermediateNode { - console.log(filePath); let supertags: string[] | undefined; const fieldNodes: TanaIntermediateNode[] = []; @@ -92,7 +90,7 @@ function createFileNode( } }); - let nodeUid = requestUidForFile(displayName, context); + let nodeUid = requestUidForFile(displayName, filePath, context); let nodeType: NodeType = 'node'; const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat); diff --git a/src/converters/obsidian/tanaconversion/invalidLinks.ts b/src/converters/obsidian/tanaconversion/invalidLinks.ts index 92cb32c..85ad0ba 100644 --- a/src/converters/obsidian/tanaconversion/invalidLinks.ts +++ b/src/converters/obsidian/tanaconversion/invalidLinks.ts @@ -1,8 +1,8 @@ import { NodeType, TanaIntermediateNode } from '../../../types/types'; import { filterInvalidBlockLinks } from './blockLinks'; import { untrackedUidRequest } from './untrackedUidRequest'; -import { VaultContext } from '../context'; -import { UidTracker, UidRequestType } from './uids'; +import { UidTracker, VaultContext } from '../context'; +import { UidRequestType } from './uids'; export function filterInvalidContentLinks(tracker: UidTracker) { const unlinkedNodes: { uid: string; link: string }[] = []; diff --git a/src/converters/obsidian/tanaconversion/nodeConversion.ts b/src/converters/obsidian/tanaconversion/nodeConversion.ts index 8489a2e..41dc59b 100644 --- a/src/converters/obsidian/tanaconversion/nodeConversion.ts +++ b/src/converters/obsidian/tanaconversion/nodeConversion.ts @@ -13,6 +13,7 @@ import { removeBlockId } from '../markdown/blockIds'; import { blockLinkUidRequestForDefining, blockLinkUidRequestForUsing } from './blockLinks'; import { headingLinkUidRequest } from './headingLinks'; import { incrementSummary } from './summary'; +import { partialRetrieveDataForFile } from '../markdown/file'; function convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) { const tanaNode: TanaIntermediateNode = { @@ -129,14 +130,6 @@ export function detectLinkType(link: string[]) { return LinkType.DEFAULT; } -/** - * We can not just take the obsidian link because we might already have created a node for that link - * or a folder might have the same link as a file. - * - * This function should return the correct Uid. - * - * A side-effect is the collection of the summary. - */ export function requestUidForLink(obsidianLink: string, context: VaultContext) { const cleanLink = cleanUpLink(obsidianLink); const linkType = detectLinkType(cleanLink); @@ -153,14 +146,11 @@ export function requestUidForLink(obsidianLink: string, context: VaultContext) { } function standardLinkUidRequest(obsidianLink: string, context: VaultContext) { - const uidData = context.defaultLinkTracker.get(obsidianLink); - if (!uidData) { + const uidData = partialRetrieveDataForFile(obsidianLink, context.defaultLinkTracker, () => { incrementSummary(context.summary); const uid = context.idGenerator(); - context.defaultLinkTracker.set(obsidianLink, { uid, obsidianLink, type: UidRequestType.CONTENT }); - return uid; - } - + return { uid, obsidianLink, type: UidRequestType.CONTENT }; + }); return uidData.uid; } diff --git a/src/converters/obsidian/tanaconversion/supertags.ts b/src/converters/obsidian/tanaconversion/supertags.ts index f5d4e28..aa33d9e 100644 --- a/src/converters/obsidian/tanaconversion/supertags.ts +++ b/src/converters/obsidian/tanaconversion/supertags.ts @@ -16,7 +16,7 @@ export function superTagUidRequests( return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean)))); } -export function superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) { +function superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) { let cleanTag = tag; if (clean) { cleanTag = cleanUpTag(tag); diff --git a/src/converters/obsidian/tanaconversion/uids.ts b/src/converters/obsidian/tanaconversion/uids.ts index f20107b..b026647 100644 --- a/src/converters/obsidian/tanaconversion/uids.ts +++ b/src/converters/obsidian/tanaconversion/uids.ts @@ -3,13 +3,4 @@ export enum UidRequestType { CONTENT, } -interface UidData { - type: UidRequestType; - uid: string; - obsidianLink: string; -} - export type IdGenerator = () => string; - -//all normal ([[fileName]]), file or folder UIDs: -export type UidTracker = Map; diff --git a/src/converters/obsidian/tanaconversion/vaultConversion.ts b/src/converters/obsidian/tanaconversion/vaultConversion.ts index 5c69c38..49701c2 100644 --- a/src/converters/obsidian/tanaconversion/vaultConversion.ts +++ b/src/converters/obsidian/tanaconversion/vaultConversion.ts @@ -79,7 +79,8 @@ export function addParentNodeEnd(targetPath: string) { export function addFileNode(targetPath: string, today: number, context: VaultContext) { return (file: string, childrenPosition: ChildrenPosition) => { - const absoluteFilePath = file.slice(file.indexOf(context.vaultPath)); + //remove the vault root path and the ".md" ending to get the absolute path + const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3); const fileNode = convertObsidianFile( path.basename(file).replace('.md', ''), diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index e72ffda..9b11b25 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -72,7 +72,55 @@ } ] }, - { "uid": "16", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node" } + { + "uid": "16", + "name": "Out of Level", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "17", + "name": "[[18]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["18"] + }, + { + "uid": "19", + "name": "[[20]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["20"] + }, + { + "uid": "21", + "name": "[[22]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["22"] + }, + { + "uid": "23", + "name": "[[24]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["24"] + }, + { + "uid": "25", + "name": "Invalid [[26]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["26"] + } + ] + } ] } ] @@ -80,30 +128,30 @@ ] }, { - "uid": "17", + "uid": "27", "name": "folder", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "18", + "uid": "28", "name": "folder", "createdAt": 1, "editedAt": 1, "type": "node", - "children": [{ "uid": "19", "name": "test4", "createdAt": 1, "editedAt": 1, "type": "node" }] + "children": [{ "uid": "22", "name": "test4", "createdAt": 1, "editedAt": 1, "type": "node" }] }, { - "uid": "22", + "uid": "18", "name": "test2", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["20", "21"], + "supertags": ["29", "30"], "children": [ { - "uid": "23", + "uid": "31", "name": "Starting without [[5]] 2.", "createdAt": 1, "editedAt": 1, @@ -111,37 +159,37 @@ "refs": ["5"] }, { - "uid": "24", + "uid": "32", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "25", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, + { "uid": "33", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, { - "uid": "26", + "uid": "34", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "27", + "uid": "35", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "28", - "name": "Valid Heading [[56]]", + "uid": "36", + "name": "Valid Heading [[64]] with duplicate but valid", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["56"], + "refs": ["64"], "children": [ { - "uid": "30", + "uid": "38", "name": "Node with [[13]] [[14]]", "createdAt": 1, "editedAt": 1, @@ -150,29 +198,29 @@ "refs": ["13", "14"] }, { - "uid": "31", - "name": "Fun with missing block ref [[32]] [[33]]", + "uid": "39", + "name": "Fun with missing block ref [[40]] [[41]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["32", "33"] + "refs": ["40", "41"] } ] }, { - "uid": "34", + "uid": "42", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "35", - "name": "Referencing a block [[36]]", + "uid": "43", + "name": "Referencing a block [[44]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["36"] + "refs": ["44"] } ] } @@ -182,38 +230,38 @@ } ] }, - { "uid": "37", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "45", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, { - "uid": "43", + "uid": "51", "name": "test", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["20", "21"], + "supertags": ["29", "30"], "children": [ { - "uid": "39", + "uid": "47", "name": "field0", "type": "field", "createdAt": 1, "editedAt": 1, - "children": [{ "uid": "38", "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1 }] + "children": [{ "uid": "46", "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1 }] }, { - "uid": "42", + "uid": "50", "name": "field1", "type": "field", "createdAt": 1, "editedAt": 1, "children": [ - { "uid": "40", "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1 }, - { "uid": "41", "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1 } + { "uid": "48", "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1 }, + { "uid": "49", "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1 } ] }, { - "uid": "44", + "uid": "52", "name": "Starting without [[5]].", "createdAt": 1, "editedAt": 1, @@ -221,51 +269,51 @@ "refs": ["5"] }, { - "uid": "45", + "uid": "53", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "46", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, - { "uid": "47", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "54", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, + { "uid": "55", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "48", + "uid": "56", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "49", "name": "```", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "57", "name": "```", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "50", - "name": "Invalid Heading [[51]]", + "uid": "58", + "name": "Invalid Heading [[59]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["51"], + "refs": ["59"], "children": [ { - "uid": "36", + "uid": "44", "name": "Block with #inlinetag2 [alias]([[13]]) [[13]] [[14]]", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["52", "53"], + "supertags": ["60", "61"], "refs": ["13", "14"] }, { - "uid": "54", + "uid": "62", "name": "#inlinetag2 Fun", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["52"] + "supertags": ["60"] } ] }, { - "uid": "55", + "uid": "63", "name": "(defn meta-data-finished? [process]\n (let [{meta-data :meta-data, :or {}} process\n {a :a, b :b, c :c} meta-data] ; any one could be missing!\n (not-any? nil? [a b c])))", "createdAt": 1, "editedAt": 1, @@ -273,15 +321,15 @@ "type": "codeblock" }, { - "uid": "56", + "uid": "64", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "57", "name": "code here", "createdAt": 1, "editedAt": 1, "type": "codeblock" }, + { "uid": "65", "name": "code here", "createdAt": 1, "editedAt": 1, "type": "codeblock" }, { - "uid": "58", + "uid": "66", "name": "single image", "createdAt": 1, "editedAt": 1, @@ -289,7 +337,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "59", + "uid": "67", "name": "single image some text", "createdAt": 1, "editedAt": 1, @@ -297,14 +345,14 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "60", - "name": "[[61]] [[62]]", + "uid": "68", + "name": "[[69]] [[70]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "61", + "uid": "69", "name": "multiple images", "createdAt": 1, "editedAt": 1, @@ -312,7 +360,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "62", + "uid": "70", "name": "multiple images 2", "createdAt": 1, "editedAt": 1, @@ -322,14 +370,14 @@ ] }, { - "uid": "63", - "name": "[[64]] [[64]]", + "uid": "71", + "name": "[[72]] [[72]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "64", + "uid": "72", "name": "same image", "createdAt": 1, "editedAt": 1, @@ -339,7 +387,7 @@ ] }, { - "uid": "65", + "uid": "73", "name": "ancient public baths", "createdAt": 1, "editedAt": 1, @@ -357,31 +405,34 @@ ] }, { - "uid": "66", + "uid": "74", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ + { "uid": "26", "name": "folder/folder/test", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "24", "name": "folder/test2#^BLOCK_UID", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "5", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "51", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "20", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "59", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "13", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "14", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "33", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "41", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "8", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "32", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "40", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ], "supertags": [ - { "name": "supertag1", "uid": "20" }, - { "name": "supertag2", "uid": "21" }, - { "name": "inlinetag2", "uid": "52" }, - { "name": "inlinetag1", "uid": "53" } + { "name": "supertag1", "uid": "29" }, + { "name": "supertag2", "uid": "30" }, + { "name": "inlinetag2", "uid": "60" }, + { "name": "inlinetag1", "uid": "61" } ], "attributes": [ { "name": "field0", "values": [], "count": 2 }, { "name": "field1", "values": [], "count": 1 } ], - "summary": { "leafNodes": 61, "topLevelNodes": 1, "totalNodes": 62, "calendarNodes": 1, "fields": 3, "brokenRefs": 0 } + "summary": { "leafNodes": 69, "topLevelNodes": 1, "totalNodes": 70, "calendarNodes": 1, "fields": 3, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md b/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md index 56b0fde..1685b61 100644 --- a/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md +++ b/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md @@ -17,3 +17,13 @@ a newline. - [ ] Fun #### Out of Level + +[[folder/test2]] + +[[folder/test2#Heading 2]] + +[[folder/folder/test4]] + +[[folder/test2#^BLOCK_UID]] + +Invalid [[folder/folder/test]] \ No newline at end of file diff --git a/src/converters/obsidian/tests/fixtures/vault/folder/test2.md b/src/converters/obsidian/tests/fixtures/vault/folder/test2.md index 4e1dbc2..a6077b8 100644 --- a/src/converters/obsidian/tests/fixtures/vault/folder/test2.md +++ b/src/converters/obsidian/tests/fixtures/vault/folder/test2.md @@ -11,7 +11,7 @@ a newline. ## Heading 2 -- Valid Heading [[test#Heading 2#Out of Level]] +- Valid Heading [[test#Heading 2#Out of Level]] with duplicate but valid ^BLOCK_UID - [x] Node with [[Link]] [[Link2]] - Fun with missing block ref [[test#^MISSING]] [[missing#^MISSING]] From 12260af3e7f343bf4135a4880c93f3c1430c64e3 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Fri, 14 Oct 2022 11:58:51 +0200 Subject: [PATCH 55/94] Obsidian: absolute link support for block links --- .../obsidian/tanaconversion/blockLinks.ts | 18 +-- .../obsidian/tanaconversion/fileConversion.ts | 2 +- .../obsidian/tanaconversion/nodeConversion.ts | 7 +- .../tests/ObsidianVaultConverter.test.ts | 2 +- src/converters/obsidian/tests/context.test.ts | 6 +- .../obsidian/tests/fixtures/full.tif.json | 105 +++++++++--------- .../tests/fixtures/vault/04-10-2022.md | 2 +- 7 files changed, 71 insertions(+), 71 deletions(-) diff --git a/src/converters/obsidian/tanaconversion/blockLinks.ts b/src/converters/obsidian/tanaconversion/blockLinks.ts index 126af60..752bc6b 100644 --- a/src/converters/obsidian/tanaconversion/blockLinks.ts +++ b/src/converters/obsidian/tanaconversion/blockLinks.ts @@ -1,10 +1,8 @@ import { VaultContext } from '../context'; +import { FileDesc, fullRetrieveDataForFile, partialRetrieveDataForFile } from '../markdown/file'; import { untrackedUidRequest } from './untrackedUidRequest'; -/** - * all block UIDs: > - */ -export type BlockLinkTracker = Map>; +export type BlockLinkTracker = Map>; export enum BlockUidRequestType { LINK, //the request came from using the block ref @@ -19,9 +17,10 @@ export interface BlockUidData { export function blockLinkUidRequestForUsing(link: string[], context: VaultContext) { const fileName = link[0]; - const blockUidMap = context.blockLinkTracker.get(fileName) ?? new Map(); - context.blockLinkTracker.set(fileName, blockUidMap); const blockObsidianUid = link[1]; + const blockUidMap = partialRetrieveDataForFile(fileName, context.blockLinkTracker, () => { + return new Map(); + }); let blockUidData = blockUidMap.get(blockObsidianUid); if (!blockUidData) { blockUidData = { @@ -35,11 +34,12 @@ export function blockLinkUidRequestForUsing(link: string[], context: VaultContex return blockUidData.uid; } -export function blockLinkUidRequestForDefining(link: string[], context: VaultContext) { +export function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) { const fileName = link[0]; - const blockUidMap = context.blockLinkTracker.get(fileName) ?? new Map(); - context.blockLinkTracker.set(fileName, blockUidMap); const blockObsidianUid = link[1]; + const blockUidMap = fullRetrieveDataForFile(fileName, filePath, context.blockLinkTracker, () => { + return new Map(); + }); let blockUidData = blockUidMap.get(blockObsidianUid); if (!blockUidData) { blockUidData = { diff --git a/src/converters/obsidian/tanaconversion/fileConversion.ts b/src/converters/obsidian/tanaconversion/fileConversion.ts index ea91b0d..3800592 100644 --- a/src/converters/obsidian/tanaconversion/fileConversion.ts +++ b/src/converters/obsidian/tanaconversion/fileConversion.ts @@ -46,7 +46,7 @@ export function convertObsidianFile( obsidianNodes, isMarkdownNodeChild, (markdownNode) => { - return convertMarkdownNode(fileName, markdownNode, today, context); + return convertMarkdownNode(fileName, filePath, markdownNode, today, context); }, (tanaNode, markdownNode) => { if (markdownNode.type === HierarchyType.HEADING) { diff --git a/src/converters/obsidian/tanaconversion/nodeConversion.ts b/src/converters/obsidian/tanaconversion/nodeConversion.ts index 41dc59b..f879121 100644 --- a/src/converters/obsidian/tanaconversion/nodeConversion.ts +++ b/src/converters/obsidian/tanaconversion/nodeConversion.ts @@ -29,6 +29,7 @@ function convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: Va export function convertMarkdownNode( fileName: string, + filePath: string, obsidianNode: MarkdownNode, today: number, context: VaultContext, @@ -37,7 +38,7 @@ export function convertMarkdownNode( return convertCodeBlock(obsidianNode, today, context); } - const [uid, content] = requestUidForContentNode(fileName, obsidianNode.content, context); + const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context); const tanaNode: TanaIntermediateNode = { uid, name: content, @@ -158,11 +159,11 @@ function standardLinkUidRequest(obsidianLink: string, context: VaultContext) { * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content. * @returns [uid, cleanedContent] */ -export function requestUidForContentNode(fileName: string, content: string, context: VaultContext) { +export function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) { const [cleanedContent, id] = removeBlockId(content); if (id) { //found the id, now define the UID - return [blockLinkUidRequestForDefining([fileName, id], context), cleanedContent]; + return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent]; } else { return [untrackedUidRequest(context), content]; } diff --git a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts index 8f66f1a..6900c30 100644 --- a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts +++ b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts @@ -8,7 +8,7 @@ test('obsidian vault converter', async () => { const context = createVaultContext('./src/converters/obsidian/tests/fixtures/vault', deterministicGenerator()); await ObsidianVaultConverter(context, 1); const result = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/vault.tif.json', 'utf-8')); - // console.log(JSON.stringify(result)); + console.log(JSON.stringify(result)); unlinkSync('./src/converters/obsidian/tests/fixtures/vault.tif.json'); const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/full.tif.json', 'utf-8')); expect(context.dailyNoteFormat).toBe('DD-MM-YYYY'); diff --git a/src/converters/obsidian/tests/context.test.ts b/src/converters/obsidian/tests/context.test.ts index bd148b7..e952661 100644 --- a/src/converters/obsidian/tests/context.test.ts +++ b/src/converters/obsidian/tests/context.test.ts @@ -37,7 +37,7 @@ test('VaultContext uid test', () => { test('VaultContext uid block link test', () => { //first reading the file, then encountering the block ref const context = createVaultContext('', deterministicGenerator()); - const [uid, content] = requestUidForContentNode('fileName', 'content ^uid', context); + const [uid, content] = requestUidForContentNode('fileName', 'filePath', 'content ^uid', context); expect(uid).toBe('0'); expect(content).toBe('content'); const uid2 = requestUidForLink('fileName#^uid', context); @@ -46,14 +46,14 @@ test('VaultContext uid block link test', () => { //first encountering the block ref, then reading the file const uid3 = requestUidForLink('fileName#^uid3', context); expect(uid3).toBe('1'); - const [uid4, content2] = requestUidForContentNode('fileName', 'content ^uid3', context); + const [uid4, content2] = requestUidForContentNode('fileName', 'filePath', 'content ^uid3', context); expect(uid4).toBe('1'); expect(content2).toBe('content'); //different file const uid5 = requestUidForLink('fileName2#^uid3', context); expect(uid5).toBe('2'); - const [uid6, content3] = requestUidForContentNode('fileName2', 'content ^uid3', context); + const [uid6, content3] = requestUidForContentNode('fileName2', 'filePath2', 'content ^uid3', context); expect(uid6).toBe('2'); expect(content3).toBe('content'); }); diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index 9b11b25..ce41090 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -105,7 +105,7 @@ }, { "uid": "23", - "name": "[[24]]", + "name": "Using a duplicate but valid block id [[24]]", "createdAt": 1, "editedAt": 1, "type": "node", @@ -181,15 +181,15 @@ "type": "node", "children": [ { - "uid": "36", - "name": "Valid Heading [[64]] with duplicate but valid", + "uid": "24", + "name": "Valid Heading [[63]] with duplicate but valid", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["64"], + "refs": ["63"], "children": [ { - "uid": "38", + "uid": "37", "name": "Node with [[13]] [[14]]", "createdAt": 1, "editedAt": 1, @@ -198,29 +198,29 @@ "refs": ["13", "14"] }, { - "uid": "39", - "name": "Fun with missing block ref [[40]] [[41]]", + "uid": "38", + "name": "Fun with missing block ref [[39]] [[40]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["40", "41"] + "refs": ["39", "40"] } ] }, { - "uid": "42", + "uid": "41", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "43", - "name": "Referencing a block [[44]]", + "uid": "42", + "name": "Referencing a block [[43]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["44"] + "refs": ["43"] } ] } @@ -230,11 +230,11 @@ } ] }, - { "uid": "45", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "44", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, { - "uid": "51", + "uid": "50", "name": "test", "createdAt": 1, "editedAt": 1, @@ -242,26 +242,26 @@ "supertags": ["29", "30"], "children": [ { - "uid": "47", + "uid": "46", "name": "field0", "type": "field", "createdAt": 1, "editedAt": 1, - "children": [{ "uid": "46", "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1 }] + "children": [{ "uid": "45", "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1 }] }, { - "uid": "50", + "uid": "49", "name": "field1", "type": "field", "createdAt": 1, "editedAt": 1, "children": [ - { "uid": "48", "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1 }, - { "uid": "49", "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1 } + { "uid": "47", "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1 }, + { "uid": "48", "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1 } ] }, { - "uid": "52", + "uid": "51", "name": "Starting without [[5]].", "createdAt": 1, "editedAt": 1, @@ -269,51 +269,51 @@ "refs": ["5"] }, { - "uid": "53", + "uid": "52", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "54", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, - { "uid": "55", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "53", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, + { "uid": "54", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "56", + "uid": "55", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "57", "name": "```", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "56", "name": "```", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "58", - "name": "Invalid Heading [[59]]", + "uid": "57", + "name": "Invalid Heading [[58]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["59"], + "refs": ["58"], "children": [ { - "uid": "44", + "uid": "43", "name": "Block with #inlinetag2 [alias]([[13]]) [[13]] [[14]]", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["60", "61"], + "supertags": ["59", "60"], "refs": ["13", "14"] }, { - "uid": "62", + "uid": "61", "name": "#inlinetag2 Fun", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["60"] + "supertags": ["59"] } ] }, { - "uid": "63", + "uid": "62", "name": "(defn meta-data-finished? [process]\n (let [{meta-data :meta-data, :or {}} process\n {a :a, b :b, c :c} meta-data] ; any one could be missing!\n (not-any? nil? [a b c])))", "createdAt": 1, "editedAt": 1, @@ -321,15 +321,15 @@ "type": "codeblock" }, { - "uid": "64", + "uid": "63", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "65", "name": "code here", "createdAt": 1, "editedAt": 1, "type": "codeblock" }, + { "uid": "64", "name": "code here", "createdAt": 1, "editedAt": 1, "type": "codeblock" }, { - "uid": "66", + "uid": "65", "name": "single image", "createdAt": 1, "editedAt": 1, @@ -337,7 +337,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "67", + "uid": "66", "name": "single image some text", "createdAt": 1, "editedAt": 1, @@ -345,14 +345,14 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "68", - "name": "[[69]] [[70]]", + "uid": "67", + "name": "[[68]] [[69]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "69", + "uid": "68", "name": "multiple images", "createdAt": 1, "editedAt": 1, @@ -360,7 +360,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "70", + "uid": "69", "name": "multiple images 2", "createdAt": 1, "editedAt": 1, @@ -370,14 +370,14 @@ ] }, { - "uid": "71", - "name": "[[72]] [[72]]", + "uid": "70", + "name": "[[71]] [[71]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "72", + "uid": "71", "name": "same image", "createdAt": 1, "editedAt": 1, @@ -387,7 +387,7 @@ ] }, { - "uid": "73", + "uid": "72", "name": "ancient public baths", "createdAt": 1, "editedAt": 1, @@ -405,34 +405,33 @@ ] }, { - "uid": "74", + "uid": "73", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { "uid": "26", "name": "folder/folder/test", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "24", "name": "folder/test2#^BLOCK_UID", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "5", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "20", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "59", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "58", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "13", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "14", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "41", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "40", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "8", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "40", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "39", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ], "supertags": [ { "name": "supertag1", "uid": "29" }, { "name": "supertag2", "uid": "30" }, - { "name": "inlinetag2", "uid": "60" }, - { "name": "inlinetag1", "uid": "61" } + { "name": "inlinetag2", "uid": "59" }, + { "name": "inlinetag1", "uid": "60" } ], "attributes": [ { "name": "field0", "values": [], "count": 2 }, { "name": "field1", "values": [], "count": 1 } ], - "summary": { "leafNodes": 69, "topLevelNodes": 1, "totalNodes": 70, "calendarNodes": 1, "fields": 3, "brokenRefs": 0 } + "summary": { "leafNodes": 68, "topLevelNodes": 1, "totalNodes": 69, "calendarNodes": 1, "fields": 3, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md b/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md index 1685b61..6328333 100644 --- a/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md +++ b/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md @@ -24,6 +24,6 @@ a newline. [[folder/folder/test4]] -[[folder/test2#^BLOCK_UID]] +Using a duplicate but valid block id [[folder/test2#^BLOCK_UID]] Invalid [[folder/folder/test]] \ No newline at end of file From e46bacaa2f87cc3f52b8d3ec659ff3a057084c6c Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Fri, 14 Oct 2022 18:00:02 +0200 Subject: [PATCH 56/94] Obsidian: absolute link support for heading links --- .../OBSIDIAN_README.md => OBSIDIAN_README.md | 0 .../obsidian/ObsidianVaultConverter.ts | 9 +- .../obsidian/{context.ts => VaultContext.ts} | 30 ++++-- src/converters/obsidian/links/FileDescMap.ts | 61 +++++++++++++ .../{tanaconversion => links}/blockLinks.ts | 12 +-- .../genericLinks.ts} | 3 +- .../{tanaconversion => links}/headingLinks.ts | 31 ++++--- .../obsidian/links/internalLinks.ts | 90 ++++++++++++++++++ .../{tanaconversion => links}/invalidLinks.ts | 8 +- src/converters/obsidian/markdown/file.ts | 56 ------------ .../obsidian/tanaconversion/attributes.ts | 10 -- .../obsidian/tanaconversion/fileConversion.ts | 26 ++---- .../obsidian/tanaconversion/nodeConversion.ts | 83 +---------------- .../obsidian/tanaconversion/summary.ts | 11 --- .../obsidian/tanaconversion/uids.ts | 6 -- .../tanaconversion/vaultConversion.ts | 4 +- .../fields.ts | 16 +++- .../imageNodes.ts | 4 +- .../supertags.ts | 2 +- .../tests/ObsidianVaultConverter.test.ts | 4 +- .../{context.test.ts => VaultContext.test.ts} | 8 +- .../obsidian/tests/fixtures/full.tif.json | 91 +++++++++---------- .../tests/fixtures/vault/04-10-2022.md | 6 +- .../vault/folder/{test2.md => test.md} | 0 .../obsidian/tests/fixtures/vault/test.md | 2 +- .../obsidian/tests/headingLinks.test.ts | 11 ++- .../tests/traverseTreeDepthFirst.test.ts | 2 +- src/converters/obsidian/utils/IdGenerator.ts | 1 + src/runner.ts | 2 +- 29 files changed, 297 insertions(+), 292 deletions(-) rename src/converters/obsidian/OBSIDIAN_README.md => OBSIDIAN_README.md (100%) rename src/converters/obsidian/{context.ts => VaultContext.ts} (65%) create mode 100644 src/converters/obsidian/links/FileDescMap.ts rename src/converters/obsidian/{tanaconversion => links}/blockLinks.ts (80%) rename src/converters/obsidian/{tanaconversion/untrackedUidRequest.ts => links/genericLinks.ts} (76%) rename src/converters/obsidian/{tanaconversion => links}/headingLinks.ts (80%) create mode 100644 src/converters/obsidian/links/internalLinks.ts rename src/converters/obsidian/{tanaconversion => links}/invalidLinks.ts (89%) delete mode 100644 src/converters/obsidian/markdown/file.ts delete mode 100644 src/converters/obsidian/tanaconversion/attributes.ts delete mode 100644 src/converters/obsidian/tanaconversion/summary.ts delete mode 100644 src/converters/obsidian/tanaconversion/uids.ts rename src/converters/obsidian/{tanaconversion => tanafeatures}/fields.ts (60%) rename src/converters/obsidian/{tanaconversion => tanafeatures}/imageNodes.ts (92%) rename src/converters/obsidian/{tanaconversion => tanafeatures}/supertags.ts (94%) rename src/converters/obsidian/tests/{context.test.ts => VaultContext.test.ts} (88%) rename src/converters/obsidian/tests/fixtures/vault/folder/{test2.md => test.md} (100%) create mode 100644 src/converters/obsidian/utils/IdGenerator.ts diff --git a/src/converters/obsidian/OBSIDIAN_README.md b/OBSIDIAN_README.md similarity index 100% rename from src/converters/obsidian/OBSIDIAN_README.md rename to OBSIDIAN_README.md diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index a9b42e8..deb2648 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -1,12 +1,11 @@ import { appendFileSync, unlinkSync } from 'fs'; import path from 'path'; import fs from 'fs'; -import { createUnlinkedTanaNodes } from './tanaconversion/invalidLinks'; +import { createUnlinkedTanaNodes } from './links/invalidLinks'; import { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion'; -import { VaultContext } from './context'; -import { createSuperTagObjects } from './tanaconversion/supertags'; -import { shiftFromLeafToTop } from './tanaconversion/summary'; -import { postProcessTIFFIle } from './tanaconversion/headingLinks'; +import { shiftFromLeafToTop, VaultContext } from './VaultContext'; +import { createSuperTagObjects } from './tanafeatures/supertags'; +import { postProcessTIFFIle } from './links/headingLinks'; /** * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults. diff --git a/src/converters/obsidian/context.ts b/src/converters/obsidian/VaultContext.ts similarity index 65% rename from src/converters/obsidian/context.ts rename to src/converters/obsidian/VaultContext.ts index e3307e7..9137bcc 100644 --- a/src/converters/obsidian/context.ts +++ b/src/converters/obsidian/VaultContext.ts @@ -1,14 +1,14 @@ import { resolve } from 'path'; import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types'; import { idgenerator as randomGenerator } from '../../utils/utils'; -import { FileDesc } from './markdown/file'; -import { BlockLinkTracker } from './tanaconversion/blockLinks'; -import { HeadingDummyUidTracker, HeadingTracker } from './tanaconversion/headingLinks'; -import { SuperTagTracker } from './tanaconversion/supertags'; -import { IdGenerator, UidRequestType } from './tanaconversion/uids'; +import { FileDescMap } from './links/FileDescMap'; +import { BlockLinkTracker } from './links/blockLinks'; +import { SuperTagTracker } from './tanafeatures/supertags'; +import { UidRequestType } from './links/internalLinks'; +import { IdGenerator } from './utils/IdGenerator'; +import { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks'; -//all normal ([[fileName]]), file or folder UIDs: -export type UidTracker = Map; +export type UidTracker = FileDescMap; interface UidData { type: UidRequestType; @@ -33,6 +33,16 @@ export interface VaultContext { idGenerator: IdGenerator; } +export function incrementSummary(summary: TanaIntermediateSummary) { + summary.totalNodes++; + summary.leafNodes++; +} + +export function shiftFromLeafToTop(summary: TanaIntermediateSummary) { + summary.leafNodes--; + summary.topLevelNodes++; +} + export function createVaultContext(vaultPath: string, idGenerator: () => string = randomGenerator): VaultContext { if (vaultPath.endsWith('/')) { vaultPath = vaultPath.slice(0, -1); @@ -50,10 +60,10 @@ export function createVaultContext(vaultPath: string, idGenerator: () => string }, idGenerator, vaultPath, - defaultLinkTracker: new Map(), - headingTracker: new Map(), + defaultLinkTracker: new FileDescMap(), + headingTracker: new FileDescMap(), dummyHeadingLinkTracker: new Map(), - blockLinkTracker: new Map(), + blockLinkTracker: new FileDescMap(), invalidLinks: [], superTagTracker: new Map(), attributes: [], diff --git a/src/converters/obsidian/links/FileDescMap.ts b/src/converters/obsidian/links/FileDescMap.ts new file mode 100644 index 0000000..24cf979 --- /dev/null +++ b/src/converters/obsidian/links/FileDescMap.ts @@ -0,0 +1,61 @@ +import path from 'path'; + +function isPath(searchStr: string) { + return path.basename(searchStr) !== searchStr; +} + +export class FileDescMap extends Map { + fullRetrieveAndUpdate(fileName: string, filePath: string, defaultData: () => Data) { + const files = Array.from(this.keys()); + let match = files.find((desc) => desc.path === filePath); + if (!match) { + match = files.find((desc) => desc.name === fileName); + } + if (!match) { + match = { path: filePath, name: fileName }; + this.set(match, defaultData()); + } + + //update + match.name = fileName; + match.path = filePath; + + return this.get(match) as Data; + } + + partialRetrieveAndUpdate(searchStr: string, defaultData: () => Data) { + const files = Array.from(this.keys()); + const isPathBool = isPath(searchStr); + let match; + if (isPathBool) { + match = files.find((desc) => desc.path === searchStr); + } else { + match = files.find((desc) => desc.name === searchStr); + } + + if (!match) { + if (isPathBool) { + match = { path: searchStr }; + } else { + match = { name: searchStr }; + } + this.set(match, defaultData()); + } + + return this.get(match) as Data; + } + + findMatchingFile(searchStr: string) { + const files = Array.from(this.keys()); + const isPathBool = isPath(searchStr); + let match; + if (isPathBool) { + match = files.find((desc) => desc.path === searchStr); + } else { + match = files.find((desc) => desc.name === searchStr); + } + return match; + } +} + +export type FileDesc = { name?: string; path?: string }; diff --git a/src/converters/obsidian/tanaconversion/blockLinks.ts b/src/converters/obsidian/links/blockLinks.ts similarity index 80% rename from src/converters/obsidian/tanaconversion/blockLinks.ts rename to src/converters/obsidian/links/blockLinks.ts index 752bc6b..7cfb512 100644 --- a/src/converters/obsidian/tanaconversion/blockLinks.ts +++ b/src/converters/obsidian/links/blockLinks.ts @@ -1,8 +1,8 @@ -import { VaultContext } from '../context'; -import { FileDesc, fullRetrieveDataForFile, partialRetrieveDataForFile } from '../markdown/file'; -import { untrackedUidRequest } from './untrackedUidRequest'; +import { VaultContext } from '../VaultContext'; +import { FileDescMap } from './FileDescMap'; +import { untrackedUidRequest } from './genericLinks'; -export type BlockLinkTracker = Map>; +export type BlockLinkTracker = FileDescMap>; export enum BlockUidRequestType { LINK, //the request came from using the block ref @@ -18,7 +18,7 @@ export interface BlockUidData { export function blockLinkUidRequestForUsing(link: string[], context: VaultContext) { const fileName = link[0]; const blockObsidianUid = link[1]; - const blockUidMap = partialRetrieveDataForFile(fileName, context.blockLinkTracker, () => { + const blockUidMap = context.blockLinkTracker.partialRetrieveAndUpdate(fileName, () => { return new Map(); }); let blockUidData = blockUidMap.get(blockObsidianUid); @@ -37,7 +37,7 @@ export function blockLinkUidRequestForUsing(link: string[], context: VaultContex export function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) { const fileName = link[0]; const blockObsidianUid = link[1]; - const blockUidMap = fullRetrieveDataForFile(fileName, filePath, context.blockLinkTracker, () => { + const blockUidMap = context.blockLinkTracker.fullRetrieveAndUpdate(fileName, filePath, () => { return new Map(); }); let blockUidData = blockUidMap.get(blockObsidianUid); diff --git a/src/converters/obsidian/tanaconversion/untrackedUidRequest.ts b/src/converters/obsidian/links/genericLinks.ts similarity index 76% rename from src/converters/obsidian/tanaconversion/untrackedUidRequest.ts rename to src/converters/obsidian/links/genericLinks.ts index bdb05f4..1c5cf44 100644 --- a/src/converters/obsidian/tanaconversion/untrackedUidRequest.ts +++ b/src/converters/obsidian/links/genericLinks.ts @@ -1,5 +1,4 @@ -import { VaultContext } from '../context'; -import { incrementSummary } from './summary'; +import { incrementSummary, VaultContext } from '../VaultContext'; export function untrackedUidRequest(context: VaultContext) { incrementSummary(context.summary); diff --git a/src/converters/obsidian/tanaconversion/headingLinks.ts b/src/converters/obsidian/links/headingLinks.ts similarity index 80% rename from src/converters/obsidian/tanaconversion/headingLinks.ts rename to src/converters/obsidian/links/headingLinks.ts index 5753f58..27ff571 100644 --- a/src/converters/obsidian/tanaconversion/headingLinks.ts +++ b/src/converters/obsidian/links/headingLinks.ts @@ -1,9 +1,9 @@ import { createTree } from '../utils/createTree'; import { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst'; -import { VaultContext } from '../context'; +import { incrementSummary, VaultContext } from '../VaultContext'; import { createReadStream, appendFileSync, unlinkSync, renameSync } from 'fs'; -import { incrementSummary } from './summary'; import * as readline from 'node:readline/promises'; +import { FileDescMap } from './FileDescMap'; //children are sorted like in file, important to detect valid heading links export type HeadingNode = { uid: string; content: string; children?: HeadingNode[] }; @@ -15,22 +15,26 @@ export interface HeadingUidData { link: string[]; //without the fileName } -export type HeadingTracker = Map; - -//all heading temp / dummy-UIDs: +export type HeadingTracker = FileDescMap; +/** + * + */ export type HeadingDummyUidTracker = Map; /** * A heading link is [[fileName#heading...]] + * + * File name might be file path. */ -export function headingLinkUidRequest(link: string[], context: VaultContext) { - const fileName = link[0]; - const fileHeadingData = context.dummyHeadingLinkTracker.get(fileName) ?? []; - context.dummyHeadingLinkTracker.set(fileName, fileHeadingData); +export function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) { + const unchangedLink = cleanLink[0]; + const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? []; + context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData); //these "UIDs" are replaced and counted later //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end - const uid = context.idGenerator(); - fileHeadingData.push({ uid, link: link.slice(1) }); + const uid = '!' + context.idGenerator() + '!'; + // const uid = context.idGenerator(); + fileHeadingData.push({ uid, link: cleanLink.slice(1) }); return uid; } @@ -44,8 +48,9 @@ export function matchHeadingLinks( ): [{ old: string; new: string }[], HeadingUidData[]] { const missingHeadingLinks = []; const validHeadingLinks = []; - for (const [fileName, dummyHeadingUidData] of dummyHeadingLinks.entries()) { - const potentiallyMatchingNodes = tracker.get(fileName); + for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) { + const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink); + const potentiallyMatchingNodes = matchingFileDesc ? tracker.get(matchingFileDesc) : null; if (potentiallyMatchingNodes) { //we use a dummy because the tree function needs one root node const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 }; diff --git a/src/converters/obsidian/links/internalLinks.ts b/src/converters/obsidian/links/internalLinks.ts new file mode 100644 index 0000000..4523e97 --- /dev/null +++ b/src/converters/obsidian/links/internalLinks.ts @@ -0,0 +1,90 @@ +import { incrementSummary, VaultContext } from '../VaultContext'; +import { removeBlockId } from '../markdown/blockIds'; +import { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks'; +import { untrackedUidRequest } from './genericLinks'; +import { headingLinkUidRequestForUsing } from './headingLinks'; + +export enum UidRequestType { + FILE, + CONTENT, +} + +export enum LinkType { + DEFAULT, + HEADING, + BLOCK, +} + +export function cleanUpLink(link: string) { + //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do + return link + .split('#') + .map((s) => s.trim()) + .filter((s) => s !== ''); +} + +/** + * + * @param link the link split by "#" and cleaned. + */ +export function detectLinkType(link: string[]) { + if (link.length === 2 && link[1].startsWith('^')) { + return LinkType.BLOCK; + } + + if (link.length > 1) { + return LinkType.HEADING; + } + + return LinkType.DEFAULT; +} + +export function requestUidForLink(obsidianLink: string, context: VaultContext) { + const cleanLink = cleanUpLink(obsidianLink); + const linkType = detectLinkType(cleanLink); + switch (linkType) { + case LinkType.DEFAULT: + return standardLinkUidRequest(cleanLink[0], context); + case LinkType.BLOCK: + return blockLinkUidRequestForUsing(cleanLink, context); + case LinkType.HEADING: + return headingLinkUidRequestForUsing(cleanLink, context); + default: + throw 'Invalid link type detected: ' + cleanLink; + } +} + +function standardLinkUidRequest(obsidianLink: string, context: VaultContext) { + const uidData = context.defaultLinkTracker.partialRetrieveAndUpdate(obsidianLink, () => { + incrementSummary(context.summary); + const uid = context.idGenerator(); + return { uid, obsidianLink, type: UidRequestType.CONTENT }; + }); + return uidData.uid; +} + +/** + * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content. + * @returns [uid, cleanedContent] + */ +export function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) { + const [cleanedContent, id] = removeBlockId(content); + if (id) { + //found the id, now define the UID + return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent]; + } else { + return [untrackedUidRequest(context), content]; + } +} + +export function requestUidForFile(fileName: string, filePath: string, context: VaultContext) { + const obsidianLink = fileName.trim(); + const uidData = context.defaultLinkTracker.fullRetrieveAndUpdate(obsidianLink, filePath, () => { + incrementSummary(context.summary); + const uid = context.idGenerator(); + return { uid, obsidianLink, type: UidRequestType.FILE }; + }); + uidData.type = UidRequestType.FILE; + + return uidData.uid; +} diff --git a/src/converters/obsidian/tanaconversion/invalidLinks.ts b/src/converters/obsidian/links/invalidLinks.ts similarity index 89% rename from src/converters/obsidian/tanaconversion/invalidLinks.ts rename to src/converters/obsidian/links/invalidLinks.ts index 85ad0ba..f1e50d8 100644 --- a/src/converters/obsidian/tanaconversion/invalidLinks.ts +++ b/src/converters/obsidian/links/invalidLinks.ts @@ -1,8 +1,8 @@ import { NodeType, TanaIntermediateNode } from '../../../types/types'; import { filterInvalidBlockLinks } from './blockLinks'; -import { untrackedUidRequest } from './untrackedUidRequest'; -import { UidTracker, VaultContext } from '../context'; -import { UidRequestType } from './uids'; +import { untrackedUidRequest } from './genericLinks'; +import { UidTracker, VaultContext } from '../VaultContext'; +import { UidRequestType } from './internalLinks'; export function filterInvalidContentLinks(tracker: UidTracker) { const unlinkedNodes: { uid: string; link: string }[] = []; @@ -44,6 +44,8 @@ export function createUnlinkedTanaNodes( return null; } + context.summary.topLevelNodes++; + const rootNodeName = 'Missing Nodes for ' + importName; const rootNode: TanaIntermediateNode = { uid: untrackedUidRequest(context), diff --git a/src/converters/obsidian/markdown/file.ts b/src/converters/obsidian/markdown/file.ts deleted file mode 100644 index b9e160b..0000000 --- a/src/converters/obsidian/markdown/file.ts +++ /dev/null @@ -1,56 +0,0 @@ -import path from 'path'; - -export type FileDesc = { name?: string; path?: string }; - -export function isPath(searchStr: string) { - return path.basename(searchStr) !== searchStr; -} - -export function fullRetrieveDataForFile( - fileName: string, - filePath: string, - tracker: Map, - defaultData: () => Data, -) { - const files = Array.from(tracker.keys()); - let match = files.find((desc) => desc.path === filePath); - if (!match) { - match = files.find((desc) => desc.name === fileName); - } - if (!match) { - match = { path: filePath, name: fileName }; - tracker.set(match, defaultData()); - } - - //update - match.name = fileName; - match.path = filePath; - - return tracker.get(match) as Data; -} - -export function partialRetrieveDataForFile( - searchStr: string, - tracker: Map, - defaultData: () => Data, -) { - const files = Array.from(tracker.keys()); - const isPathBool = isPath(searchStr); - let match; - if (isPathBool) { - match = files.find((desc) => desc.path === searchStr); - } else { - match = files.find((desc) => desc.name === searchStr); - } - - if (!match) { - if (isPath(searchStr)) { - match = { path: searchStr }; - } else { - match = { name: searchStr }; - } - tracker.set(match, defaultData()); - } - - return tracker.get(match) as Data; -} diff --git a/src/converters/obsidian/tanaconversion/attributes.ts b/src/converters/obsidian/tanaconversion/attributes.ts deleted file mode 100644 index 2e39741..0000000 --- a/src/converters/obsidian/tanaconversion/attributes.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { TanaIntermediateAttribute } from '../../../types/types'; - -export function addAttribute(name: string, attributes: TanaIntermediateAttribute[]) { - const foundAttr = attributes.filter((attr) => attr.name === name)[0]; - if (foundAttr) { - foundAttr.count++; - } else { - attributes.push({ name, values: [], count: 1 }); - } -} diff --git a/src/converters/obsidian/tanaconversion/fileConversion.ts b/src/converters/obsidian/tanaconversion/fileConversion.ts index 3800592..022690d 100644 --- a/src/converters/obsidian/tanaconversion/fileConversion.ts +++ b/src/converters/obsidian/tanaconversion/fileConversion.ts @@ -2,15 +2,13 @@ import { convertMarkdownNode } from './nodeConversion'; import { createTree } from '../utils/createTree'; import { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes'; import { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter'; -import { VaultContext } from '../context'; +import { VaultContext } from '../VaultContext'; import moment from 'moment'; import { TanaIntermediateNode, NodeType } from '../../../types/types'; -import { frontMatterToFieldNode } from './fields'; -import { superTagUidRequests } from './supertags'; -import { UidRequestType } from './uids'; -import { HeadingData } from './headingLinks'; -import { incrementSummary } from './summary'; -import { fullRetrieveDataForFile } from '../markdown/file'; +import { superTagUidRequests } from '../tanafeatures/supertags'; +import { requestUidForFile } from '../links/internalLinks'; +import { HeadingData } from '../links/headingLinks'; +import { frontMatterToFieldNode } from '../tanafeatures/fields'; export function convertObsidianFile( fileName: string, //without ending @@ -55,23 +53,11 @@ export function convertObsidianFile( }, ); - context.headingTracker.set(fileName, headingData); + context.headingTracker.set({ name: displayName, path: filePath }, headingData); return fileNode; } -function requestUidForFile(fileName: string, filePath: string, context: VaultContext) { - const obsidianLink = fileName.trim(); - const uidData = fullRetrieveDataForFile(obsidianLink, filePath, context.defaultLinkTracker, () => { - incrementSummary(context.summary); - const uid = context.idGenerator(); - return { uid, obsidianLink, type: UidRequestType.CONTENT }; - }); - uidData.type = UidRequestType.FILE; - - return uidData.uid; -} - function createFileNode( displayName: string, filePath: string, diff --git a/src/converters/obsidian/tanaconversion/nodeConversion.ts b/src/converters/obsidian/tanaconversion/nodeConversion.ts index f879121..07f2831 100644 --- a/src/converters/obsidian/tanaconversion/nodeConversion.ts +++ b/src/converters/obsidian/tanaconversion/nodeConversion.ts @@ -1,19 +1,14 @@ import { NodeType, TanaIntermediateNode } from '../../../types/types'; import { getBracketLinks } from '../../../utils/utils'; import { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes'; -import { VaultContext } from '../context'; -import { superTagUidRequests } from './supertags'; -import { UidRequestType } from './uids'; -import { untrackedUidRequest } from './untrackedUidRequest'; +import { VaultContext } from '../VaultContext'; +import { superTagUidRequests } from '../tanafeatures/supertags'; +import { untrackedUidRequest } from '../links/genericLinks'; import { removeTodo } from '../markdown/todo'; import { detectTags } from '../markdown/tags'; -import { handleImages } from './imageNodes'; +import { handleImages } from '../tanafeatures/imageNodes'; import { postProcessCodeBlock } from '../hierarchy/codeblocks'; -import { removeBlockId } from '../markdown/blockIds'; -import { blockLinkUidRequestForDefining, blockLinkUidRequestForUsing } from './blockLinks'; -import { headingLinkUidRequest } from './headingLinks'; -import { incrementSummary } from './summary'; -import { partialRetrieveDataForFile } from '../markdown/file'; +import { requestUidForContentNode, requestUidForLink } from '../links/internalLinks'; function convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) { const tanaNode: TanaIntermediateNode = { @@ -100,71 +95,3 @@ export function convertMarkdownNode( return tanaNode; } - -export enum LinkType { - DEFAULT, - HEADING, - BLOCK, -} - -export function cleanUpLink(link: string) { - //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do - return link - .split('#') - .map((s) => s.trim()) - .filter((s) => s !== ''); -} - -/** - * - * @param link the link split by "#" and cleaned. - */ -export function detectLinkType(link: string[]) { - if (link.length === 2 && link[1].startsWith('^')) { - return LinkType.BLOCK; - } - - if (link.length > 1) { - return LinkType.HEADING; - } - - return LinkType.DEFAULT; -} - -export function requestUidForLink(obsidianLink: string, context: VaultContext) { - const cleanLink = cleanUpLink(obsidianLink); - const linkType = detectLinkType(cleanLink); - switch (linkType) { - case LinkType.DEFAULT: - return standardLinkUidRequest(cleanLink[0], context); - case LinkType.BLOCK: - return blockLinkUidRequestForUsing(cleanLink, context); - case LinkType.HEADING: - return headingLinkUidRequest(cleanLink, context); - default: - throw 'Invalid link type detected: ' + cleanLink; - } -} - -function standardLinkUidRequest(obsidianLink: string, context: VaultContext) { - const uidData = partialRetrieveDataForFile(obsidianLink, context.defaultLinkTracker, () => { - incrementSummary(context.summary); - const uid = context.idGenerator(); - return { uid, obsidianLink, type: UidRequestType.CONTENT }; - }); - return uidData.uid; -} - -/** - * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content. - * @returns [uid, cleanedContent] - */ -export function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) { - const [cleanedContent, id] = removeBlockId(content); - if (id) { - //found the id, now define the UID - return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent]; - } else { - return [untrackedUidRequest(context), content]; - } -} diff --git a/src/converters/obsidian/tanaconversion/summary.ts b/src/converters/obsidian/tanaconversion/summary.ts deleted file mode 100644 index e755a30..0000000 --- a/src/converters/obsidian/tanaconversion/summary.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { TanaIntermediateSummary } from '../../../types/types'; - -export function incrementSummary(summary: TanaIntermediateSummary) { - summary.totalNodes++; - summary.leafNodes++; -} - -export function shiftFromLeafToTop(summary: TanaIntermediateSummary) { - summary.leafNodes--; - summary.topLevelNodes++; -} diff --git a/src/converters/obsidian/tanaconversion/uids.ts b/src/converters/obsidian/tanaconversion/uids.ts deleted file mode 100644 index b026647..0000000 --- a/src/converters/obsidian/tanaconversion/uids.ts +++ /dev/null @@ -1,6 +0,0 @@ -export enum UidRequestType { - FILE, - CONTENT, -} - -export type IdGenerator = () => string; diff --git a/src/converters/obsidian/tanaconversion/vaultConversion.ts b/src/converters/obsidian/tanaconversion/vaultConversion.ts index 49701c2..7bae454 100644 --- a/src/converters/obsidian/tanaconversion/vaultConversion.ts +++ b/src/converters/obsidian/tanaconversion/vaultConversion.ts @@ -1,8 +1,8 @@ import { appendFileSync, Dirent, readdirSync, readFileSync } from 'fs'; import path, { resolve } from 'path'; import { convertObsidianFile } from './fileConversion'; -import { VaultContext } from '../context'; -import { untrackedUidRequest } from './untrackedUidRequest'; +import { VaultContext } from '../VaultContext'; +import { untrackedUidRequest } from '../links/genericLinks'; enum ChildrenPosition { NOT_LAST = 'NOT_LAST', diff --git a/src/converters/obsidian/tanaconversion/fields.ts b/src/converters/obsidian/tanafeatures/fields.ts similarity index 60% rename from src/converters/obsidian/tanaconversion/fields.ts rename to src/converters/obsidian/tanafeatures/fields.ts index d5e30e6..9f6cc0e 100644 --- a/src/converters/obsidian/tanaconversion/fields.ts +++ b/src/converters/obsidian/tanafeatures/fields.ts @@ -1,8 +1,7 @@ -import { TanaIntermediateNode } from '../../../types/types'; -import { VaultContext } from '../context'; +import { TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types'; +import { VaultContext } from '../VaultContext'; import { FrontmatterData } from '../markdown/frontmatter'; -import { addAttribute } from './attributes'; -import { untrackedUidRequest } from './untrackedUidRequest'; +import { untrackedUidRequest } from '../links/genericLinks'; export function frontMatterToFieldNode( data: FrontmatterData, @@ -32,3 +31,12 @@ export function frontMatterToFieldNode( children, }; } + +function addAttribute(name: string, attributes: TanaIntermediateAttribute[]) { + const foundAttr = attributes.filter((attr) => attr.name === name)[0]; + if (foundAttr) { + foundAttr.count++; + } else { + attributes.push({ name, values: [], count: 1 }); + } +} diff --git a/src/converters/obsidian/tanaconversion/imageNodes.ts b/src/converters/obsidian/tanafeatures/imageNodes.ts similarity index 92% rename from src/converters/obsidian/tanaconversion/imageNodes.ts rename to src/converters/obsidian/tanafeatures/imageNodes.ts index bbe3baf..10b56a9 100644 --- a/src/converters/obsidian/tanaconversion/imageNodes.ts +++ b/src/converters/obsidian/tanafeatures/imageNodes.ts @@ -1,7 +1,7 @@ import { TanaIntermediateNode, NodeType } from '../../../types/types'; -import { VaultContext } from '../context'; +import { VaultContext } from '../VaultContext'; import { extractImageLinks } from '../markdown/imageLinks'; -import { untrackedUidRequest } from './untrackedUidRequest'; +import { untrackedUidRequest } from '../links/genericLinks'; export function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) { const imageData = extractImageLinks(tanaNode.name); diff --git a/src/converters/obsidian/tanaconversion/supertags.ts b/src/converters/obsidian/tanafeatures/supertags.ts similarity index 94% rename from src/converters/obsidian/tanaconversion/supertags.ts rename to src/converters/obsidian/tanafeatures/supertags.ts index aa33d9e..e8febca 100644 --- a/src/converters/obsidian/tanaconversion/supertags.ts +++ b/src/converters/obsidian/tanafeatures/supertags.ts @@ -1,6 +1,6 @@ import { TanaIntermediateSupertag } from '../../../types/types'; import { cleanUpTag } from '../markdown/tags'; -import { IdGenerator } from './uids'; +import { IdGenerator } from '../utils/IdGenerator'; export type SuperTagTracker = Map; diff --git a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts index 6900c30..32be5d7 100644 --- a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts +++ b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts @@ -1,14 +1,14 @@ import { expect, test } from '@jest/globals'; import { readFileSync, unlinkSync } from 'fs'; import { ObsidianVaultConverter } from '../ObsidianVaultConverter'; -import { createVaultContext } from '../context'; +import { createVaultContext } from '../VaultContext'; import { deterministicGenerator } from './testUtils'; test('obsidian vault converter', async () => { const context = createVaultContext('./src/converters/obsidian/tests/fixtures/vault', deterministicGenerator()); await ObsidianVaultConverter(context, 1); const result = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/vault.tif.json', 'utf-8')); - console.log(JSON.stringify(result)); + // console.log(JSON.stringify(result)); unlinkSync('./src/converters/obsidian/tests/fixtures/vault.tif.json'); const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/full.tif.json', 'utf-8')); expect(context.dailyNoteFormat).toBe('DD-MM-YYYY'); diff --git a/src/converters/obsidian/tests/context.test.ts b/src/converters/obsidian/tests/VaultContext.test.ts similarity index 88% rename from src/converters/obsidian/tests/context.test.ts rename to src/converters/obsidian/tests/VaultContext.test.ts index e952661..ceede3c 100644 --- a/src/converters/obsidian/tests/context.test.ts +++ b/src/converters/obsidian/tests/VaultContext.test.ts @@ -1,9 +1,9 @@ import { expect, test } from '@jest/globals'; -import { getAllInvalidLinks } from '../tanaconversion/invalidLinks'; -import { untrackedUidRequest } from '../tanaconversion/untrackedUidRequest'; -import { createVaultContext } from '../context'; +import { getAllInvalidLinks } from '../links/invalidLinks'; +import { untrackedUidRequest } from '../links/genericLinks'; +import { createVaultContext } from '../VaultContext'; import { deterministicGenerator } from './testUtils'; -import { requestUidForContentNode, requestUidForLink } from '../tanaconversion/nodeConversion'; +import { requestUidForLink, requestUidForContentNode } from '../links/internalLinks'; test('VaultContext uid test', () => { const context = createVaultContext('', deterministicGenerator()); diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index ce41090..ff73b48 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -89,11 +89,11 @@ }, { "uid": "19", - "name": "[[20]]", + "name": "[[35]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["20"] + "refs": ["35"] }, { "uid": "21", @@ -144,7 +144,7 @@ }, { "uid": "18", - "name": "test2", + "name": "test", "createdAt": 1, "editedAt": 1, "type": "node", @@ -182,11 +182,11 @@ "children": [ { "uid": "24", - "name": "Valid Heading [[63]] with duplicate but valid", + "name": "Valid Heading [[41]] with duplicate but valid", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["63"], + "refs": ["41"], "children": [ { "uid": "37", @@ -216,11 +216,11 @@ "children": [ { "uid": "42", - "name": "Referencing a block [[43]]", + "name": "Referencing a block [[24]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["43"] + "refs": ["24"] } ] } @@ -230,11 +230,11 @@ } ] }, - { "uid": "44", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "43", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } ] }, { - "uid": "50", + "uid": "18", "name": "test", "createdAt": 1, "editedAt": 1, @@ -242,26 +242,26 @@ "supertags": ["29", "30"], "children": [ { - "uid": "46", + "uid": "45", "name": "field0", "type": "field", "createdAt": 1, "editedAt": 1, - "children": [{ "uid": "45", "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1 }] + "children": [{ "uid": "44", "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1 }] }, { - "uid": "49", + "uid": "48", "name": "field1", "type": "field", "createdAt": 1, "editedAt": 1, "children": [ - { "uid": "47", "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1 }, - { "uid": "48", "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1 } + { "uid": "46", "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1 }, + { "uid": "47", "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1 } ] }, { - "uid": "51", + "uid": "49", "name": "Starting without [[5]].", "createdAt": 1, "editedAt": 1, @@ -269,51 +269,51 @@ "refs": ["5"] }, { - "uid": "52", + "uid": "50", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "53", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, - { "uid": "54", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "51", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, + { "uid": "52", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "55", + "uid": "53", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "56", "name": "```", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "54", "name": "```", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "57", - "name": "Invalid Heading [[58]]", + "uid": "55", + "name": "Invalid Heading [[!56!]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["58"], + "refs": ["!56!"], "children": [ { - "uid": "43", + "uid": "24", "name": "Block with #inlinetag2 [alias]([[13]]) [[13]] [[14]]", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["59", "60"], + "supertags": ["57", "58"], "refs": ["13", "14"] }, { - "uid": "61", + "uid": "59", "name": "#inlinetag2 Fun", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["59"] + "supertags": ["57"] } ] }, { - "uid": "62", + "uid": "60", "name": "(defn meta-data-finished? [process]\n (let [{meta-data :meta-data, :or {}} process\n {a :a, b :b, c :c} meta-data] ; any one could be missing!\n (not-any? nil? [a b c])))", "createdAt": 1, "editedAt": 1, @@ -321,15 +321,15 @@ "type": "codeblock" }, { - "uid": "63", + "uid": "61", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "64", "name": "code here", "createdAt": 1, "editedAt": 1, "type": "codeblock" }, + { "uid": "62", "name": "code here", "createdAt": 1, "editedAt": 1, "type": "codeblock" }, { - "uid": "65", + "uid": "63", "name": "single image", "createdAt": 1, "editedAt": 1, @@ -337,7 +337,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "66", + "uid": "64", "name": "single image some text", "createdAt": 1, "editedAt": 1, @@ -345,14 +345,14 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "67", - "name": "[[68]] [[69]]", + "uid": "65", + "name": "[[66]] [[67]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "68", + "uid": "66", "name": "multiple images", "createdAt": 1, "editedAt": 1, @@ -360,7 +360,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "69", + "uid": "67", "name": "multiple images 2", "createdAt": 1, "editedAt": 1, @@ -370,14 +370,14 @@ ] }, { - "uid": "70", - "name": "[[71]] [[71]]", + "uid": "68", + "name": "[[69]] [[69]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "71", + "uid": "69", "name": "same image", "createdAt": 1, "editedAt": 1, @@ -387,7 +387,7 @@ ] }, { - "uid": "72", + "uid": "70", "name": "ancient public baths", "createdAt": 1, "editedAt": 1, @@ -405,7 +405,7 @@ ] }, { - "uid": "73", + "uid": "71", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, @@ -413,8 +413,7 @@ "children": [ { "uid": "26", "name": "folder/folder/test", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "5", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "20", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "58", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "!56!", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "13", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "14", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "40", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, @@ -426,12 +425,12 @@ "supertags": [ { "name": "supertag1", "uid": "29" }, { "name": "supertag2", "uid": "30" }, - { "name": "inlinetag2", "uid": "59" }, - { "name": "inlinetag1", "uid": "60" } + { "name": "inlinetag2", "uid": "57" }, + { "name": "inlinetag1", "uid": "58" } ], "attributes": [ { "name": "field0", "values": [], "count": 2 }, { "name": "field1", "values": [], "count": 1 } ], - "summary": { "leafNodes": 68, "topLevelNodes": 1, "totalNodes": 69, "calendarNodes": 1, "fields": 3, "brokenRefs": 0 } + "summary": { "leafNodes": 65, "topLevelNodes": 1, "totalNodes": 66, "calendarNodes": 1, "fields": 3, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md b/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md index 6328333..0a55d08 100644 --- a/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md +++ b/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md @@ -18,12 +18,12 @@ a newline. #### Out of Level -[[folder/test2]] +[[folder/test]] -[[folder/test2#Heading 2]] +[[folder/test#Heading 2]] [[folder/folder/test4]] -Using a duplicate but valid block id [[folder/test2#^BLOCK_UID]] +Using a duplicate but valid block id [[folder/test#^BLOCK_UID]] Invalid [[folder/folder/test]] \ No newline at end of file diff --git a/src/converters/obsidian/tests/fixtures/vault/folder/test2.md b/src/converters/obsidian/tests/fixtures/vault/folder/test.md similarity index 100% rename from src/converters/obsidian/tests/fixtures/vault/folder/test2.md rename to src/converters/obsidian/tests/fixtures/vault/folder/test.md diff --git a/src/converters/obsidian/tests/fixtures/vault/test.md b/src/converters/obsidian/tests/fixtures/vault/test.md index 18e3f37..68ee6b2 100644 --- a/src/converters/obsidian/tests/fixtures/vault/test.md +++ b/src/converters/obsidian/tests/fixtures/vault/test.md @@ -13,7 +13,7 @@ a newline. ## Heading 2 ``` -- Invalid Heading [[test2#Heading 2#Heading here]] +- Invalid Heading [[folder/test#Heading 2#Heading here]] - Block with #inlinetag2 [[Link|alias]] [[Link]] [[Link2]] #inlinetag1 ^BLOCK_UID - #inlinetag2 Fun #inlinetag2 ```Clojure diff --git a/src/converters/obsidian/tests/headingLinks.test.ts b/src/converters/obsidian/tests/headingLinks.test.ts index 5cbf27b..917715e 100644 --- a/src/converters/obsidian/tests/headingLinks.test.ts +++ b/src/converters/obsidian/tests/headingLinks.test.ts @@ -1,9 +1,10 @@ import { expect, test } from '@jest/globals'; -import { HeadingDummyUidTracker, HeadingTracker, matchHeadingLinks } from '../tanaconversion/headingLinks'; +import { FileDescMap } from '../links/FileDescMap'; +import { HeadingTracker, HeadingDummyUidTracker, matchHeadingLinks } from '../links/headingLinks'; test('headingLinks test', () => { - const headingTracker: HeadingTracker = new Map(); - headingTracker.set('fileName', [ + const headingTracker: HeadingTracker = new FileDescMap(); + headingTracker.set({ name: 'fileName' }, [ { uid: '1', level: 1, content: '1' }, { uid: '2', level: 2, content: '2' }, { uid: '3', level: 3, content: '3' }, @@ -11,11 +12,11 @@ test('headingLinks test', () => { { uid: '1_2', level: 1, content: '1_2' }, { uid: '4_2', level: 3, content: '4' }, ]); - headingTracker.set('fileName2', [ + headingTracker.set({ name: 'fileName2' }, [ { uid: '3', level: 3, content: '3' }, { uid: '1', level: 1, content: '1' }, ]); - headingTracker.set('fileName3', []); //empty is handled fine + headingTracker.set({ name: 'fileName3' }, []); //empty is handled fine const headingLinks: HeadingDummyUidTracker = new Map(); headingLinks.set('fileName', [ { uid: 'OLD_2', link: ['1', '2'] }, diff --git a/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts b/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts index b235883..1196d71 100644 --- a/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts +++ b/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts @@ -1,5 +1,5 @@ import { expect, test } from '@jest/globals'; -import { HeadingNode } from '../tanaconversion/headingLinks'; +import { HeadingNode } from '../links/headingLinks'; import { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst'; test('traverseTreeBreadthFirst test', () => { diff --git a/src/converters/obsidian/utils/IdGenerator.ts b/src/converters/obsidian/utils/IdGenerator.ts new file mode 100644 index 0000000..d2766e9 --- /dev/null +++ b/src/converters/obsidian/utils/IdGenerator.ts @@ -0,0 +1 @@ +export type IdGenerator = () => string; diff --git a/src/runner.ts b/src/runner.ts index 81e0f22..19867c7 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -6,7 +6,7 @@ import { TanaIntermediateFile } from './types/types'; import { WorkflowyConverter } from './converters/workflowy'; import { lstatSync } from 'fs'; import { ObsidianVaultConverter } from './converters/obsidian'; -import { createVaultContext } from './converters/obsidian/context'; +import { createVaultContext } from './converters/obsidian/VaultContext'; const fileType = process.argv[2]; const file = process.argv[3]; From 0f5c926713189d2b75ebae83e6c18deee73c763d Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Fri, 14 Oct 2022 18:15:53 +0200 Subject: [PATCH 57/94] Obsidian: added support for numbered lists with in x)-style --- src/converters/obsidian/hierarchy/bullets.ts | 2 +- src/converters/obsidian/links/invalidLinks.ts | 5 ++--- src/converters/obsidian/tests/fixtures/full.tif.json | 2 +- src/converters/obsidian/tests/markdownNodes.test.ts | 6 ++++++ 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/converters/obsidian/hierarchy/bullets.ts b/src/converters/obsidian/hierarchy/bullets.ts index 556d43b..0b50994 100644 --- a/src/converters/obsidian/hierarchy/bullets.ts +++ b/src/converters/obsidian/hierarchy/bullets.ts @@ -6,7 +6,7 @@ import { isNewLine, nextNewLine } from '../markdown/newline'; function isNumberedBullet(content: string, pos: number) { const char = content[pos]; const secondChar = content[pos + 1]; - return !isNaN(parseInt(char)) && secondChar === '.' && content[pos + 2] === ' '; + return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' '; } export function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy { diff --git a/src/converters/obsidian/links/invalidLinks.ts b/src/converters/obsidian/links/invalidLinks.ts index f1e50d8..26724d0 100644 --- a/src/converters/obsidian/links/invalidLinks.ts +++ b/src/converters/obsidian/links/invalidLinks.ts @@ -1,7 +1,7 @@ import { NodeType, TanaIntermediateNode } from '../../../types/types'; import { filterInvalidBlockLinks } from './blockLinks'; import { untrackedUidRequest } from './genericLinks'; -import { UidTracker, VaultContext } from '../VaultContext'; +import { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext'; import { UidRequestType } from './internalLinks'; export function filterInvalidContentLinks(tracker: UidTracker) { @@ -44,8 +44,6 @@ export function createUnlinkedTanaNodes( return null; } - context.summary.topLevelNodes++; - const rootNodeName = 'Missing Nodes for ' + importName; const rootNode: TanaIntermediateNode = { uid: untrackedUidRequest(context), @@ -54,6 +52,7 @@ export function createUnlinkedTanaNodes( editedAt: today, type: 'node' as NodeType, }; + shiftFromLeafToTop(context.summary); rootNode.children = unlinkedNodes; diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index ff73b48..2f7eb0b 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -432,5 +432,5 @@ { "name": "field0", "values": [], "count": 2 }, { "name": "field1", "values": [], "count": 1 } ], - "summary": { "leafNodes": 65, "topLevelNodes": 1, "totalNodes": 66, "calendarNodes": 1, "fields": 3, "brokenRefs": 0 } + "summary": { "leafNodes": 64, "topLevelNodes": 2, "totalNodes": 66, "calendarNodes": 1, "fields": 3, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/markdownNodes.test.ts b/src/converters/obsidian/tests/markdownNodes.test.ts index 323a40e..0a35926 100644 --- a/src/converters/obsidian/tests/markdownNodes.test.ts +++ b/src/converters/obsidian/tests/markdownNodes.test.ts @@ -115,6 +115,12 @@ test('bullet nodes', () => { expect(extractMarkdownNodes(' - Node')).toStrictEqual([{ content: 'Node', level: 1, type: HierarchyType.BULLET }]); //space expect(extractMarkdownNodes(' - Node')).toStrictEqual([{ content: 'Node', level: 1, type: HierarchyType.BULLET }]); + expect(extractMarkdownNodes(' 1. Node')).toStrictEqual([ + { content: '1. Node', level: 1, type: HierarchyType.BULLET }, + ]); + expect(extractMarkdownNodes(' 1) Node')).toStrictEqual([ + { content: '1) Node', level: 1, type: HierarchyType.BULLET }, + ]); expect( extractMarkdownNodes(`* Text * Foo From bafe95b604eb782ee5dbbeb0cde3899168bc0918 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Fri, 14 Oct 2022 20:01:56 +0200 Subject: [PATCH 58/94] Obsidian: encapsulate all node specific code in CustomFileSystemAdapter --- .../obsidian/CustomFileSystemAdapter.ts | 29 +++++++++ .../obsidian/LocalFileSystemAdapter.ts | 62 +++++++++++++++++++ .../obsidian/ObsidianVaultConverter.ts | 34 +++++----- src/converters/obsidian/VaultContext.ts | 11 +++- src/converters/obsidian/links/FileDescMap.ts | 4 +- src/converters/obsidian/links/headingLinks.ts | 15 ++--- .../tanaconversion/vaultConversion.ts | 44 ++++++------- .../tests/ObsidianVaultConverter.test.ts | 7 ++- .../obsidian/tests/VaultContext.test.ts | 7 ++- .../obsidian/utils/obsidianConfig.ts | 20 ------ src/runner.ts | 3 +- 11 files changed, 161 insertions(+), 75 deletions(-) create mode 100644 src/converters/obsidian/CustomFileSystemAdapter.ts create mode 100644 src/converters/obsidian/LocalFileSystemAdapter.ts delete mode 100644 src/converters/obsidian/utils/obsidianConfig.ts diff --git a/src/converters/obsidian/CustomFileSystemAdapter.ts b/src/converters/obsidian/CustomFileSystemAdapter.ts new file mode 100644 index 0000000..64b8113 --- /dev/null +++ b/src/converters/obsidian/CustomFileSystemAdapter.ts @@ -0,0 +1,29 @@ +export interface CustomFileSystemAdapter { + initReadingVault: () => void; + readDirectory: (dir: string) => CustomFileSystemEntry[]; + readFile: (file: string) => string; + exists: (path: string) => boolean; + + resolve: (path: string) => string; + resolveInDir: (dir: string, name: string) => string; + + removeFile: (targetPath: string) => void; + renameFile: (oldPath: string, newPath: string) => void; + appendToFile: (targetPath: string, content: string) => void; + + initReadingFile: (path: string) => void; + lineIter: () => AsyncIterable; + endReadingFile: () => void; +} + +export interface CustomFileSystemEntry { + isDirectory: () => boolean; + getName: () => string; +} + +export function basename(str: string) { + return str.slice(str.lastIndexOf(SEPARATOR) + 1); +} + +//TODO: add to adapter, in the browser I think its normalized to / +export const SEPARATOR = '/'; diff --git a/src/converters/obsidian/LocalFileSystemAdapter.ts b/src/converters/obsidian/LocalFileSystemAdapter.ts new file mode 100644 index 0000000..9ed8e08 --- /dev/null +++ b/src/converters/obsidian/LocalFileSystemAdapter.ts @@ -0,0 +1,62 @@ +import { + appendFileSync, + createReadStream, + Dirent, + existsSync, + readdirSync, + readFileSync, + ReadStream, + renameSync, + unlinkSync, +} from 'fs'; +import { resolve } from 'path'; +import { createInterface, Interface } from 'readline'; +import { CustomFileSystemAdapter, CustomFileSystemEntry } from './CustomFileSystemAdapter'; + +export class LocalFileSystemAdapter implements CustomFileSystemAdapter { + private readStream: ReadStream | undefined; + private readlineInterface: Interface | undefined; + + // eslint-disable-next-line @typescript-eslint/no-empty-function + initReadingVault() {} + readDirectory(dir: string) { + return readdirSync(dir, { withFileTypes: true }).map(toEntry); + } + readFile(file: string) { + return readFileSync(file, 'utf-8'); + } + exists(path: string) { + return existsSync(path); + } + resolve(path: string) { + return resolve(path); + } + resolveInDir(dir: string, name: string) { + return resolve(dir, name); + } + removeFile(targetPath: string) { + unlinkSync(targetPath); + } + renameFile(oldPath: string, newPath: string) { + renameSync(oldPath, newPath); + } + appendToFile(targetPath: string, content: string) { + appendFileSync(targetPath, content); + } + initReadingFile(path: string) { + //the converter is build to append to the file, so we dont want to load the whole file into memory at the end, that would be counter to the whole idea + this.readStream = createReadStream(path, 'utf-8'); + this.readlineInterface = createInterface(this.readStream); + } + lineIter() { + return this.readlineInterface as Interface; + } + endReadingFile() { + this.readlineInterface?.close(); + this.readStream?.close(); + } +} + +function toEntry(dirent: Dirent): CustomFileSystemEntry { + return { isDirectory: dirent.isDirectory.bind(dirent), getName: () => dirent.name }; +} diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index deb2648..636592c 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -1,11 +1,9 @@ -import { appendFileSync, unlinkSync } from 'fs'; -import path from 'path'; -import fs from 'fs'; import { createUnlinkedTanaNodes } from './links/invalidLinks'; import { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion'; import { shiftFromLeafToTop, VaultContext } from './VaultContext'; import { createSuperTagObjects } from './tanafeatures/supertags'; import { postProcessTIFFIle } from './links/headingLinks'; +import { basename } from './CustomFileSystemAdapter'; /** * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults. @@ -16,15 +14,16 @@ export async function ObsidianVaultConverter(context: VaultContext, today: numbe const targetPath = `${context.vaultPath}.tif.json`; try { - unlinkSync(targetPath); + context.fileSystemAdapter.removeFile(targetPath); // eslint-disable-next-line no-empty } catch (e) {} - appendFileSync(targetPath, '{\n "version": "TanaIntermediateFile V0.1",\n "nodes": [\n'); + context.fileSystemAdapter.appendToFile(targetPath, '{\n "version": "TanaIntermediateFile V0.1",\n "nodes": [\n'); handleVault( + context, context.vaultPath, addParentNodeStart(targetPath, today, context), - addParentNodeEnd(targetPath), + addParentNodeEnd(context, targetPath), addFileNode(targetPath, today, context), ); @@ -35,38 +34,41 @@ export async function ObsidianVaultConverter(context: VaultContext, today: numbe //because the unlinked summary nodes are just created by the converter and have no connection to the rest await postProcessTIFFIle(targetPath, context); - const collectedUnlinkedNodes = createUnlinkedTanaNodes(path.basename(context.vaultPath), today, context); + const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context); if (collectedUnlinkedNodes) { //TODO: summary? - appendFileSync(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2)); + context.fileSystemAdapter.appendToFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2)); } //close vault-node children - appendFileSync(targetPath, '\n ]'); + context.fileSystemAdapter.appendToFile(targetPath, '\n ]'); const superTags = createSuperTagObjects(context.superTagTracker); if (superTags.length > 0) { - appendFileSync(targetPath, ',\n "supertags": \n' + JSON.stringify(superTags, null, 2)); + context.fileSystemAdapter.appendToFile(targetPath, ',\n "supertags": \n' + JSON.stringify(superTags, null, 2)); } if (context.attributes.length > 0) { - appendFileSync(targetPath, ',\n "attributes": \n' + JSON.stringify(context.attributes, null, 2)); + context.fileSystemAdapter.appendToFile( + targetPath, + ',\n "attributes": \n' + JSON.stringify(context.attributes, null, 2), + ); } - appendFileSync(targetPath, ',\n "summary": \n' + JSON.stringify(context.summary, null, 2)); + context.fileSystemAdapter.appendToFile(targetPath, ',\n "summary": \n' + JSON.stringify(context.summary, null, 2)); //close target object - appendFileSync(targetPath, '\n}'); + context.fileSystemAdapter.appendToFile(targetPath, '\n}'); return context.summary; } function loadDailyNotesConfig(context: VaultContext) { - const dailyNotesConfigFile = path.join(context.vaultPath, '/.obsidian/daily-notes.json'); + const dailyNotesConfigFile = context.vaultPath + '/.obsidian/daily-notes.json'; - if (fs.existsSync(dailyNotesConfigFile)) { + if (context.fileSystemAdapter.exists(dailyNotesConfigFile)) { //if file does not exists, daily note config was kept default - const rawjson = fs.readFileSync(dailyNotesConfigFile); + const rawjson = context.fileSystemAdapter.readFile(dailyNotesConfigFile); const dailyNoteConfig = JSON.parse(rawjson.toString()); if (dailyNoteConfig.format) { context.dailyNoteFormat = dailyNoteConfig.format; diff --git a/src/converters/obsidian/VaultContext.ts b/src/converters/obsidian/VaultContext.ts index 9137bcc..960a0d2 100644 --- a/src/converters/obsidian/VaultContext.ts +++ b/src/converters/obsidian/VaultContext.ts @@ -7,6 +7,7 @@ import { SuperTagTracker } from './tanafeatures/supertags'; import { UidRequestType } from './links/internalLinks'; import { IdGenerator } from './utils/IdGenerator'; import { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks'; +import { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter'; export type UidTracker = FileDescMap; @@ -31,6 +32,7 @@ export interface VaultContext { dailyNoteFormat: string; vaultPath: string; idGenerator: IdGenerator; + fileSystemAdapter: CustomFileSystemAdapter; } export function incrementSummary(summary: TanaIntermediateSummary) { @@ -43,8 +45,12 @@ export function shiftFromLeafToTop(summary: TanaIntermediateSummary) { summary.topLevelNodes++; } -export function createVaultContext(vaultPath: string, idGenerator: () => string = randomGenerator): VaultContext { - if (vaultPath.endsWith('/')) { +export function createVaultContext( + vaultPath: string, + fileSystemAdapter: CustomFileSystemAdapter, + idGenerator: () => string = randomGenerator, +): VaultContext { + if (vaultPath.endsWith(SEPARATOR)) { vaultPath = vaultPath.slice(0, -1); } vaultPath = resolve(vaultPath); @@ -58,6 +64,7 @@ export function createVaultContext(vaultPath: string, idGenerator: () => string fields: 0, brokenRefs: 0, }, + fileSystemAdapter, idGenerator, vaultPath, defaultLinkTracker: new FileDescMap(), diff --git a/src/converters/obsidian/links/FileDescMap.ts b/src/converters/obsidian/links/FileDescMap.ts index 24cf979..94ccf37 100644 --- a/src/converters/obsidian/links/FileDescMap.ts +++ b/src/converters/obsidian/links/FileDescMap.ts @@ -1,7 +1,7 @@ -import path from 'path'; +import { basename } from '../CustomFileSystemAdapter'; function isPath(searchStr: string) { - return path.basename(searchStr) !== searchStr; + return basename(searchStr) !== searchStr; } export class FileDescMap extends Map { diff --git a/src/converters/obsidian/links/headingLinks.ts b/src/converters/obsidian/links/headingLinks.ts index 27ff571..75c3aa3 100644 --- a/src/converters/obsidian/links/headingLinks.ts +++ b/src/converters/obsidian/links/headingLinks.ts @@ -1,8 +1,6 @@ import { createTree } from '../utils/createTree'; import { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst'; import { incrementSummary, VaultContext } from '../VaultContext'; -import { createReadStream, appendFileSync, unlinkSync, renameSync } from 'fs'; -import * as readline from 'node:readline/promises'; import { FileDescMap } from './FileDescMap'; //children are sorted like in file, important to detect valid heading links @@ -96,20 +94,19 @@ export async function postProcessTIFFIle(filePath: string, context: VaultContext }); const tempPath = filePath + '_TEMP'; - //the converter is build to append to the file, so we dont want to load the whole file into memory at the end, that would be counter to the whole idea - const readStream = createReadStream(filePath, 'utf-8'); - const readlineInterface = readline.createInterface(readStream); + context.fileSystemAdapter.initReadingFile(filePath); const regExes = validHeadingLinks.map((link) => ({ old: new RegExp(link.old, 'g'), new: link.new, })); - for await (const line of readlineInterface) { + for await (const line of context.fileSystemAdapter.lineIter()) { let updatedLine = line; regExes.forEach((regEx) => { updatedLine = updatedLine.replace(regEx.old, regEx.new); }); - appendFileSync(tempPath, updatedLine); + context.fileSystemAdapter.appendToFile(tempPath, updatedLine); } - unlinkSync(filePath); - renameSync(tempPath, filePath); + context.fileSystemAdapter.endReadingFile(); + context.fileSystemAdapter.removeFile(filePath); + context.fileSystemAdapter.renameFile(tempPath, filePath); } diff --git a/src/converters/obsidian/tanaconversion/vaultConversion.ts b/src/converters/obsidian/tanaconversion/vaultConversion.ts index 7bae454..6f79d49 100644 --- a/src/converters/obsidian/tanaconversion/vaultConversion.ts +++ b/src/converters/obsidian/tanaconversion/vaultConversion.ts @@ -1,15 +1,14 @@ -import { appendFileSync, Dirent, readdirSync, readFileSync } from 'fs'; -import path, { resolve } from 'path'; import { convertObsidianFile } from './fileConversion'; import { VaultContext } from '../VaultContext'; import { untrackedUidRequest } from '../links/genericLinks'; +import { basename, CustomFileSystemEntry, SEPARATOR } from '../CustomFileSystemAdapter'; enum ChildrenPosition { NOT_LAST = 'NOT_LAST', LAST = 'LAST', } -function getChildrenPosition(index: number, dirents: Dirent[]) { +function getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) { if (index === dirents.length - 1) { return ChildrenPosition.LAST; } @@ -17,15 +16,18 @@ function getChildrenPosition(index: number, dirents: Dirent[]) { return ChildrenPosition.NOT_LAST; } -function readFilteredDir(dir: string) { - return readdirSync(dir, { withFileTypes: true }).filter( - (dirent) => - (dirent.isDirectory() && !dirent.name.endsWith('.github') && !dirent.name.endsWith('.obsidian')) || - (!dirent.isDirectory() && dirent.name.endsWith('.md')), - ); +function readFilteredDir(context: VaultContext, dir: string) { + return context.fileSystemAdapter.readDirectory(dir).filter((dirent) => { + const name = dir + SEPARATOR + dirent.getName(); + return ( + (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) || + (!dirent.isDirectory() && name.endsWith('.md')) + ); + }); } export function handleVault( + context: VaultContext, dir: string, handleDirStart: ReturnType, handleDirEnd: ReturnType, @@ -33,12 +35,12 @@ export function handleVault( childrenPosition: ChildrenPosition = ChildrenPosition.LAST, ) { handleDirStart(dir); - const dirents = readFilteredDir(dir); + const dirents = readFilteredDir(context, dir); for (let index = 0; index < dirents.length; index++) { const dirent = dirents[index]; - const res = resolve(dir, dirent.name); + const res = dir + SEPARATOR + dirent.getName(); if (dirent.isDirectory()) { - handleVault(res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents)); + handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents)); } else { handleFile(res, getChildrenPosition(index, dirents)); } @@ -48,9 +50,9 @@ export function handleVault( export function addParentNodeStart(targetPath: string, today: number, context: VaultContext) { return (dir: string) => { - const name = path.basename(dir); + const name = basename(dir); const uid = untrackedUidRequest(context); - appendFileSync( + context.fileSystemAdapter.appendToFile( targetPath, `{ "uid": "${uid}", @@ -64,15 +66,15 @@ export function addParentNodeStart(targetPath: string, today: number, context: V }; } -export function addParentNodeEnd(targetPath: string) { +export function addParentNodeEnd(context: VaultContext, targetPath: string) { return (childrenPosition: ChildrenPosition) => { - appendFileSync( + context.fileSystemAdapter.appendToFile( targetPath, `] }`, ); if (childrenPosition !== ChildrenPosition.LAST) { - appendFileSync(targetPath, ','); + context.fileSystemAdapter.appendToFile(targetPath, ','); } }; } @@ -83,15 +85,15 @@ export function addFileNode(targetPath: string, today: number, context: VaultCon const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3); const fileNode = convertObsidianFile( - path.basename(file).replace('.md', ''), + basename(file).replace('.md', ''), absoluteFilePath, - readFileSync(file, 'utf-8'), + context.fileSystemAdapter.readFile(file), context, today, ); - appendFileSync(targetPath, JSON.stringify(fileNode, null, 2)); + context.fileSystemAdapter.appendToFile(targetPath, JSON.stringify(fileNode, null, 2)); if (childrenPosition !== ChildrenPosition.LAST) { - appendFileSync(targetPath, ','); + context.fileSystemAdapter.appendToFile(targetPath, ','); } }; } diff --git a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts index 32be5d7..07c238a 100644 --- a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts +++ b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts @@ -1,11 +1,16 @@ import { expect, test } from '@jest/globals'; import { readFileSync, unlinkSync } from 'fs'; +import { LocalFileSystemAdapter } from '../LocalFileSystemAdapter'; import { ObsidianVaultConverter } from '../ObsidianVaultConverter'; import { createVaultContext } from '../VaultContext'; import { deterministicGenerator } from './testUtils'; test('obsidian vault converter', async () => { - const context = createVaultContext('./src/converters/obsidian/tests/fixtures/vault', deterministicGenerator()); + const context = createVaultContext( + './src/converters/obsidian/tests/fixtures/vault', + new LocalFileSystemAdapter(), + deterministicGenerator(), + ); await ObsidianVaultConverter(context, 1); const result = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/vault.tif.json', 'utf-8')); // console.log(JSON.stringify(result)); diff --git a/src/converters/obsidian/tests/VaultContext.test.ts b/src/converters/obsidian/tests/VaultContext.test.ts index ceede3c..4dcf423 100644 --- a/src/converters/obsidian/tests/VaultContext.test.ts +++ b/src/converters/obsidian/tests/VaultContext.test.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import { expect, test } from '@jest/globals'; import { getAllInvalidLinks } from '../links/invalidLinks'; import { untrackedUidRequest } from '../links/genericLinks'; @@ -6,7 +7,7 @@ import { deterministicGenerator } from './testUtils'; import { requestUidForLink, requestUidForContentNode } from '../links/internalLinks'; test('VaultContext uid test', () => { - const context = createVaultContext('', deterministicGenerator()); + const context = createVaultContext('', null as any, deterministicGenerator()); expect(requestUidForLink('link', context)).toBe('0'); //no change on second call expect(requestUidForLink('link', context)).toBe('0'); @@ -36,7 +37,7 @@ test('VaultContext uid test', () => { test('VaultContext uid block link test', () => { //first reading the file, then encountering the block ref - const context = createVaultContext('', deterministicGenerator()); + const context = createVaultContext('', null as any, deterministicGenerator()); const [uid, content] = requestUidForContentNode('fileName', 'filePath', 'content ^uid', context); expect(uid).toBe('0'); expect(content).toBe('content'); @@ -59,7 +60,7 @@ test('VaultContext uid block link test', () => { }); test('VaultContext invalid nodes test', () => { - const context = createVaultContext('', deterministicGenerator()); + const context = createVaultContext('', null as any, deterministicGenerator()); //the block link has not been accessed from its source / has not been found - just used requestUidForLink('fileName#^uid', context); expect(getAllInvalidLinks(context)).toStrictEqual([{ uid: '0', link: 'fileName#^uid' }]); diff --git a/src/converters/obsidian/utils/obsidianConfig.ts b/src/converters/obsidian/utils/obsidianConfig.ts deleted file mode 100644 index bd02cac..0000000 --- a/src/converters/obsidian/utils/obsidianConfig.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { readFileSync } from 'fs'; - -function readObsidianConfig(vaultPath: string, configName: string): Record { - return JSON.parse(readFileSync(vaultPath + '/.obsidian/' + configName + '.json', 'utf-8')); -} - -//relative is not supported -const supportedLinkFormates = ['shortest', 'absolute']; -const defaultLinkFormate = 'shortest'; - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function readLinkFormat(vaultPath: string) { - const foundReadStyle = readObsidianConfig(vaultPath, 'app').newLinkFormat ?? defaultLinkFormate; - if (!supportedLinkFormates.includes(foundReadStyle)) { - throw ( - 'Unsupported Link Style detected in the Obsidian configuration. Please choose one of: ' + supportedLinkFormates - ); - } - return foundReadStyle; -} diff --git a/src/runner.ts b/src/runner.ts index 19867c7..fdc2db2 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -7,6 +7,7 @@ import { WorkflowyConverter } from './converters/workflowy'; import { lstatSync } from 'fs'; import { ObsidianVaultConverter } from './converters/obsidian'; import { createVaultContext } from './converters/obsidian/VaultContext'; +import { LocalFileSystemAdapter } from './converters/obsidian/LocalFileSystemAdapter'; const fileType = process.argv[2]; const file = process.argv[3]; @@ -67,7 +68,7 @@ async function handleFolderConversion() { let summary; switch (fileType) { case 'obsidian': - summary = await ObsidianVaultConverter(createVaultContext(file)); + summary = await ObsidianVaultConverter(createVaultContext(file, new LocalFileSystemAdapter())); break; default: console.log(`File type ${fileType} is not supported for folders`); From 2c2145a47483d4863d0b9034117efdb636deff79 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Fri, 14 Oct 2022 23:21:54 +0200 Subject: [PATCH 59/94] Obsidian: add web adapter --- package-lock.json | 11688 ---------------- package.json | 2 + .../obsidian/CustomFileSystemAdapter.ts | 29 - .../obsidian/ObsidianVaultConverter.ts | 13 +- src/converters/obsidian/VaultContext.ts | 5 +- .../obsidian/WebObsidianVaultConverter.ts | 18 + .../filesystem/CustomFileSystemAdapter.ts | 37 + .../LocalFileSystemAdapter.ts | 36 +- .../filesystem/WebFileSystemAdapter.ts | 96 + .../obsidian/hierarchy/paragraphs.ts | 10 +- src/converters/obsidian/index.ts | 4 +- src/converters/obsidian/links/FileDescMap.ts | 2 +- src/converters/obsidian/links/headingLinks.ts | 8 +- .../tanaconversion/vaultConversion.ts | 14 +- .../tests/ObsidianVaultConverter.test.ts | 4 +- .../obsidian/tests/VaultContext.test.ts | 9 +- .../tests/WebObsidianVaultConvert.test.ts | 14 + .../obsidian/tests/fixtures/vault.zip | Bin 0 -> 2900 bytes .../obsidian/tests/markdownNodes.test.ts | 5 +- src/runner.ts | 4 +- yarn.lock | 5 + 21 files changed, 241 insertions(+), 11762 deletions(-) delete mode 100644 package-lock.json delete mode 100644 src/converters/obsidian/CustomFileSystemAdapter.ts create mode 100644 src/converters/obsidian/WebObsidianVaultConverter.ts create mode 100644 src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts rename src/converters/obsidian/{ => filesystem}/LocalFileSystemAdapter.ts (72%) create mode 100644 src/converters/obsidian/filesystem/WebFileSystemAdapter.ts create mode 100644 src/converters/obsidian/tests/WebObsidianVaultConvert.test.ts create mode 100644 src/converters/obsidian/tests/fixtures/vault.zip diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index f2ddde9..0000000 --- a/package-lock.json +++ /dev/null @@ -1,11688 +0,0 @@ -{ - "name": "tana-import-tools", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "tana-import-tools", - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "opml": "^0.4.24" - }, - "devDependencies": { - "@babel/preset-env": "^7.18.6", - "@babel/preset-typescript": "^7.18.6", - "@jest/globals": "^28.1.2", - "@types/jest": "^28.1.4", - "@types/node": "^18.8.3", - "@typescript-eslint/eslint-plugin": "^5.32.0", - "@typescript-eslint/parser": "^5.32.0", - "eslint": "^8.21.0", - "jest": "^28.1.2", - "prettier": "^2.7.1", - "typescript": "^4.7.4" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@ampproject/remapping/node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.6.tgz", - "integrity": "sha512-tzulrgDT0QD6U7BJ4TKVk2SDDg7wlP39P9yAx1RfLy7vP/7rsDRlWVfbWxElslu56+r7QOhB2NSDsabYYruoZQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.6.tgz", - "integrity": "sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.6", - "@babel/helper-compilation-targets": "^7.18.6", - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helpers": "^7.18.6", - "@babel/parser": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.6", - "@babel/types": "^7.18.6", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.18.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.7.tgz", - "integrity": "sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.7", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", - "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.6.tgz", - "integrity": "sha512-KT10c1oWEpmrIRYnthbzHgoOf6B+Xd6a5yhdbNtdhtG7aO1or5HViuf1TQR36xY/QprXA5nvxO6nAjhJ4y38jw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-explode-assignable-expression": "^7.18.6", - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz", - "integrity": "sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.18.6", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.20.2", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.6.tgz", - "integrity": "sha512-YfDzdnoxHGV8CzqHGyCbFvXg5QESPFkXlHtvdCkesLjjVMT2Adxe4FGUR5ChIb3DxSaXO12iIOCWoXdsUVwnqw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-function-name": "^7.18.6", - "@babel/helper-member-expression-to-functions": "^7.18.6", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz", - "integrity": "sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "regexpu-core": "^5.1.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz", - "integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-compilation-targets": "^7.13.0", - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/traverse": "^7.13.0", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" - }, - "peerDependencies": { - "@babel/core": "^7.4.0-0" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz", - "integrity": "sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-explode-assignable-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", - "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz", - "integrity": "sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.18.6", - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.6.tgz", - "integrity": "sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.6.tgz", - "integrity": "sha512-L//phhB4al5uucwzlimruukHB3jRd5JGClwRMD/ROrVjXfLqovYnvQrK/JK36WYyVwGGO7OD3kMyVTjx+WVPhw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.6", - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", - "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz", - "integrity": "sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.6.tgz", - "integrity": "sha512-z5wbmV55TveUPZlCLZvxWHtrjuJd+8inFhk7DG0WW87/oJuGDcjDiu7HIvGcpf5464L6xKCg3vNkmlVVz9hwyQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-wrap-function": "^7.18.6", - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.18.6.tgz", - "integrity": "sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-member-expression-to-functions": "^7.18.6", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/traverse": "^7.18.6", - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", - "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.6.tgz", - "integrity": "sha512-4KoLhwGS9vGethZpAhYnMejWkX64wsnHPDwvOsKWU6Fg4+AlK2Jz3TyjQLMEPvz+1zemi/WBdkYxCD0bAfIkiw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-wrap-function": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.18.6.tgz", - "integrity": "sha512-I5/LZfozwMNbwr/b1vhhuYD+J/mU+gfGAj5td7l5Rv9WYmH6i3Om69WGKNmlIpsVW/mF6O5bvTKbvDQZVgjqOw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-function-name": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.6", - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.6.tgz", - "integrity": "sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.6", - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.6.tgz", - "integrity": "sha512-uQVSa9jJUe/G/304lXspfWVpKpK4euFLgGiMQFOCpM/bgcAdeoHwi/OQz23O9GK2osz26ZiXRRV9aV+Yl1O8tw==", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", - "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.6.tgz", - "integrity": "sha512-Udgu8ZRgrBrttVz6A0EVL0SJ1z+RLbIeqsu632SA1hf0awEppD6TvdznoH+orIF8wtFFAV/Enmw9Y+9oV8TQcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6", - "@babel/plugin-proposal-optional-chaining": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.13.0" - } - }, - "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.6.tgz", - "integrity": "sha512-WAz4R9bvozx4qwf74M+sfqPMKfSqwM0phxPTR6iJIi8robgzXwkEgmeJG1gEKhm6sDqT/U9aV3lfcqybIpev8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-remap-async-to-generator": "^7.18.6", - "@babel/plugin-syntax-async-generators": "^7.8.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-class-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", - "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-class-static-block": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", - "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-class-static-block": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.12.0" - } - }, - "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", - "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-export-namespace-from": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.6.tgz", - "integrity": "sha512-zr/QcUlUo7GPo6+X1wC98NJADqmy5QTFWWhqeQWiki4XHafJtLl/YMGkmRB2szDD2IYJCCdBTd4ElwhId9T7Xw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-json-strings": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", - "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.6.tgz", - "integrity": "sha512-zMo66azZth/0tVd7gmkxOkOjs2rpHyhpcFo565PUP37hSp6hSd9uUKIfTDFMz58BwqgQKhJ9YxtM5XddjXVn+Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", - "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", - "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.6.tgz", - "integrity": "sha512-9yuM6wr4rIsKa1wlUAbZEazkCrgw2sMPEXCr4Rnwetu7cEW1NydkCWytLuYletbf8vFxdJxFhwEZqMpOx2eZyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.18.6", - "@babel/helper-compilation-targets": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", - "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.6.tgz", - "integrity": "sha512-PatI6elL5eMzoypFAiYDpYQyMtXTn+iMhuxxQt5mAXD4fEmKorpSI3PHd+i3JXBJN3xyA6MvJv7at23HffFHwA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", - "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", - "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", - "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz", - "integrity": "sha512-/DU3RXad9+bZwrgWJQKbr39gYbJpLJHezqEzRzi/BHRlJ9zsQb4CK2CA/5apllXNomwA1qHwzvHl+AdEmC5krQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz", - "integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz", - "integrity": "sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-remap-async-to-generator": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", - "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.6.tgz", - "integrity": "sha512-pRqwb91C42vs1ahSAWJkxOxU1RHWDn16XAa6ggQ72wjLlWyYeAcLvTtE0aM8ph3KNydy9CQF2nLYcjq1WysgxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-classes": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.6.tgz", - "integrity": "sha512-XTg8XW/mKpzAF3actL554Jl/dOYoJtv3l8fxaEczpgz84IeeVf+T1u2CSvPHuZbt0w3JkIx4rdn/MRQI7mo0HQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-function-name": "^7.18.6", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.6.tgz", - "integrity": "sha512-9repI4BhNrR0KenoR9vm3/cIc1tSBIo+u1WVjKCAynahj25O8zfbiE6JtAtHPGQSs4yZ+bA8mRasRP+qc+2R5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.6.tgz", - "integrity": "sha512-tgy3u6lRp17ilY8r1kP4i2+HDUwxlVqq3RTc943eAWSzGgpU1qhiKpqZ5CMyHReIYPHdo3Kg8v8edKtDqSVEyQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", - "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.6.tgz", - "integrity": "sha512-NJU26U/208+sxYszf82nmGYqVF9QN8py2HFTblPT9hbawi8+1C5a9JubODLTGFuT0qlkqVinmkwOD13s0sZktg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", - "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-for-of": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.6.tgz", - "integrity": "sha512-WAjoMf4wIiSsy88KmG7tgj2nFdEK7E46tArVtcgED7Bkj6Fg/tG5SbvNIOKxbFS2VFgNh6+iaPswBeQZm4ox8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-function-name": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.6.tgz", - "integrity": "sha512-kJha/Gbs5RjzIu0CxZwf5e3aTTSlhZnHMT8zPWnJMjNpLOUgqevg+PN5oMH68nMCXnfiMo4Bhgxqj59KHTlAnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-compilation-targets": "^7.18.6", - "@babel/helper-function-name": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.6.tgz", - "integrity": "sha512-x3HEw0cJZVDoENXOp20HlypIHfl0zMIhMVZEBVTfmqbObIpsMxMbmU5nOEO8R7LYT+z5RORKPlTI5Hj4OsO9/Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", - "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz", - "integrity": "sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz", - "integrity": "sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.6.tgz", - "integrity": "sha512-UbPYpXxLjTw6w6yXX2BYNxF3p6QY225wcTkfQCy3OMnSlS/C3xGtwUjEzGkldb/sy6PWLiCQ3NbYfjWUTI3t4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", - "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz", - "integrity": "sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-new-target": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", - "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-super": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", - "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-parameters": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.6.tgz", - "integrity": "sha512-FjdqgMv37yVl/gwvzkcB+wfjRI8HQmc5EgOG9iGNvUY1ok+TjsoaMP7IqCDZBhkFcM5f3OPVMs6Dmp03C5k4/A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", - "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", - "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "regenerator-transform": "^0.15.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", - "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", - "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-spread": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.6.tgz", - "integrity": "sha512-ayT53rT/ENF8WWexIRg9AiV9h0aIteyWn5ptfZTZQrjk/+f3WdrJGCY4c9wcgl2+MKkKPhzbYp97FTsquZpDCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", - "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.6.tgz", - "integrity": "sha512-UuqlRrQmT2SWRvahW46cGSany0uTlcj8NYOS5sRGYi8FxPYPoLd5DDmMd32ZXEj2Jq+06uGVQKHxa/hJx2EzKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.6.tgz", - "integrity": "sha512-7m71iS/QhsPk85xSjFPovHPcH3H9qeyzsujhTc+vcdnsXavoWYJ74zx0lP5RhpC5+iDnVLO+PPMHzC11qels1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.6.tgz", - "integrity": "sha512-ijHNhzIrLj5lQCnI6aaNVRtGVuUZhOXFLRVFs7lLrkXTHip4FKty5oAuQdk4tywG0/WjXmjTfQCWmuzrvFer1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-typescript": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.6.tgz", - "integrity": "sha512-XNRwQUXYMP7VLuy54cr/KS/WeL3AZeORhrmeZ7iewgu+X2eBqmpaLI/hzqr9ZxCeUoq0ASK4GUzSM0BDhZkLFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", - "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-env": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.6.tgz", - "integrity": "sha512-WrthhuIIYKrEFAwttYzgRNQ5hULGmwTj+D6l7Zdfsv5M7IWV/OZbUfbeL++Qrzx1nVJwWROIFhCHRYQV4xbPNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.18.6", - "@babel/helper-compilation-targets": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-validator-option": "^7.18.6", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.6", - "@babel/plugin-proposal-async-generator-functions": "^7.18.6", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-class-static-block": "^7.18.6", - "@babel/plugin-proposal-dynamic-import": "^7.18.6", - "@babel/plugin-proposal-export-namespace-from": "^7.18.6", - "@babel/plugin-proposal-json-strings": "^7.18.6", - "@babel/plugin-proposal-logical-assignment-operators": "^7.18.6", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", - "@babel/plugin-proposal-numeric-separator": "^7.18.6", - "@babel/plugin-proposal-object-rest-spread": "^7.18.6", - "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", - "@babel/plugin-proposal-optional-chaining": "^7.18.6", - "@babel/plugin-proposal-private-methods": "^7.18.6", - "@babel/plugin-proposal-private-property-in-object": "^7.18.6", - "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.18.6", - "@babel/plugin-transform-async-to-generator": "^7.18.6", - "@babel/plugin-transform-block-scoped-functions": "^7.18.6", - "@babel/plugin-transform-block-scoping": "^7.18.6", - "@babel/plugin-transform-classes": "^7.18.6", - "@babel/plugin-transform-computed-properties": "^7.18.6", - "@babel/plugin-transform-destructuring": "^7.18.6", - "@babel/plugin-transform-dotall-regex": "^7.18.6", - "@babel/plugin-transform-duplicate-keys": "^7.18.6", - "@babel/plugin-transform-exponentiation-operator": "^7.18.6", - "@babel/plugin-transform-for-of": "^7.18.6", - "@babel/plugin-transform-function-name": "^7.18.6", - "@babel/plugin-transform-literals": "^7.18.6", - "@babel/plugin-transform-member-expression-literals": "^7.18.6", - "@babel/plugin-transform-modules-amd": "^7.18.6", - "@babel/plugin-transform-modules-commonjs": "^7.18.6", - "@babel/plugin-transform-modules-systemjs": "^7.18.6", - "@babel/plugin-transform-modules-umd": "^7.18.6", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.18.6", - "@babel/plugin-transform-new-target": "^7.18.6", - "@babel/plugin-transform-object-super": "^7.18.6", - "@babel/plugin-transform-parameters": "^7.18.6", - "@babel/plugin-transform-property-literals": "^7.18.6", - "@babel/plugin-transform-regenerator": "^7.18.6", - "@babel/plugin-transform-reserved-words": "^7.18.6", - "@babel/plugin-transform-shorthand-properties": "^7.18.6", - "@babel/plugin-transform-spread": "^7.18.6", - "@babel/plugin-transform-sticky-regex": "^7.18.6", - "@babel/plugin-transform-template-literals": "^7.18.6", - "@babel/plugin-transform-typeof-symbol": "^7.18.6", - "@babel/plugin-transform-unicode-escapes": "^7.18.6", - "@babel/plugin-transform-unicode-regex": "^7.18.6", - "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.18.6", - "babel-plugin-polyfill-corejs2": "^0.3.1", - "babel-plugin-polyfill-corejs3": "^0.5.2", - "babel-plugin-polyfill-regenerator": "^0.3.1", - "core-js-compat": "^3.22.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-modules": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", - "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz", - "integrity": "sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-validator-option": "^7.18.6", - "@babel/plugin-transform-typescript": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.6.tgz", - "integrity": "sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.13.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz", - "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.6", - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.6.tgz", - "integrity": "sha512-zS/OKyqmD7lslOtFqbscH6gMLFYOfG1YPqCKfAW5KrTeolKqvB8UelR49Fpr6y93kYkW2Ik00mT1LOGiAGvizw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-function-name": "^7.18.6", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.6", - "@babel/types": "^7.18.6", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.18.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.7.tgz", - "integrity": "sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.3.2", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", - "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", - "dev": true, - "license": "Apache-2.0", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.1.tgz", - "integrity": "sha512-0RiUocPVFEm3WRMOStIHbRWllG6iW6E3/gUPnf4lkrVFyXIIDeCe+vlKeYyFOMhB2EPE6FLFCNADSOOQMaqvyA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^28.1.1", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^28.1.1", - "jest-util": "^28.1.1", - "slash": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/core": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.2.tgz", - "integrity": "sha512-Xo4E+Sb/nZODMGOPt2G3cMmCBqL4/W2Ijwr7/mrXlq4jdJwcFQ/9KrrJZT2adQRk2otVBXXOz1GRQ4Z5iOgvRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^28.1.1", - "@jest/reporters": "^28.1.2", - "@jest/test-result": "^28.1.1", - "@jest/transform": "^28.1.2", - "@jest/types": "^28.1.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^28.0.2", - "jest-config": "^28.1.2", - "jest-haste-map": "^28.1.1", - "jest-message-util": "^28.1.1", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.1", - "jest-resolve-dependencies": "^28.1.2", - "jest-runner": "^28.1.2", - "jest-runtime": "^28.1.2", - "jest-snapshot": "^28.1.2", - "jest-util": "^28.1.1", - "jest-validate": "^28.1.1", - "jest-watcher": "^28.1.1", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.1", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/environment": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.2.tgz", - "integrity": "sha512-I0CR1RUMmOzd0tRpz10oUfaChBWs+/Hrvn5xYhMEF/ZqrDaaeHwS8yDBqEWCrEnkH2g+WE/6g90oBv3nKpcm8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/fake-timers": "^28.1.2", - "@jest/types": "^28.1.1", - "@types/node": "*", - "jest-mock": "^28.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.2.tgz", - "integrity": "sha512-HBzyZBeFBiOelNbBKN0pilWbbrGvwDUwAqMC46NVJmWm8AVkuE58NbG1s7DR4cxFt4U5cVLxofAoHxgvC5MyOw==", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^28.1.1", - "jest-snapshot": "^28.1.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect-utils": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.1.tgz", - "integrity": "sha512-n/ghlvdhCdMI/hTcnn4qV57kQuV9OTsZzH1TTCVARANKhl6hXJqLKUkwX69ftMGpsbpt96SsDD8n8LD2d9+FRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^28.0.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.2.tgz", - "integrity": "sha512-xSYEI7Y0D5FbZN2LsCUj/EKRR1zfQYmGuAUVh6xTqhx7V5JhjgMcK5Pa0iR6WIk0GXiHDe0Ke4A+yERKE9saqg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^28.1.1", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^28.1.1", - "jest-mock": "^28.1.1", - "jest-util": "^28.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.2.tgz", - "integrity": "sha512-cz0lkJVDOtDaYhvT3Fv2U1B6FtBnV+OpEyJCzTHM1fdoTsU4QNLAt/H4RkiwEUU+dL4g/MFsoTuHeT2pvbo4Hg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^28.1.2", - "@jest/expect": "^28.1.2", - "@jest/types": "^28.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.2.tgz", - "integrity": "sha512-/whGLhiwAqeCTmQEouSigUZJPVl7sW8V26EiboImL+UyXznnr1a03/YZ2BX8OlFw0n+Zlwu+EZAITZtaeRTxyA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^28.1.1", - "@jest/test-result": "^28.1.1", - "@jest/transform": "^28.1.2", - "@jest/types": "^28.1.1", - "@jridgewell/trace-mapping": "^0.3.13", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^28.1.1", - "jest-util": "^28.1.1", - "jest-worker": "^28.1.1", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/schemas": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.0.2.tgz", - "integrity": "sha512-YVDJZjd4izeTDkij00vHHAymNXQ6WWsdChFRK86qck6Jpr3DCL5W3Is3vslviRlP+bLuMYRLbdp98amMvqudhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.23.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/source-map": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz", - "integrity": "sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.13", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.1.tgz", - "integrity": "sha512-hPmkugBktqL6rRzwWAtp1JtYT4VHwv8OQ+9lE5Gymj6dHzubI/oJHMUpPOt8NrdVWSrz9S7bHjJUmv2ggFoUNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^28.1.1", - "@jest/types": "^28.1.1", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.1.tgz", - "integrity": "sha512-nuL+dNSVMcWB7OOtgb0EGH5AjO4UBCt68SLP08rwmC+iRhyuJWS9MtZ/MpipxFwKAlHFftbMsydXqWre8B0+XA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^28.1.1", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.1", - "slash": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.2.tgz", - "integrity": "sha512-3o+lKF6iweLeJFHBlMJysdaPbpoMmtbHEFsjzSv37HIq/wWt5ijTeO2Yf7MO5yyczCopD507cNwNLeX8Y/CuIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^28.1.1", - "@jridgewell/trace-mapping": "^0.3.13", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.1", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.1", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/types": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.1.tgz", - "integrity": "sha512-vRXVqSg1VhDnB8bWcmvLzmg0Bt9CRKVgHPXqYwvWMX3TvAjeO+nRuK6+VdTKCtWOvYlmkF/HqNAL/z+N3B53Kw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^28.0.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", - "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@sinclair/typebox": { - "version": "0.23.5", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.23.5.tgz", - "integrity": "sha512-AFBVi/iT4g20DHoujvMH1aEDn8fGJh4xsRGCP6d8RpLPMqsNPvW01Jcn0QysXTsg++/xj25NmJsGyH9xug/wKg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.17.1", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.17.1.tgz", - "integrity": "sha512-kVzjari1s2YVi77D3w1yuvohV2idweYXMCDzqBiVNN63TcDWrIlTVOYpqVrvbbyOE/IyzBoTKF0fdnLPEORFxA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.3.0" - } - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jest": { - "version": "28.1.4", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.4.tgz", - "integrity": "sha512-telv6G5N7zRJiLcI3Rs3o+ipZ28EnE+7EvF0pSrt2pZOMnAVI/f+6/LucDxOvcBcTeTL3JMF744BbVQAVBUQRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-matcher-utils": "^28.0.0", - "pretty-format": "^28.0.0" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "18.8.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.8.3.tgz", - "integrity": "sha512-0os9vz6BpGwxGe9LOhgP/ncvYN5Tx1fNcd2TM3rD/aCGBkysb+ZWpXEocG24h6ZzOi13+VB8HndAQFezsSOw1w==", - "dev": true - }, - "node_modules/@types/prettier": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.6.3.tgz", - "integrity": "sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.32.0.tgz", - "integrity": "sha512-CHLuz5Uz7bHP2WgVlvoZGhf0BvFakBJKAD/43Ty0emn4wXWv5k01ND0C0fHcl/Im8Td2y/7h44E9pca9qAu2ew==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "5.32.0", - "@typescript-eslint/type-utils": "5.32.0", - "@typescript-eslint/utils": "5.32.0", - "debug": "^4.3.4", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.2.0", - "regexpp": "^3.2.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.32.0.tgz", - "integrity": "sha512-IxRtsehdGV9GFQ35IGm5oKKR2OGcazUoiNBxhRV160iF9FoyuXxjY+rIqs1gfnd+4eL98OjeGnMpE7RF/NBb3A==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "5.32.0", - "@typescript-eslint/types": "5.32.0", - "@typescript-eslint/typescript-estree": "5.32.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.32.0.tgz", - "integrity": "sha512-KyAE+tUON0D7tNz92p1uetRqVJiiAkeluvwvZOqBmW9z2XApmk5WSMV9FrzOroAcVxJZB3GfUwVKr98Dr/OjOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.32.0", - "@typescript-eslint/visitor-keys": "5.32.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.32.0.tgz", - "integrity": "sha512-0gSsIhFDduBz3QcHJIp3qRCvVYbqzHg8D6bHFsDMrm0rURYDj+skBK2zmYebdCp+4nrd9VWd13egvhYFJj/wZg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/utils": "5.32.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/types": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.32.0.tgz", - "integrity": "sha512-EBUKs68DOcT/EjGfzywp+f8wG9Zw6gj6BjWu7KV/IYllqKJFPlZlLSYw/PTvVyiRw50t6wVbgv4p9uE2h6sZrQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.32.0.tgz", - "integrity": "sha512-ZVAUkvPk3ITGtCLU5J4atCw9RTxK+SRc6hXqLtllC2sGSeMFWN+YwbiJR9CFrSFJ3w4SJfcWtDwNb/DmUIHdhg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.32.0", - "@typescript-eslint/visitor-keys": "5.32.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.32.0.tgz", - "integrity": "sha512-W7lYIAI5Zlc5K082dGR27Fczjb3Q57ECcXefKU/f0ajM5ToM0P+N9NmJWip8GmGu/g6QISNT+K6KYB+iSHjXCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.32.0", - "@typescript-eslint/types": "5.32.0", - "@typescript-eslint/typescript-estree": "5.32.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.32.0.tgz", - "integrity": "sha512-S54xOHZgfThiZ38/ZGTgB2rqx51CMJ5MCfVT2IplK4Q7hgzGfe0nLzLCcenDnc/cSjP568hdeKfeDcBgqNHD/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.32.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "license": "MIT", - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "license": "Apache-2.0", - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "license": "MIT" - }, - "node_modules/babel-jest": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.2.tgz", - "integrity": "sha512-pfmoo6sh4L/+5/G2OOfQrGJgvH7fTa1oChnuYH2G/6gA+JwDvO8PELwvwnofKBMNrQsam0Wy/Rw+QSrBNewq2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/transform": "^28.1.2", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^28.1.1", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-plugin-dynamic-import-node": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", - "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "object.assign": "^4.1.0" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.1.tgz", - "integrity": "sha512-NovGCy5Hn25uMJSAU8FaHqzs13cFoOI4lhIujiepssjCKRsAo3TA734RDWSGxuFTsUJXerYOqQQodlxgmtqbzw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz", - "integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.13.11", - "@babel/helper-define-polyfill-provider": "^0.3.1", - "semver": "^6.1.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz", - "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.1", - "core-js-compat": "^3.21.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz", - "integrity": "sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-jest": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.1.tgz", - "integrity": "sha512-FCq9Oud0ReTeWtcneYf/48981aTfXYuB9gbU4rBNNJVBSQ6ssv7E6v/qvbBxtOWwZFXjLZwpg+W3q7J6vhH25g==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-plugin-jest-hoist": "^28.1.1", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "license": "BSD-3-Clause", - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.1.tgz", - "integrity": "sha512-Nq8MFCSrnJXSc88yliwlzQe3qNe3VntIjhsArW9IJOEPSHNx23FalwApUVbzAWABLhYJJ7y8AynWI/XM8OdfjQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001359", - "electron-to-chromium": "^1.4.172", - "node-releases": "^2.0.5", - "update-browserslist-db": "^1.0.4" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001363", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001363.tgz", - "integrity": "sha512-HpQhpzTGGPVMnCjIomjt+jvyUu8vNFo3TaDiZ/RcoTrlOq/5+tC8zHdsbgFB6MxmaY+jCpsH09aD80Bb4Ow3Sg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "license": "Apache-2.0" - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/ci-info": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz", - "integrity": "sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==", - "dev": true, - "license": "MIT" - }, - "node_modules/cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", - "dev": true, - "license": "MIT" - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", - "dev": true, - "license": "MIT" - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, - "node_modules/convert-source-map/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "license": "MIT" - }, - "node_modules/core-js-compat": { - "version": "3.23.3", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.23.3.tgz", - "integrity": "sha512-WSzUs2h2vvmKsacLHNTdpyOC9k43AEhcGoFlVgCY4L7aw98oSBKtPL6vD0/TqZjRWRQYdDSLkzZIni4Crbbiqw==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.21.0", - "semver": "7.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/core-js-compat/node_modules/semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/daveutils": { - "version": "0.4.64", - "resolved": "https://registry.npmjs.org/daveutils/-/daveutils-0.4.64.tgz", - "integrity": "sha512-3w41wBnC6t/0ON+MSCk7JvKEzqLkKDMXWLAlPcTVp9YTzXne6MwlgZ2Hgfv3nivIGJ+IhBeC8hD09YdSRciZGw==", - "license": "MIT", - "dependencies": { - "request": "*" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true, - "license": "MIT" - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/diff-sequences": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", - "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "license": "MIT", - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.4.180", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.180.tgz", - "integrity": "sha512-7at5ash3FD9U5gPa3/wPr6OdiZd/zBjvDZaaHBpcqFOFUhZiWnb7stkqk8xUFL9H9nk7Yok5vCCNK8wyC/+f8A==", - "dev": true, - "license": "ISC" - }, - "node_modules/emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz", - "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.10.4", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.3", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "globby": "^11.1.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/espree": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", - "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.1.tgz", - "integrity": "sha512-/AANEwGL0tWBwzLNOvO0yUdy2D52jVdNXppOqswC49sxMN2cPWsGCQdzuIf9tj6hHoBQzNvx75JUYuQAckPo3w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/expect-utils": "^28.1.1", - "jest-get-type": "^28.0.2", - "jest-matcher-utils": "^28.1.1", - "jest-message-util": "^28.1.1", - "jest-util": "^28.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "license": "MIT" - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "engines": [ - "node >=0.6.0" - ], - "license": "MIT" - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fb-watchman": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", - "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", - "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "license": "Apache-2.0", - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true, - "license": "MIT" - }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true, - "license": "MIT" - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true, - "license": "ISC" - }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "license": "ISC", - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "license": "MIT", - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true, - "license": "MIT" - }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-fresh/node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", - "dev": true, - "license": "MIT", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "license": "MIT" - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "license": "MIT" - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", - "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", - "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.2.tgz", - "integrity": "sha512-Tuf05DwLeCh2cfWCQbcz9UxldoDyiR1E9Igaei5khjonKncYdc6LDfynKCEWozK0oLE3GD+xKAo2u8x/0s6GOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^28.1.2", - "@jest/types": "^28.1.1", - "import-local": "^3.0.2", - "jest-cli": "^28.1.2" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.0.2.tgz", - "integrity": "sha512-QX9u+5I2s54ZnGoMEjiM2WeBvJR2J7w/8ZUmH2um/WLAuGAYFQcsVXY9+1YL6k0H/AGUdH8pXUAv6erDqEsvIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "execa": "^5.0.0", - "throat": "^6.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-circus": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.2.tgz", - "integrity": "sha512-E2vdPIJG5/69EMpslFhaA46WkcrN74LI5V/cSJ59L7uS8UNoXbzTxmwhpi9XrIL3zqvMt5T0pl5k2l2u2GwBNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^28.1.2", - "@jest/expect": "^28.1.2", - "@jest/test-result": "^28.1.1", - "@jest/types": "^28.1.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^28.1.1", - "jest-matcher-utils": "^28.1.1", - "jest-message-util": "^28.1.1", - "jest-runtime": "^28.1.2", - "jest-snapshot": "^28.1.2", - "jest-util": "^28.1.1", - "pretty-format": "^28.1.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-cli": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.2.tgz", - "integrity": "sha512-l6eoi5Do/IJUXAFL9qRmDiFpBeEJAnjJb1dcd9i/VWfVWbp3mJhuH50dNtX67Ali4Ecvt4eBkWb4hXhPHkAZTw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^28.1.2", - "@jest/test-result": "^28.1.1", - "@jest/types": "^28.1.1", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^28.1.2", - "jest-util": "^28.1.1", - "jest-validate": "^28.1.1", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-config": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.2.tgz", - "integrity": "sha512-g6EfeRqddVbjPVBVY4JWpUY4IvQoFRIZcv4V36QkqzE0IGhEC/VkugFeBMAeUE7PRgC8KJF0yvJNDeQRbamEVA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^28.1.1", - "@jest/types": "^28.1.1", - "babel-jest": "^28.1.2", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^28.1.2", - "jest-environment-node": "^28.1.2", - "jest-get-type": "^28.0.2", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.1", - "jest-runner": "^28.1.2", - "jest-util": "^28.1.1", - "jest-validate": "^28.1.1", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^28.1.1", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-diff": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", - "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz", - "integrity": "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-each": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.1.tgz", - "integrity": "sha512-A042rqh17ZvEhRceDMi784ppoXR7MWGDEKTXEZXb4svt0eShMZvijGxzKsx+yIjeE8QYmHPrnHiTSQVhN4nqaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^28.1.1", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", - "jest-util": "^28.1.1", - "pretty-format": "^28.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-environment-node": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.2.tgz", - "integrity": "sha512-oYsZz9Qw27XKmOgTtnl0jW7VplJkN2oeof+SwAwKFQacq3CLlG9u4kTGuuLWfvu3J7bVutWlrbEQMOCL/jughw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^28.1.2", - "@jest/fake-timers": "^28.1.2", - "@jest/types": "^28.1.1", - "@types/node": "*", - "jest-mock": "^28.1.1", - "jest-util": "^28.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.1.tgz", - "integrity": "sha512-ZrRSE2o3Ezh7sb1KmeLEZRZ4mgufbrMwolcFHNRSjKZhpLa8TdooXOOFlSwoUzlbVs1t0l7upVRW2K7RWGHzbQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^28.1.1", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.1", - "jest-worker": "^28.1.1", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-leak-detector": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.1.tgz", - "integrity": "sha512-4jvs8V8kLbAaotE+wFR7vfUGf603cwYtFf1/PYEsyX2BAjSzj8hQSVTP6OWzseTl0xL6dyHuKs2JAks7Pfubmw==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", - "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.1.tgz", - "integrity": "sha512-xoDOOT66fLfmTRiqkoLIU7v42mal/SqwDKvfmfiWAdJMSJiU+ozgluO7KbvoAgiwIrrGZsV7viETjc8GNrA/IQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.1", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-mock": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.1.tgz", - "integrity": "sha512-bDCb0FjfsmKweAvE09dZT59IMkzgN0fYBH6t5S45NoJfd2DHkS3ySG2K+hucortryhO3fVuXdlxWcbtIuV/Skw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^28.1.1", - "@types/node": "*" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", - "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.1.tgz", - "integrity": "sha512-/d1UbyUkf9nvsgdBildLe6LAD4DalgkgZcKd0nZ8XUGPyA/7fsnaQIlKVnDiuUXv/IeZhPEDrRJubVSulxrShA==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.1", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^28.1.1", - "jest-validate": "^28.1.1", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.2.tgz", - "integrity": "sha512-OXw4vbOZuyRTBi3tapWBqdyodU+T33ww5cPZORuTWkg+Y8lmsxQlVu3MWtJh6NMlKRTHQetF96yGPv01Ye7Mbg==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-regex-util": "^28.0.2", - "jest-snapshot": "^28.1.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-runner": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.2.tgz", - "integrity": "sha512-6/k3DlAsAEr5VcptCMdhtRhOoYClZQmxnVMZvZ/quvPGRpN7OBQYPIC32tWSgOnbgqLXNs5RAniC+nkdFZpD4A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^28.1.1", - "@jest/environment": "^28.1.2", - "@jest/test-result": "^28.1.1", - "@jest/transform": "^28.1.2", - "@jest/types": "^28.1.1", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "graceful-fs": "^4.2.9", - "jest-docblock": "^28.1.1", - "jest-environment-node": "^28.1.2", - "jest-haste-map": "^28.1.1", - "jest-leak-detector": "^28.1.1", - "jest-message-util": "^28.1.1", - "jest-resolve": "^28.1.1", - "jest-runtime": "^28.1.2", - "jest-util": "^28.1.1", - "jest-watcher": "^28.1.1", - "jest-worker": "^28.1.1", - "source-map-support": "0.5.13", - "throat": "^6.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-runtime": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.2.tgz", - "integrity": "sha512-i4w93OsWzLOeMXSi9epmakb2+3z0AchZtUQVF1hesBmcQQy4vtaql5YdVe9KexdJaVRyPDw8DoBR0j3lYsZVYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^28.1.2", - "@jest/fake-timers": "^28.1.2", - "@jest/globals": "^28.1.2", - "@jest/source-map": "^28.1.2", - "@jest/test-result": "^28.1.1", - "@jest/transform": "^28.1.2", - "@jest/types": "^28.1.1", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.1", - "jest-message-util": "^28.1.1", - "jest-mock": "^28.1.1", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.1", - "jest-snapshot": "^28.1.2", - "jest-util": "^28.1.1", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-snapshot": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.2.tgz", - "integrity": "sha512-wzrieFttZYfLvrCVRJxX+jwML2YTArOUqFpCoSVy1QUapx+LlV9uLbV/mMEhYj4t7aMeE9aSQFHSvV/oNoDAMA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.1.1", - "@jest/transform": "^28.1.2", - "@jest/types": "^28.1.1", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^28.1.1", - "graceful-fs": "^4.2.9", - "jest-diff": "^28.1.1", - "jest-get-type": "^28.0.2", - "jest-haste-map": "^28.1.1", - "jest-matcher-utils": "^28.1.1", - "jest-message-util": "^28.1.1", - "jest-util": "^28.1.1", - "natural-compare": "^1.4.0", - "pretty-format": "^28.1.1", - "semver": "^7.3.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-util": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.1.tgz", - "integrity": "sha512-FktOu7ca1DZSyhPAxgxB6hfh2+9zMoJ7aEQA759Z6p45NuO8mWcqujH+UdHlCm/V6JTWwDztM2ITCzU1ijJAfw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^28.1.1", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-validate": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.1.tgz", - "integrity": "sha512-Kpf6gcClqFCIZ4ti5++XemYJWUPCFUW+N2gknn+KgnDf549iLul3cBuKVe1YcWRlaF8tZV8eJCap0eECOEE3Ug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^28.1.1", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", - "leven": "^3.1.0", - "pretty-format": "^28.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-watcher": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.1.tgz", - "integrity": "sha512-RQIpeZ8EIJMxbQrXpJQYIIlubBnB9imEHsxxE41f54ZwcqWLysL/A0ZcdMirf+XsMn3xfphVQVV4EW0/p7i7Ug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^28.1.1", - "@jest/types": "^28.1.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^28.1.1", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-worker": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.1.tgz", - "integrity": "sha512-Au7slXB08C6h+xbJPp7VIb6U0XX5Kc9uel/WFc6/rcTzGiaVCBRngBExSYuXSLFPULPSYU3cJ3ybS988lNFQhQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "license": "MIT" - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "license": "(AFL-2.1 OR BSD-3-Clause)" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "license": "ISC" - }, - "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "license": "MIT", - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, - "license": "MIT" - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "tmpl": "1.0.5" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, - "license": "MIT" - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-releases": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.5.tgz", - "integrity": "sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "license": "Apache-2.0", - "engines": { - "node": "*" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/opml": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/opml/-/opml-0.4.24.tgz", - "integrity": "sha512-erqjZzWaSNiu2T3x2aRqNZCGj8d23LbGuk4NSHN0DezVX6DrAzOfa71nm4CstSpK+DGUW15M8JsR2/0jivZR2Q==", - "license": "MIT", - "dependencies": { - "daveutils": "*", - "opmltojs": "*", - "request": "*", - "xml2js": "*" - } - }, - "node_modules/opmltojs": { - "version": "0.4.12", - "resolved": "https://registry.npmjs.org/opmltojs/-/opmltojs-0.4.12.tgz", - "integrity": "sha512-7Up14sOqzrAvSIdbU0PUApIf9cY+olzooaWKo4bfe/gQv6QNy7hmy9+z7OtJhs6wCQmVt4uxTxu4+cteYEdHTg==", - "license": "MIT", - "dependencies": { - "daveutils": "*", - "request": "*", - "xml2js": "*" - } - }, - "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "license": "MIT" - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "license": "MIT" - }, - "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true, - "license": "MIT" - }, - "node_modules/regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true, - "license": "MIT" - }, - "node_modules/regenerate-unicode-properties": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", - "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", - "dev": true, - "license": "MIT", - "dependencies": { - "regenerate": "^1.4.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true, - "license": "MIT" - }, - "node_modules/regenerator-transform": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.0.tgz", - "integrity": "sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.8.4" - } - }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/regexpu-core": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.1.0.tgz", - "integrity": "sha512-bb6hk+xWd2PEOkj5It46A16zFMs2mv86Iwpdu94la4S3sJ7C973h2dHpYKwIBGaWSO7cIRJ+UX0IeMaWcO4qwA==", - "dev": true, - "license": "MIT", - "dependencies": { - "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.0.1", - "regjsgen": "^0.6.0", - "regjsparser": "^0.8.2", - "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regjsgen": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", - "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==", - "dev": true, - "license": "MIT" - }, - "node_modules/regjsparser": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", - "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "jsesc": "~0.5.0" - }, - "bin": { - "regjsparser": "bin/parser" - } - }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - } - }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "license": "Apache-2.0", - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT" - }, - "node_modules/sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "license": "ISC" - }, - "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true, - "license": "MIT" - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "license": "MIT", - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-hyperlinks": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", - "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, - "node_modules/throat": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", - "integrity": "sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==", - "dev": true, - "license": "MIT" - }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "license": "BSD-3-Clause", - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "license": "Apache-2.0", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "license": "Unlicense" - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", - "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "unicode-canonical-property-names-ecmascript": "^2.0.0", - "unicode-property-aliases-ecmascript": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", - "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-property-aliases-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", - "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz", - "integrity": "sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "browserslist-lint": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "license": "MIT", - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true, - "license": "MIT" - }, - "node_modules/v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", - "dev": true, - "license": "ISC", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "engines": [ - "node >=0.6.0" - ], - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/verror/node_modules/extsprintf": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz", - "integrity": "sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==", - "engines": [ - "node >=0.6.0" - ], - "license": "MIT" - }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/write-file-atomic": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", - "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" - } - }, - "node_modules/xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", - "license": "MIT", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "license": "MIT", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true, - "license": "ISC" - }, - "node_modules/yargs": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", - "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", - "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - }, - "dependencies": { - "@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", - "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "dependencies": { - "@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - } - } - }, - "@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", - "dev": true, - "requires": { - "@babel/highlight": "^7.18.6" - } - }, - "@babel/compat-data": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.6.tgz", - "integrity": "sha512-tzulrgDT0QD6U7BJ4TKVk2SDDg7wlP39P9yAx1RfLy7vP/7rsDRlWVfbWxElslu56+r7QOhB2NSDsabYYruoZQ==", - "dev": true - }, - "@babel/core": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.6.tgz", - "integrity": "sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ==", - "dev": true, - "requires": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.6", - "@babel/helper-compilation-targets": "^7.18.6", - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helpers": "^7.18.6", - "@babel/parser": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.6", - "@babel/types": "^7.18.6", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" - } - }, - "@babel/generator": { - "version": "7.18.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.7.tgz", - "integrity": "sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A==", - "dev": true, - "requires": { - "@babel/types": "^7.18.7", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - } - }, - "@babel/helper-annotate-as-pure": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", - "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.6.tgz", - "integrity": "sha512-KT10c1oWEpmrIRYnthbzHgoOf6B+Xd6a5yhdbNtdhtG7aO1or5HViuf1TQR36xY/QprXA5nvxO6nAjhJ4y38jw==", - "dev": true, - "requires": { - "@babel/helper-explode-assignable-expression": "^7.18.6", - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-compilation-targets": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz", - "integrity": "sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.18.6", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.20.2", - "semver": "^6.3.0" - } - }, - "@babel/helper-create-class-features-plugin": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.6.tgz", - "integrity": "sha512-YfDzdnoxHGV8CzqHGyCbFvXg5QESPFkXlHtvdCkesLjjVMT2Adxe4FGUR5ChIb3DxSaXO12iIOCWoXdsUVwnqw==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-function-name": "^7.18.6", - "@babel/helper-member-expression-to-functions": "^7.18.6", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6" - } - }, - "@babel/helper-create-regexp-features-plugin": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz", - "integrity": "sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "regexpu-core": "^5.1.0" - } - }, - "@babel/helper-define-polyfill-provider": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz", - "integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==", - "dev": true, - "requires": { - "@babel/helper-compilation-targets": "^7.13.0", - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/traverse": "^7.13.0", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" - } - }, - "@babel/helper-environment-visitor": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz", - "integrity": "sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q==", - "dev": true - }, - "@babel/helper-explode-assignable-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", - "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-function-name": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz", - "integrity": "sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw==", - "dev": true, - "requires": { - "@babel/template": "^7.18.6", - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-member-expression-to-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.6.tgz", - "integrity": "sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-module-transforms": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.6.tgz", - "integrity": "sha512-L//phhB4al5uucwzlimruukHB3jRd5JGClwRMD/ROrVjXfLqovYnvQrK/JK36WYyVwGGO7OD3kMyVTjx+WVPhw==", - "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.6", - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", - "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz", - "integrity": "sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg==", - "dev": true - }, - "@babel/helper-remap-async-to-generator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.6.tgz", - "integrity": "sha512-z5wbmV55TveUPZlCLZvxWHtrjuJd+8inFhk7DG0WW87/oJuGDcjDiu7HIvGcpf5464L6xKCg3vNkmlVVz9hwyQ==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-wrap-function": "^7.18.6", - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-replace-supers": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.18.6.tgz", - "integrity": "sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g==", - "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-member-expression-to-functions": "^7.18.6", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/traverse": "^7.18.6", - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-simple-access": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", - "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.6.tgz", - "integrity": "sha512-4KoLhwGS9vGethZpAhYnMejWkX64wsnHPDwvOsKWU6Fg4+AlK2Jz3TyjQLMEPvz+1zemi/WBdkYxCD0bAfIkiw==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", - "dev": true - }, - "@babel/helper-wrap-function": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.18.6.tgz", - "integrity": "sha512-I5/LZfozwMNbwr/b1vhhuYD+J/mU+gfGAj5td7l5Rv9WYmH6i3Om69WGKNmlIpsVW/mF6O5bvTKbvDQZVgjqOw==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.6", - "@babel/types": "^7.18.6" - } - }, - "@babel/helpers": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.6.tgz", - "integrity": "sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ==", - "dev": true, - "requires": { - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.6", - "@babel/types": "^7.18.6" - } - }, - "@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/parser": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.6.tgz", - "integrity": "sha512-uQVSa9jJUe/G/304lXspfWVpKpK4euFLgGiMQFOCpM/bgcAdeoHwi/OQz23O9GK2osz26ZiXRRV9aV+Yl1O8tw==", - "dev": true - }, - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", - "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.6.tgz", - "integrity": "sha512-Udgu8ZRgrBrttVz6A0EVL0SJ1z+RLbIeqsu632SA1hf0awEppD6TvdznoH+orIF8wtFFAV/Enmw9Y+9oV8TQcw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6", - "@babel/plugin-proposal-optional-chaining": "^7.18.6" - } - }, - "@babel/plugin-proposal-async-generator-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.6.tgz", - "integrity": "sha512-WAz4R9bvozx4qwf74M+sfqPMKfSqwM0phxPTR6iJIi8robgzXwkEgmeJG1gEKhm6sDqT/U9aV3lfcqybIpev8w==", - "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-remap-async-to-generator": "^7.18.6", - "@babel/plugin-syntax-async-generators": "^7.8.4" - } - }, - "@babel/plugin-proposal-class-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", - "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-proposal-class-static-block": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", - "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-class-static-block": "^7.14.5" - } - }, - "@babel/plugin-proposal-dynamic-import": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", - "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - } - }, - "@babel/plugin-proposal-export-namespace-from": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.6.tgz", - "integrity": "sha512-zr/QcUlUo7GPo6+X1wC98NJADqmy5QTFWWhqeQWiki4XHafJtLl/YMGkmRB2szDD2IYJCCdBTd4ElwhId9T7Xw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - } - }, - "@babel/plugin-proposal-json-strings": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", - "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3" - } - }, - "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.6.tgz", - "integrity": "sha512-zMo66azZth/0tVd7gmkxOkOjs2rpHyhpcFo565PUP37hSp6hSd9uUKIfTDFMz58BwqgQKhJ9YxtM5XddjXVn+Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - } - }, - "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", - "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - } - }, - "@babel/plugin-proposal-numeric-separator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", - "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - } - }, - "@babel/plugin-proposal-object-rest-spread": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.6.tgz", - "integrity": "sha512-9yuM6wr4rIsKa1wlUAbZEazkCrgw2sMPEXCr4Rnwetu7cEW1NydkCWytLuYletbf8vFxdJxFhwEZqMpOx2eZyw==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.18.6", - "@babel/helper-compilation-targets": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.18.6" - } - }, - "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", - "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - } - }, - "@babel/plugin-proposal-optional-chaining": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.6.tgz", - "integrity": "sha512-PatI6elL5eMzoypFAiYDpYQyMtXTn+iMhuxxQt5mAXD4fEmKorpSI3PHd+i3JXBJN3xyA6MvJv7at23HffFHwA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - } - }, - "@babel/plugin-proposal-private-methods": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", - "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-proposal-private-property-in-object": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", - "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" - } - }, - "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", - "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } - }, - "@babel/plugin-syntax-import-assertions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz", - "integrity": "sha512-/DU3RXad9+bZwrgWJQKbr39gYbJpLJHezqEzRzi/BHRlJ9zsQb4CK2CA/5apllXNomwA1qHwzvHl+AdEmC5krQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-arrow-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz", - "integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-async-to-generator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz", - "integrity": "sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-remap-async-to-generator": "^7.18.6" - } - }, - "@babel/plugin-transform-block-scoped-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", - "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-block-scoping": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.6.tgz", - "integrity": "sha512-pRqwb91C42vs1ahSAWJkxOxU1RHWDn16XAa6ggQ72wjLlWyYeAcLvTtE0aM8ph3KNydy9CQF2nLYcjq1WysgxQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-classes": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.6.tgz", - "integrity": "sha512-XTg8XW/mKpzAF3actL554Jl/dOYoJtv3l8fxaEczpgz84IeeVf+T1u2CSvPHuZbt0w3JkIx4rdn/MRQI7mo0HQ==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-function-name": "^7.18.6", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "globals": "^11.1.0" - } - }, - "@babel/plugin-transform-computed-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.6.tgz", - "integrity": "sha512-9repI4BhNrR0KenoR9vm3/cIc1tSBIo+u1WVjKCAynahj25O8zfbiE6JtAtHPGQSs4yZ+bA8mRasRP+qc+2R5A==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-destructuring": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.6.tgz", - "integrity": "sha512-tgy3u6lRp17ilY8r1kP4i2+HDUwxlVqq3RTc943eAWSzGgpU1qhiKpqZ5CMyHReIYPHdo3Kg8v8edKtDqSVEyQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-dotall-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", - "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-duplicate-keys": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.6.tgz", - "integrity": "sha512-NJU26U/208+sxYszf82nmGYqVF9QN8py2HFTblPT9hbawi8+1C5a9JubODLTGFuT0qlkqVinmkwOD13s0sZktg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-exponentiation-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", - "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", - "dev": true, - "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-for-of": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.6.tgz", - "integrity": "sha512-WAjoMf4wIiSsy88KmG7tgj2nFdEK7E46tArVtcgED7Bkj6Fg/tG5SbvNIOKxbFS2VFgNh6+iaPswBeQZm4ox8w==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-function-name": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.6.tgz", - "integrity": "sha512-kJha/Gbs5RjzIu0CxZwf5e3aTTSlhZnHMT8zPWnJMjNpLOUgqevg+PN5oMH68nMCXnfiMo4Bhgxqj59KHTlAnA==", - "dev": true, - "requires": { - "@babel/helper-compilation-targets": "^7.18.6", - "@babel/helper-function-name": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.6.tgz", - "integrity": "sha512-x3HEw0cJZVDoENXOp20HlypIHfl0zMIhMVZEBVTfmqbObIpsMxMbmU5nOEO8R7LYT+z5RORKPlTI5Hj4OsO9/Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-member-expression-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", - "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-modules-amd": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz", - "integrity": "sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg==", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "babel-plugin-dynamic-import-node": "^2.3.3" - } - }, - "@babel/plugin-transform-modules-commonjs": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz", - "integrity": "sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q==", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "babel-plugin-dynamic-import-node": "^2.3.3" - } - }, - "@babel/plugin-transform-modules-systemjs": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.6.tgz", - "integrity": "sha512-UbPYpXxLjTw6w6yXX2BYNxF3p6QY225wcTkfQCy3OMnSlS/C3xGtwUjEzGkldb/sy6PWLiCQ3NbYfjWUTI3t4g==", - "dev": true, - "requires": { - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "babel-plugin-dynamic-import-node": "^2.3.3" - } - }, - "@babel/plugin-transform-modules-umd": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", - "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz", - "integrity": "sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-new-target": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", - "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-object-super": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", - "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.6" - } - }, - "@babel/plugin-transform-parameters": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.6.tgz", - "integrity": "sha512-FjdqgMv37yVl/gwvzkcB+wfjRI8HQmc5EgOG9iGNvUY1ok+TjsoaMP7IqCDZBhkFcM5f3OPVMs6Dmp03C5k4/A==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-property-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", - "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-regenerator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", - "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "regenerator-transform": "^0.15.0" - } - }, - "@babel/plugin-transform-reserved-words": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", - "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-shorthand-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", - "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-spread": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.6.tgz", - "integrity": "sha512-ayT53rT/ENF8WWexIRg9AiV9h0aIteyWn5ptfZTZQrjk/+f3WdrJGCY4c9wcgl2+MKkKPhzbYp97FTsquZpDCw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6" - } - }, - "@babel/plugin-transform-sticky-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", - "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-template-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.6.tgz", - "integrity": "sha512-UuqlRrQmT2SWRvahW46cGSany0uTlcj8NYOS5sRGYi8FxPYPoLd5DDmMd32ZXEj2Jq+06uGVQKHxa/hJx2EzKw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-typeof-symbol": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.6.tgz", - "integrity": "sha512-7m71iS/QhsPk85xSjFPovHPcH3H9qeyzsujhTc+vcdnsXavoWYJ74zx0lP5RhpC5+iDnVLO+PPMHzC11qels1g==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.6.tgz", - "integrity": "sha512-ijHNhzIrLj5lQCnI6aaNVRtGVuUZhOXFLRVFs7lLrkXTHip4FKty5oAuQdk4tywG0/WjXmjTfQCWmuzrvFer1w==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-typescript": "^7.18.6" - } - }, - "@babel/plugin-transform-unicode-escapes": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.6.tgz", - "integrity": "sha512-XNRwQUXYMP7VLuy54cr/KS/WeL3AZeORhrmeZ7iewgu+X2eBqmpaLI/hzqr9ZxCeUoq0ASK4GUzSM0BDhZkLFw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-transform-unicode-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", - "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/preset-env": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.6.tgz", - "integrity": "sha512-WrthhuIIYKrEFAwttYzgRNQ5hULGmwTj+D6l7Zdfsv5M7IWV/OZbUfbeL++Qrzx1nVJwWROIFhCHRYQV4xbPNw==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.18.6", - "@babel/helper-compilation-targets": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-validator-option": "^7.18.6", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.6", - "@babel/plugin-proposal-async-generator-functions": "^7.18.6", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-class-static-block": "^7.18.6", - "@babel/plugin-proposal-dynamic-import": "^7.18.6", - "@babel/plugin-proposal-export-namespace-from": "^7.18.6", - "@babel/plugin-proposal-json-strings": "^7.18.6", - "@babel/plugin-proposal-logical-assignment-operators": "^7.18.6", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", - "@babel/plugin-proposal-numeric-separator": "^7.18.6", - "@babel/plugin-proposal-object-rest-spread": "^7.18.6", - "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", - "@babel/plugin-proposal-optional-chaining": "^7.18.6", - "@babel/plugin-proposal-private-methods": "^7.18.6", - "@babel/plugin-proposal-private-property-in-object": "^7.18.6", - "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.18.6", - "@babel/plugin-transform-async-to-generator": "^7.18.6", - "@babel/plugin-transform-block-scoped-functions": "^7.18.6", - "@babel/plugin-transform-block-scoping": "^7.18.6", - "@babel/plugin-transform-classes": "^7.18.6", - "@babel/plugin-transform-computed-properties": "^7.18.6", - "@babel/plugin-transform-destructuring": "^7.18.6", - "@babel/plugin-transform-dotall-regex": "^7.18.6", - "@babel/plugin-transform-duplicate-keys": "^7.18.6", - "@babel/plugin-transform-exponentiation-operator": "^7.18.6", - "@babel/plugin-transform-for-of": "^7.18.6", - "@babel/plugin-transform-function-name": "^7.18.6", - "@babel/plugin-transform-literals": "^7.18.6", - "@babel/plugin-transform-member-expression-literals": "^7.18.6", - "@babel/plugin-transform-modules-amd": "^7.18.6", - "@babel/plugin-transform-modules-commonjs": "^7.18.6", - "@babel/plugin-transform-modules-systemjs": "^7.18.6", - "@babel/plugin-transform-modules-umd": "^7.18.6", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.18.6", - "@babel/plugin-transform-new-target": "^7.18.6", - "@babel/plugin-transform-object-super": "^7.18.6", - "@babel/plugin-transform-parameters": "^7.18.6", - "@babel/plugin-transform-property-literals": "^7.18.6", - "@babel/plugin-transform-regenerator": "^7.18.6", - "@babel/plugin-transform-reserved-words": "^7.18.6", - "@babel/plugin-transform-shorthand-properties": "^7.18.6", - "@babel/plugin-transform-spread": "^7.18.6", - "@babel/plugin-transform-sticky-regex": "^7.18.6", - "@babel/plugin-transform-template-literals": "^7.18.6", - "@babel/plugin-transform-typeof-symbol": "^7.18.6", - "@babel/plugin-transform-unicode-escapes": "^7.18.6", - "@babel/plugin-transform-unicode-regex": "^7.18.6", - "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.18.6", - "babel-plugin-polyfill-corejs2": "^0.3.1", - "babel-plugin-polyfill-corejs3": "^0.5.2", - "babel-plugin-polyfill-regenerator": "^0.3.1", - "core-js-compat": "^3.22.1", - "semver": "^6.3.0" - } - }, - "@babel/preset-modules": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", - "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - } - }, - "@babel/preset-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz", - "integrity": "sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-validator-option": "^7.18.6", - "@babel/plugin-transform-typescript": "^7.18.6" - } - }, - "@babel/runtime": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.6.tgz", - "integrity": "sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@babel/template": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz", - "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.6", - "@babel/types": "^7.18.6" - } - }, - "@babel/traverse": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.6.tgz", - "integrity": "sha512-zS/OKyqmD7lslOtFqbscH6gMLFYOfG1YPqCKfAW5KrTeolKqvB8UelR49Fpr6y93kYkW2Ik00mT1LOGiAGvizw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-function-name": "^7.18.6", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.6", - "@babel/types": "^7.18.6", - "debug": "^4.1.0", - "globals": "^11.1.0" - } - }, - "@babel/types": { - "version": "7.18.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.7.tgz", - "integrity": "sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "to-fast-properties": "^2.0.0" - } - }, - "@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.3.2", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - } - } - }, - "@humanwhocodes/config-array": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", - "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - } - }, - "@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", - "dev": true - }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - } - } - }, - "@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true - }, - "@jest/console": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.1.tgz", - "integrity": "sha512-0RiUocPVFEm3WRMOStIHbRWllG6iW6E3/gUPnf4lkrVFyXIIDeCe+vlKeYyFOMhB2EPE6FLFCNADSOOQMaqvyA==", - "dev": true, - "requires": { - "@jest/types": "^28.1.1", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^28.1.1", - "jest-util": "^28.1.1", - "slash": "^3.0.0" - } - }, - "@jest/core": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.2.tgz", - "integrity": "sha512-Xo4E+Sb/nZODMGOPt2G3cMmCBqL4/W2Ijwr7/mrXlq4jdJwcFQ/9KrrJZT2adQRk2otVBXXOz1GRQ4Z5iOgvRQ==", - "dev": true, - "requires": { - "@jest/console": "^28.1.1", - "@jest/reporters": "^28.1.2", - "@jest/test-result": "^28.1.1", - "@jest/transform": "^28.1.2", - "@jest/types": "^28.1.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^28.0.2", - "jest-config": "^28.1.2", - "jest-haste-map": "^28.1.1", - "jest-message-util": "^28.1.1", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.1", - "jest-resolve-dependencies": "^28.1.2", - "jest-runner": "^28.1.2", - "jest-runtime": "^28.1.2", - "jest-snapshot": "^28.1.2", - "jest-util": "^28.1.1", - "jest-validate": "^28.1.1", - "jest-watcher": "^28.1.1", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.1", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "@jest/environment": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.2.tgz", - "integrity": "sha512-I0CR1RUMmOzd0tRpz10oUfaChBWs+/Hrvn5xYhMEF/ZqrDaaeHwS8yDBqEWCrEnkH2g+WE/6g90oBv3nKpcm8Q==", - "dev": true, - "requires": { - "@jest/fake-timers": "^28.1.2", - "@jest/types": "^28.1.1", - "@types/node": "*", - "jest-mock": "^28.1.1" - } - }, - "@jest/expect": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.2.tgz", - "integrity": "sha512-HBzyZBeFBiOelNbBKN0pilWbbrGvwDUwAqMC46NVJmWm8AVkuE58NbG1s7DR4cxFt4U5cVLxofAoHxgvC5MyOw==", - "dev": true, - "requires": { - "expect": "^28.1.1", - "jest-snapshot": "^28.1.2" - } - }, - "@jest/expect-utils": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.1.tgz", - "integrity": "sha512-n/ghlvdhCdMI/hTcnn4qV57kQuV9OTsZzH1TTCVARANKhl6hXJqLKUkwX69ftMGpsbpt96SsDD8n8LD2d9+FRw==", - "dev": true, - "requires": { - "jest-get-type": "^28.0.2" - } - }, - "@jest/fake-timers": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.2.tgz", - "integrity": "sha512-xSYEI7Y0D5FbZN2LsCUj/EKRR1zfQYmGuAUVh6xTqhx7V5JhjgMcK5Pa0iR6WIk0GXiHDe0Ke4A+yERKE9saqg==", - "dev": true, - "requires": { - "@jest/types": "^28.1.1", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^28.1.1", - "jest-mock": "^28.1.1", - "jest-util": "^28.1.1" - } - }, - "@jest/globals": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.2.tgz", - "integrity": "sha512-cz0lkJVDOtDaYhvT3Fv2U1B6FtBnV+OpEyJCzTHM1fdoTsU4QNLAt/H4RkiwEUU+dL4g/MFsoTuHeT2pvbo4Hg==", - "dev": true, - "requires": { - "@jest/environment": "^28.1.2", - "@jest/expect": "^28.1.2", - "@jest/types": "^28.1.1" - } - }, - "@jest/reporters": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.2.tgz", - "integrity": "sha512-/whGLhiwAqeCTmQEouSigUZJPVl7sW8V26EiboImL+UyXznnr1a03/YZ2BX8OlFw0n+Zlwu+EZAITZtaeRTxyA==", - "dev": true, - "requires": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^28.1.1", - "@jest/test-result": "^28.1.1", - "@jest/transform": "^28.1.2", - "@jest/types": "^28.1.1", - "@jridgewell/trace-mapping": "^0.3.13", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^28.1.1", - "jest-util": "^28.1.1", - "jest-worker": "^28.1.1", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^9.0.1" - } - }, - "@jest/schemas": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.0.2.tgz", - "integrity": "sha512-YVDJZjd4izeTDkij00vHHAymNXQ6WWsdChFRK86qck6Jpr3DCL5W3Is3vslviRlP+bLuMYRLbdp98amMvqudhA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.23.3" - } - }, - "@jest/source-map": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz", - "integrity": "sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.13", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - } - }, - "@jest/test-result": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.1.tgz", - "integrity": "sha512-hPmkugBktqL6rRzwWAtp1JtYT4VHwv8OQ+9lE5Gymj6dHzubI/oJHMUpPOt8NrdVWSrz9S7bHjJUmv2ggFoUNQ==", - "dev": true, - "requires": { - "@jest/console": "^28.1.1", - "@jest/types": "^28.1.1", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - } - }, - "@jest/test-sequencer": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.1.tgz", - "integrity": "sha512-nuL+dNSVMcWB7OOtgb0EGH5AjO4UBCt68SLP08rwmC+iRhyuJWS9MtZ/MpipxFwKAlHFftbMsydXqWre8B0+XA==", - "dev": true, - "requires": { - "@jest/test-result": "^28.1.1", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.1", - "slash": "^3.0.0" - } - }, - "@jest/transform": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.2.tgz", - "integrity": "sha512-3o+lKF6iweLeJFHBlMJysdaPbpoMmtbHEFsjzSv37HIq/wWt5ijTeO2Yf7MO5yyczCopD507cNwNLeX8Y/CuIg==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@jest/types": "^28.1.1", - "@jridgewell/trace-mapping": "^0.3.13", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.1", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.1", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" - } - }, - "@jest/types": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.1.tgz", - "integrity": "sha512-vRXVqSg1VhDnB8bWcmvLzmg0Bt9CRKVgHPXqYwvWMX3TvAjeO+nRuK6+VdTKCtWOvYlmkF/HqNAL/z+N3B53Kw==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", - "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@sinclair/typebox": { - "version": "0.23.5", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.23.5.tgz", - "integrity": "sha512-AFBVi/iT4g20DHoujvMH1aEDn8fGJh4xsRGCP6d8RpLPMqsNPvW01Jcn0QysXTsg++/xj25NmJsGyH9xug/wKg==", - "dev": true - }, - "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", - "dev": true, - "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", - "dev": true, - "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@types/babel__traverse": { - "version": "7.17.1", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.17.1.tgz", - "integrity": "sha512-kVzjari1s2YVi77D3w1yuvohV2idweYXMCDzqBiVNN63TcDWrIlTVOYpqVrvbbyOE/IyzBoTKF0fdnLPEORFxA==", - "dev": true, - "requires": { - "@babel/types": "^7.3.0" - } - }, - "@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", - "dev": true - }, - "@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "*" - } - }, - "@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", - "dev": true, - "requires": { - "@types/istanbul-lib-report": "*" - } - }, - "@types/jest": { - "version": "28.1.4", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.4.tgz", - "integrity": "sha512-telv6G5N7zRJiLcI3Rs3o+ipZ28EnE+7EvF0pSrt2pZOMnAVI/f+6/LucDxOvcBcTeTL3JMF744BbVQAVBUQRA==", - "dev": true, - "requires": { - "jest-matcher-utils": "^28.0.0", - "pretty-format": "^28.0.0" - } - }, - "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true - }, - "@types/node": { - "version": "18.8.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.8.3.tgz", - "integrity": "sha512-0os9vz6BpGwxGe9LOhgP/ncvYN5Tx1fNcd2TM3rD/aCGBkysb+ZWpXEocG24h6ZzOi13+VB8HndAQFezsSOw1w==", - "dev": true - }, - "@types/prettier": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.6.3.tgz", - "integrity": "sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg==", - "dev": true - }, - "@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", - "dev": true - }, - "@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", - "dev": true - }, - "@typescript-eslint/eslint-plugin": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.32.0.tgz", - "integrity": "sha512-CHLuz5Uz7bHP2WgVlvoZGhf0BvFakBJKAD/43Ty0emn4wXWv5k01ND0C0fHcl/Im8Td2y/7h44E9pca9qAu2ew==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "5.32.0", - "@typescript-eslint/type-utils": "5.32.0", - "@typescript-eslint/utils": "5.32.0", - "debug": "^4.3.4", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.2.0", - "regexpp": "^3.2.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "dependencies": { - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, - "@typescript-eslint/parser": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.32.0.tgz", - "integrity": "sha512-IxRtsehdGV9GFQ35IGm5oKKR2OGcazUoiNBxhRV160iF9FoyuXxjY+rIqs1gfnd+4eL98OjeGnMpE7RF/NBb3A==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "5.32.0", - "@typescript-eslint/types": "5.32.0", - "@typescript-eslint/typescript-estree": "5.32.0", - "debug": "^4.3.4" - } - }, - "@typescript-eslint/scope-manager": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.32.0.tgz", - "integrity": "sha512-KyAE+tUON0D7tNz92p1uetRqVJiiAkeluvwvZOqBmW9z2XApmk5WSMV9FrzOroAcVxJZB3GfUwVKr98Dr/OjOg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.32.0", - "@typescript-eslint/visitor-keys": "5.32.0" - } - }, - "@typescript-eslint/type-utils": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.32.0.tgz", - "integrity": "sha512-0gSsIhFDduBz3QcHJIp3qRCvVYbqzHg8D6bHFsDMrm0rURYDj+skBK2zmYebdCp+4nrd9VWd13egvhYFJj/wZg==", - "dev": true, - "requires": { - "@typescript-eslint/utils": "5.32.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/types": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.32.0.tgz", - "integrity": "sha512-EBUKs68DOcT/EjGfzywp+f8wG9Zw6gj6BjWu7KV/IYllqKJFPlZlLSYw/PTvVyiRw50t6wVbgv4p9uE2h6sZrQ==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.32.0.tgz", - "integrity": "sha512-ZVAUkvPk3ITGtCLU5J4atCw9RTxK+SRc6hXqLtllC2sGSeMFWN+YwbiJR9CFrSFJ3w4SJfcWtDwNb/DmUIHdhg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.32.0", - "@typescript-eslint/visitor-keys": "5.32.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "dependencies": { - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, - "@typescript-eslint/utils": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.32.0.tgz", - "integrity": "sha512-W7lYIAI5Zlc5K082dGR27Fczjb3Q57ECcXefKU/f0ajM5ToM0P+N9NmJWip8GmGu/g6QISNT+K6KYB+iSHjXCQ==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.32.0", - "@typescript-eslint/types": "5.32.0", - "@typescript-eslint/typescript-estree": "5.32.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "dependencies": { - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - } - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.32.0.tgz", - "integrity": "sha512-S54xOHZgfThiZ38/ZGTgB2rqx51CMJ5MCfVT2IplK4Q7hgzGfe0nLzLCcenDnc/cSjP568hdeKfeDcBgqNHD/g==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.32.0", - "eslint-visitor-keys": "^3.3.0" - } - }, - "acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "requires": { - "type-fest": "^0.21.3" - }, - "dependencies": { - "type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true - } - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==" - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" - }, - "babel-jest": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.2.tgz", - "integrity": "sha512-pfmoo6sh4L/+5/G2OOfQrGJgvH7fTa1oChnuYH2G/6gA+JwDvO8PELwvwnofKBMNrQsam0Wy/Rw+QSrBNewq2Q==", - "dev": true, - "requires": { - "@jest/transform": "^28.1.2", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^28.1.1", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - } - }, - "babel-plugin-dynamic-import-node": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", - "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", - "dev": true, - "requires": { - "object.assign": "^4.1.0" - } - }, - "babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - } - }, - "babel-plugin-jest-hoist": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.1.tgz", - "integrity": "sha512-NovGCy5Hn25uMJSAU8FaHqzs13cFoOI4lhIujiepssjCKRsAo3TA734RDWSGxuFTsUJXerYOqQQodlxgmtqbzw==", - "dev": true, - "requires": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - } - }, - "babel-plugin-polyfill-corejs2": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz", - "integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.13.11", - "@babel/helper-define-polyfill-provider": "^0.3.1", - "semver": "^6.1.1" - } - }, - "babel-plugin-polyfill-corejs3": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz", - "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==", - "dev": true, - "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.1", - "core-js-compat": "^3.21.0" - } - }, - "babel-plugin-polyfill-regenerator": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz", - "integrity": "sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A==", - "dev": true, - "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.1" - } - }, - "babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", - "dev": true, - "requires": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - } - }, - "babel-preset-jest": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.1.tgz", - "integrity": "sha512-FCq9Oud0ReTeWtcneYf/48981aTfXYuB9gbU4rBNNJVBSQ6ssv7E6v/qvbBxtOWwZFXjLZwpg+W3q7J6vhH25g==", - "dev": true, - "requires": { - "babel-plugin-jest-hoist": "^28.1.1", - "babel-preset-current-node-syntax": "^1.0.0" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browserslist": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.1.tgz", - "integrity": "sha512-Nq8MFCSrnJXSc88yliwlzQe3qNe3VntIjhsArW9IJOEPSHNx23FalwApUVbzAWABLhYJJ7y8AynWI/XM8OdfjQ==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001359", - "electron-to-chromium": "^1.4.172", - "node-releases": "^2.0.5", - "update-browserslist-db": "^1.0.4" - } - }, - "bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "requires": { - "node-int64": "^0.4.0" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30001363", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001363.tgz", - "integrity": "sha512-HpQhpzTGGPVMnCjIomjt+jvyUu8vNFo3TaDiZ/RcoTrlOq/5+tC8zHdsbgFB6MxmaY+jCpsH09aD80Bb4Ow3Sg==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true - }, - "ci-info": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz", - "integrity": "sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==", - "dev": true - }, - "cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", - "dev": true - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true - }, - "collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", - "dev": true - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "core-js-compat": { - "version": "3.23.3", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.23.3.tgz", - "integrity": "sha512-WSzUs2h2vvmKsacLHNTdpyOC9k43AEhcGoFlVgCY4L7aw98oSBKtPL6vD0/TqZjRWRQYdDSLkzZIni4Crbbiqw==", - "dev": true, - "requires": { - "browserslist": "^4.21.0", - "semver": "7.0.0" - }, - "dependencies": { - "semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true - } - } - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "daveutils": { - "version": "0.4.64", - "resolved": "https://registry.npmjs.org/daveutils/-/daveutils-0.4.64.tgz", - "integrity": "sha512-3w41wBnC6t/0ON+MSCk7JvKEzqLkKDMXWLAlPcTVp9YTzXne6MwlgZ2Hgfv3nivIGJ+IhBeC8hD09YdSRciZGw==", - "requires": { - "request": "*" - } - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", - "dev": true - }, - "define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "dev": true, - "requires": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" - }, - "detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true - }, - "diff-sequences": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", - "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", - "dev": true - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "electron-to-chromium": { - "version": "1.4.180", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.180.tgz", - "integrity": "sha512-7at5ash3FD9U5gPa3/wPr6OdiZd/zBjvDZaaHBpcqFOFUhZiWnb7stkqk8xUFL9H9nk7Yok5vCCNK8wyC/+f8A==", - "dev": true - }, - "emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "eslint": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz", - "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", - "dev": true, - "requires": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.10.4", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.3", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "globby": "^11.1.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "dependencies": { - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - } - } - }, - "eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } - } - }, - "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true - }, - "espree": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", - "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", - "dev": true, - "requires": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true - }, - "expect": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.1.tgz", - "integrity": "sha512-/AANEwGL0tWBwzLNOvO0yUdy2D52jVdNXppOqswC49sxMN2cPWsGCQdzuIf9tj6hHoBQzNvx75JUYuQAckPo3w==", - "dev": true, - "requires": { - "@jest/expect-utils": "^28.1.1", - "jest-get-type": "^28.0.2", - "jest-matcher-utils": "^28.1.1", - "jest-message-util": "^28.1.1", - "jest-util": "^28.1.1" - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - } - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "fb-watchman": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", - "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", - "dev": true, - "requires": { - "bser": "2.1.1" - } - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", - "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==" - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - } - }, - "get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==" - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.1" - } - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true - }, - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true - }, - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - } - } - }, - "import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "requires": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" - }, - "istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", - "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", - "dev": true, - "requires": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - } - }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - } - }, - "istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - } - }, - "istanbul-reports": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", - "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", - "dev": true, - "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - } - }, - "jest": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.2.tgz", - "integrity": "sha512-Tuf05DwLeCh2cfWCQbcz9UxldoDyiR1E9Igaei5khjonKncYdc6LDfynKCEWozK0oLE3GD+xKAo2u8x/0s6GOg==", - "dev": true, - "requires": { - "@jest/core": "^28.1.2", - "@jest/types": "^28.1.1", - "import-local": "^3.0.2", - "jest-cli": "^28.1.2" - } - }, - "jest-changed-files": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.0.2.tgz", - "integrity": "sha512-QX9u+5I2s54ZnGoMEjiM2WeBvJR2J7w/8ZUmH2um/WLAuGAYFQcsVXY9+1YL6k0H/AGUdH8pXUAv6erDqEsvIA==", - "dev": true, - "requires": { - "execa": "^5.0.0", - "throat": "^6.0.1" - } - }, - "jest-circus": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.2.tgz", - "integrity": "sha512-E2vdPIJG5/69EMpslFhaA46WkcrN74LI5V/cSJ59L7uS8UNoXbzTxmwhpi9XrIL3zqvMt5T0pl5k2l2u2GwBNQ==", - "dev": true, - "requires": { - "@jest/environment": "^28.1.2", - "@jest/expect": "^28.1.2", - "@jest/test-result": "^28.1.1", - "@jest/types": "^28.1.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^28.1.1", - "jest-matcher-utils": "^28.1.1", - "jest-message-util": "^28.1.1", - "jest-runtime": "^28.1.2", - "jest-snapshot": "^28.1.2", - "jest-util": "^28.1.1", - "pretty-format": "^28.1.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" - } - }, - "jest-cli": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.2.tgz", - "integrity": "sha512-l6eoi5Do/IJUXAFL9qRmDiFpBeEJAnjJb1dcd9i/VWfVWbp3mJhuH50dNtX67Ali4Ecvt4eBkWb4hXhPHkAZTw==", - "dev": true, - "requires": { - "@jest/core": "^28.1.2", - "@jest/test-result": "^28.1.1", - "@jest/types": "^28.1.1", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^28.1.2", - "jest-util": "^28.1.1", - "jest-validate": "^28.1.1", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - } - }, - "jest-config": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.2.tgz", - "integrity": "sha512-g6EfeRqddVbjPVBVY4JWpUY4IvQoFRIZcv4V36QkqzE0IGhEC/VkugFeBMAeUE7PRgC8KJF0yvJNDeQRbamEVA==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^28.1.1", - "@jest/types": "^28.1.1", - "babel-jest": "^28.1.2", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^28.1.2", - "jest-environment-node": "^28.1.2", - "jest-get-type": "^28.0.2", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.1", - "jest-runner": "^28.1.2", - "jest-util": "^28.1.1", - "jest-validate": "^28.1.1", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^28.1.1", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - } - }, - "jest-diff": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", - "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - } - }, - "jest-docblock": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz", - "integrity": "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==", - "dev": true, - "requires": { - "detect-newline": "^3.0.0" - } - }, - "jest-each": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.1.tgz", - "integrity": "sha512-A042rqh17ZvEhRceDMi784ppoXR7MWGDEKTXEZXb4svt0eShMZvijGxzKsx+yIjeE8QYmHPrnHiTSQVhN4nqaw==", - "dev": true, - "requires": { - "@jest/types": "^28.1.1", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", - "jest-util": "^28.1.1", - "pretty-format": "^28.1.1" - } - }, - "jest-environment-node": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.2.tgz", - "integrity": "sha512-oYsZz9Qw27XKmOgTtnl0jW7VplJkN2oeof+SwAwKFQacq3CLlG9u4kTGuuLWfvu3J7bVutWlrbEQMOCL/jughw==", - "dev": true, - "requires": { - "@jest/environment": "^28.1.2", - "@jest/fake-timers": "^28.1.2", - "@jest/types": "^28.1.1", - "@types/node": "*", - "jest-mock": "^28.1.1", - "jest-util": "^28.1.1" - } - }, - "jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true - }, - "jest-haste-map": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.1.tgz", - "integrity": "sha512-ZrRSE2o3Ezh7sb1KmeLEZRZ4mgufbrMwolcFHNRSjKZhpLa8TdooXOOFlSwoUzlbVs1t0l7upVRW2K7RWGHzbQ==", - "dev": true, - "requires": { - "@jest/types": "^28.1.1", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "fsevents": "^2.3.2", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.1", - "jest-worker": "^28.1.1", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - } - }, - "jest-leak-detector": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.1.tgz", - "integrity": "sha512-4jvs8V8kLbAaotE+wFR7vfUGf603cwYtFf1/PYEsyX2BAjSzj8hQSVTP6OWzseTl0xL6dyHuKs2JAks7Pfubmw==", - "dev": true, - "requires": { - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - } - }, - "jest-matcher-utils": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", - "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - } - }, - "jest-message-util": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.1.tgz", - "integrity": "sha512-xoDOOT66fLfmTRiqkoLIU7v42mal/SqwDKvfmfiWAdJMSJiU+ozgluO7KbvoAgiwIrrGZsV7viETjc8GNrA/IQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.1", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-mock": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.1.tgz", - "integrity": "sha512-bDCb0FjfsmKweAvE09dZT59IMkzgN0fYBH6t5S45NoJfd2DHkS3ySG2K+hucortryhO3fVuXdlxWcbtIuV/Skw==", - "dev": true, - "requires": { - "@jest/types": "^28.1.1", - "@types/node": "*" - } - }, - "jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true, - "requires": {} - }, - "jest-regex-util": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", - "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", - "dev": true - }, - "jest-resolve": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.1.tgz", - "integrity": "sha512-/d1UbyUkf9nvsgdBildLe6LAD4DalgkgZcKd0nZ8XUGPyA/7fsnaQIlKVnDiuUXv/IeZhPEDrRJubVSulxrShA==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.1", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^28.1.1", - "jest-validate": "^28.1.1", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - } - }, - "jest-resolve-dependencies": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.2.tgz", - "integrity": "sha512-OXw4vbOZuyRTBi3tapWBqdyodU+T33ww5cPZORuTWkg+Y8lmsxQlVu3MWtJh6NMlKRTHQetF96yGPv01Ye7Mbg==", - "dev": true, - "requires": { - "jest-regex-util": "^28.0.2", - "jest-snapshot": "^28.1.2" - } - }, - "jest-runner": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.2.tgz", - "integrity": "sha512-6/k3DlAsAEr5VcptCMdhtRhOoYClZQmxnVMZvZ/quvPGRpN7OBQYPIC32tWSgOnbgqLXNs5RAniC+nkdFZpD4A==", - "dev": true, - "requires": { - "@jest/console": "^28.1.1", - "@jest/environment": "^28.1.2", - "@jest/test-result": "^28.1.1", - "@jest/transform": "^28.1.2", - "@jest/types": "^28.1.1", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "graceful-fs": "^4.2.9", - "jest-docblock": "^28.1.1", - "jest-environment-node": "^28.1.2", - "jest-haste-map": "^28.1.1", - "jest-leak-detector": "^28.1.1", - "jest-message-util": "^28.1.1", - "jest-resolve": "^28.1.1", - "jest-runtime": "^28.1.2", - "jest-util": "^28.1.1", - "jest-watcher": "^28.1.1", - "jest-worker": "^28.1.1", - "source-map-support": "0.5.13", - "throat": "^6.0.1" - } - }, - "jest-runtime": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.2.tgz", - "integrity": "sha512-i4w93OsWzLOeMXSi9epmakb2+3z0AchZtUQVF1hesBmcQQy4vtaql5YdVe9KexdJaVRyPDw8DoBR0j3lYsZVYw==", - "dev": true, - "requires": { - "@jest/environment": "^28.1.2", - "@jest/fake-timers": "^28.1.2", - "@jest/globals": "^28.1.2", - "@jest/source-map": "^28.1.2", - "@jest/test-result": "^28.1.1", - "@jest/transform": "^28.1.2", - "@jest/types": "^28.1.1", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.1", - "jest-message-util": "^28.1.1", - "jest-mock": "^28.1.1", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.1", - "jest-snapshot": "^28.1.2", - "jest-util": "^28.1.1", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - } - }, - "jest-snapshot": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.2.tgz", - "integrity": "sha512-wzrieFttZYfLvrCVRJxX+jwML2YTArOUqFpCoSVy1QUapx+LlV9uLbV/mMEhYj4t7aMeE9aSQFHSvV/oNoDAMA==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.1.1", - "@jest/transform": "^28.1.2", - "@jest/types": "^28.1.1", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^28.1.1", - "graceful-fs": "^4.2.9", - "jest-diff": "^28.1.1", - "jest-get-type": "^28.0.2", - "jest-haste-map": "^28.1.1", - "jest-matcher-utils": "^28.1.1", - "jest-message-util": "^28.1.1", - "jest-util": "^28.1.1", - "natural-compare": "^1.4.0", - "pretty-format": "^28.1.1", - "semver": "^7.3.5" - }, - "dependencies": { - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, - "jest-util": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.1.tgz", - "integrity": "sha512-FktOu7ca1DZSyhPAxgxB6hfh2+9zMoJ7aEQA759Z6p45NuO8mWcqujH+UdHlCm/V6JTWwDztM2ITCzU1ijJAfw==", - "dev": true, - "requires": { - "@jest/types": "^28.1.1", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "jest-validate": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.1.tgz", - "integrity": "sha512-Kpf6gcClqFCIZ4ti5++XemYJWUPCFUW+N2gknn+KgnDf549iLul3cBuKVe1YcWRlaF8tZV8eJCap0eECOEE3Ug==", - "dev": true, - "requires": { - "@jest/types": "^28.1.1", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", - "leven": "^3.1.0", - "pretty-format": "^28.1.1" - } - }, - "jest-watcher": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.1.tgz", - "integrity": "sha512-RQIpeZ8EIJMxbQrXpJQYIIlubBnB9imEHsxxE41f54ZwcqWLysL/A0ZcdMirf+XsMn3xfphVQVV4EW0/p7i7Ug==", - "dev": true, - "requires": { - "@jest/test-result": "^28.1.1", - "@jest/types": "^28.1.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^28.1.1", - "string-length": "^4.0.1" - } - }, - "jest-worker": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.1.tgz", - "integrity": "sha512-Au7slXB08C6h+xbJPp7VIb6U0XX5Kc9uel/WFc6/rcTzGiaVCBRngBExSYuXSLFPULPSYU3cJ3ybS988lNFQhQ==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "dependencies": { - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" - }, - "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", - "dev": true - }, - "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true - }, - "leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "requires": { - "tmpl": "1.0.5" - } - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "requires": { - "mime-db": "1.52.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true - }, - "node-releases": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.5.tgz", - "integrity": "sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q==", - "dev": true - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "opml": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/opml/-/opml-0.4.24.tgz", - "integrity": "sha512-erqjZzWaSNiu2T3x2aRqNZCGj8d23LbGuk4NSHN0DezVX6DrAzOfa71nm4CstSpK+DGUW15M8JsR2/0jivZR2Q==", - "requires": { - "daveutils": "*", - "opmltojs": "*", - "request": "*", - "xml2js": "*" - } - }, - "opmltojs": { - "version": "0.4.12", - "resolved": "https://registry.npmjs.org/opmltojs/-/opmltojs-0.4.12.tgz", - "integrity": "sha512-7Up14sOqzrAvSIdbU0PUApIf9cY+olzooaWKo4bfe/gQv6QNy7hmy9+z7OtJhs6wCQmVt4uxTxu4+cteYEdHTg==", - "requires": { - "daveutils": "*", - "request": "*", - "xml2js": "*" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", - "dev": true - }, - "pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "requires": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - } - }, - "psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true - }, - "regenerate-unicode-properties": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", - "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", - "dev": true, - "requires": { - "regenerate": "^1.4.2" - } - }, - "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true - }, - "regenerator-transform": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.0.tgz", - "integrity": "sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.8.4" - } - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, - "regexpu-core": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.1.0.tgz", - "integrity": "sha512-bb6hk+xWd2PEOkj5It46A16zFMs2mv86Iwpdu94la4S3sJ7C973h2dHpYKwIBGaWSO7cIRJ+UX0IeMaWcO4qwA==", - "dev": true, - "requires": { - "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.0.1", - "regjsgen": "^0.6.0", - "regjsparser": "^0.8.2", - "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.0.0" - } - }, - "regjsgen": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", - "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==", - "dev": true - }, - "regjsparser": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", - "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", - "dev": true - } - } - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true - }, - "resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "requires": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "requires": { - "resolve-from": "^5.0.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - }, - "resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", - "dev": true - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", - "dev": true, - "requires": { - "escape-string-regexp": "^2.0.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true - } - } - }, - "string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "requires": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - } - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "supports-hyperlinks": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", - "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", - "dev": true, - "requires": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - } - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, - "terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - } - }, - "test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "requires": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "throat": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", - "integrity": "sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==", - "dev": true - }, - "tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, - "typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", - "dev": true - }, - "unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", - "dev": true - }, - "unicode-match-property-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", - "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", - "dev": true, - "requires": { - "unicode-canonical-property-names-ecmascript": "^2.0.0", - "unicode-property-aliases-ecmascript": "^2.0.0" - } - }, - "unicode-match-property-value-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", - "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", - "dev": true - }, - "unicode-property-aliases-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", - "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", - "dev": true - }, - "update-browserslist-db": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz", - "integrity": "sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==", - "dev": true, - "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" - } - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - }, - "dependencies": { - "extsprintf": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz", - "integrity": "sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==" - } - } - }, - "walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "requires": { - "makeerror": "1.0.12" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "write-file-atomic": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", - "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - } - }, - "xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - } - }, - "xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "yargs": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", - "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - } - }, - "yargs-parser": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", - "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", - "dev": true - }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true - } - } -} diff --git a/package.json b/package.json index ca59f4e..1048e3f 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "convert:roam": "yarn build && node --experimental-modules --es-module-specifier-resolution=node dist/runner.js roam", "convert:workflowy": "yarn build && node --experimental-modules --es-module-specifier-resolution=node dist/runner.js workflowy", "convert:obsidian": "yarn build && node --experimental-modules --es-module-specifier-resolution=node dist/runner.js obsidian", + "zip": "cd ./src/converters/obsidian/tests/fixtures/ && zip -r vault.zip vault && cd -", "test": "jest" }, "devDependencies": { @@ -34,6 +35,7 @@ "typescript": "^4.7.4" }, "dependencies": { + "@zip.js/zip.js": "^2.6.43", "moment": "^2.29.4", "opml": "^0.4.24" }, diff --git a/src/converters/obsidian/CustomFileSystemAdapter.ts b/src/converters/obsidian/CustomFileSystemAdapter.ts deleted file mode 100644 index 64b8113..0000000 --- a/src/converters/obsidian/CustomFileSystemAdapter.ts +++ /dev/null @@ -1,29 +0,0 @@ -export interface CustomFileSystemAdapter { - initReadingVault: () => void; - readDirectory: (dir: string) => CustomFileSystemEntry[]; - readFile: (file: string) => string; - exists: (path: string) => boolean; - - resolve: (path: string) => string; - resolveInDir: (dir: string, name: string) => string; - - removeFile: (targetPath: string) => void; - renameFile: (oldPath: string, newPath: string) => void; - appendToFile: (targetPath: string, content: string) => void; - - initReadingFile: (path: string) => void; - lineIter: () => AsyncIterable; - endReadingFile: () => void; -} - -export interface CustomFileSystemEntry { - isDirectory: () => boolean; - getName: () => string; -} - -export function basename(str: string) { - return str.slice(str.lastIndexOf(SEPARATOR) + 1); -} - -//TODO: add to adapter, in the browser I think its normalized to / -export const SEPARATOR = '/'; diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index 636592c..fc5bdf0 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -3,23 +3,26 @@ import { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from ' import { shiftFromLeafToTop, VaultContext } from './VaultContext'; import { createSuperTagObjects } from './tanafeatures/supertags'; import { postProcessTIFFIle } from './links/headingLinks'; -import { basename } from './CustomFileSystemAdapter'; +import { basename } from './filesystem/CustomFileSystemAdapter'; /** * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults. * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly. */ export async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) { - loadDailyNotesConfig(context); + await context.fileSystemAdapter.initReadingVault(); + + await loadDailyNotesConfig(context); const targetPath = `${context.vaultPath}.tif.json`; try { context.fileSystemAdapter.removeFile(targetPath); // eslint-disable-next-line no-empty } catch (e) {} + context.fileSystemAdapter.appendToFile(targetPath, '{\n "version": "TanaIntermediateFile V0.1",\n "nodes": [\n'); - handleVault( + await handleVault( context, context.vaultPath, addParentNodeStart(targetPath, today, context), @@ -63,12 +66,12 @@ export async function ObsidianVaultConverter(context: VaultContext, today: numbe return context.summary; } -function loadDailyNotesConfig(context: VaultContext) { +async function loadDailyNotesConfig(context: VaultContext) { const dailyNotesConfigFile = context.vaultPath + '/.obsidian/daily-notes.json'; if (context.fileSystemAdapter.exists(dailyNotesConfigFile)) { //if file does not exists, daily note config was kept default - const rawjson = context.fileSystemAdapter.readFile(dailyNotesConfigFile); + const rawjson = await context.fileSystemAdapter.readFile(dailyNotesConfigFile); const dailyNoteConfig = JSON.parse(rawjson.toString()); if (dailyNoteConfig.format) { context.dailyNoteFormat = dailyNoteConfig.format; diff --git a/src/converters/obsidian/VaultContext.ts b/src/converters/obsidian/VaultContext.ts index 960a0d2..6e3a8db 100644 --- a/src/converters/obsidian/VaultContext.ts +++ b/src/converters/obsidian/VaultContext.ts @@ -1,4 +1,3 @@ -import { resolve } from 'path'; import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types'; import { idgenerator as randomGenerator } from '../../utils/utils'; import { FileDescMap } from './links/FileDescMap'; @@ -7,7 +6,7 @@ import { SuperTagTracker } from './tanafeatures/supertags'; import { UidRequestType } from './links/internalLinks'; import { IdGenerator } from './utils/IdGenerator'; import { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks'; -import { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter'; +import { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter'; export type UidTracker = FileDescMap; @@ -53,7 +52,7 @@ export function createVaultContext( if (vaultPath.endsWith(SEPARATOR)) { vaultPath = vaultPath.slice(0, -1); } - vaultPath = resolve(vaultPath); + vaultPath = fileSystemAdapter.resolve(vaultPath); return { summary: { diff --git a/src/converters/obsidian/WebObsidianVaultConverter.ts b/src/converters/obsidian/WebObsidianVaultConverter.ts new file mode 100644 index 0000000..7ec0eec --- /dev/null +++ b/src/converters/obsidian/WebObsidianVaultConverter.ts @@ -0,0 +1,18 @@ +import { TanaIntermediateSummary } from '../../types/types'; +import { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter'; +import { ObsidianVaultConverter } from './ObsidianVaultConverter'; +import { IdGenerator } from './utils/IdGenerator'; +import { createVaultContext, VaultContext } from './VaultContext'; + +export async function WebObsidianVaultConverter( + zipBlob: Blob, + vaultName: string, + today: number, + idGenerator?: IdGenerator, +): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> { + const adapter = new WebFileSystemAdapter(zipBlob); + const context = createVaultContext(vaultName, adapter, idGenerator); + return ObsidianVaultConverter(context, today).then((summary) => { + return [summary, context, adapter]; + }); +} diff --git a/src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts b/src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts new file mode 100644 index 0000000..988313d --- /dev/null +++ b/src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts @@ -0,0 +1,37 @@ +export interface CustomFileSystemAdapter { + initReadingVault: () => Promise; + readDirectory: (dir: string) => CustomFileSystemEntry[]; + readFile: (file: string) => Promise; + exists: (path: string) => boolean; + + resolve: (path: string) => string; + resolveInDir: (dir: string, name: string) => string; + + removeFile: (targetPath: string) => void; + renameFile: (oldPath: string, newPath: string) => void; + appendToFile: (targetPath: string, chunk: string) => void; + appendToPostProcessingFile: (targetPath: string, chunk: string) => void; + + initReadingResultFile: (path: string) => void; + /** + * Return an iterable to read chunks from the already written file. + * + * Local the chunks are lines. Online the chunks are the same chunks that where written. + */ + chunkIter: () => AsyncIterable; + endPostProcessingFile: () => void; +} + +export interface CustomFileSystemEntry { + isDirectory: () => boolean; + getName: () => string; +} + +//TODO: add to adapter +export function basename(str: string) { + return str.slice(str.lastIndexOf(SEPARATOR) + 1); +} + +//TODO: add "join" method to adapter +//in the browser I think its normalized to / but not on every os +export const SEPARATOR = '/'; diff --git a/src/converters/obsidian/LocalFileSystemAdapter.ts b/src/converters/obsidian/filesystem/LocalFileSystemAdapter.ts similarity index 72% rename from src/converters/obsidian/LocalFileSystemAdapter.ts rename to src/converters/obsidian/filesystem/LocalFileSystemAdapter.ts index 9ed8e08..a3b0908 100644 --- a/src/converters/obsidian/LocalFileSystemAdapter.ts +++ b/src/converters/obsidian/filesystem/LocalFileSystemAdapter.ts @@ -4,11 +4,11 @@ import { Dirent, existsSync, readdirSync, - readFileSync, ReadStream, renameSync, unlinkSync, } from 'fs'; +import { readFile } from 'fs/promises'; import { resolve } from 'path'; import { createInterface, Interface } from 'readline'; import { CustomFileSystemAdapter, CustomFileSystemEntry } from './CustomFileSystemAdapter'; @@ -17,46 +17,62 @@ export class LocalFileSystemAdapter implements CustomFileSystemAdapter { private readStream: ReadStream | undefined; private readlineInterface: Interface | undefined; - // eslint-disable-next-line @typescript-eslint/no-empty-function - initReadingVault() {} + initReadingVault() { + return Promise.resolve(); + } + readDirectory(dir: string) { - return readdirSync(dir, { withFileTypes: true }).map(toEntry); + return readdirSync(dir, { withFileTypes: true }).map((dirent) => toEntry(dir, dirent)); } + readFile(file: string) { - return readFileSync(file, 'utf-8'); + return readFile(file, 'utf-8'); } + exists(path: string) { return existsSync(path); } + resolve(path: string) { return resolve(path); } + resolveInDir(dir: string, name: string) { return resolve(dir, name); } + removeFile(targetPath: string) { unlinkSync(targetPath); } + renameFile(oldPath: string, newPath: string) { renameSync(oldPath, newPath); } + appendToFile(targetPath: string, content: string) { appendFileSync(targetPath, content); } - initReadingFile(path: string) { + + appendToPostProcessingFile(targetPath: string, content: string) { + return this.appendToFile(targetPath, content); + } + + initReadingResultFile(path: string) { //the converter is build to append to the file, so we dont want to load the whole file into memory at the end, that would be counter to the whole idea this.readStream = createReadStream(path, 'utf-8'); this.readlineInterface = createInterface(this.readStream); } - lineIter() { + + chunkIter() { return this.readlineInterface as Interface; } - endReadingFile() { + + endPostProcessingFile() { this.readlineInterface?.close(); this.readStream?.close(); } } -function toEntry(dirent: Dirent): CustomFileSystemEntry { - return { isDirectory: dirent.isDirectory.bind(dirent), getName: () => dirent.name }; +function toEntry(dir: string, dirent: Dirent): CustomFileSystemEntry { + return { isDirectory: dirent.isDirectory.bind(dirent), getName: () => resolve(dir, dirent.name) }; } diff --git a/src/converters/obsidian/filesystem/WebFileSystemAdapter.ts b/src/converters/obsidian/filesystem/WebFileSystemAdapter.ts new file mode 100644 index 0000000..56609be --- /dev/null +++ b/src/converters/obsidian/filesystem/WebFileSystemAdapter.ts @@ -0,0 +1,96 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +// import * as zip from '@zip.js/zip.js'; +import type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js'; + +import { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter'; + +export class WebFileSystemAdapter implements CustomFileSystemAdapter { + private zipFS: FS | undefined; + private chunks: string[] = []; + private chunkIndex = 0; + + constructor(private zipBlob: Blob) {} + + async initReadingVault() { + // hacky but I am not fixing configs in my free time :P + // eslint-disable-next-line @typescript-eslint/no-var-requires + const zip = require('@zip.js/zip.js/index.cjs'); + this.zipFS = new zip.fs.FS() as FS; + await this.zipFS.importBlob(this.zipBlob); + } + + readDirectory(dir: string) { + const result = ((this.zipFS as FS).find(dir) as ZipEntry).children; + return result.map((entry) => ({ + isDirectory: () => !!(entry as ZipDirectoryEntry).directory, + getName: () => entry.getFullname(), + })); + } + + readFile(file: string) { + return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8'); + } + + exists(path: string) { + return !!(this.zipFS as FS).find(path); + } + + resolve(path: string) { + return path; + } + + resolveInDir(dir: string, name: string) { + return dir + SEPARATOR + name; + } + + //not necessary for browser + // eslint-disable-next-line @typescript-eslint/no-empty-function + removeFile(_targetPath: string) {} + //not necessary for browser + // eslint-disable-next-line @typescript-eslint/no-empty-function + renameFile(_oldPath: string, _newPath: string) {} + + appendToFile(_targetPath: string, chunk: string) { + this.chunks.push(chunk); + } + + appendToPostProcessingFile(_targetPath: string, chunk: string) { + //on local we write into a different file, here we just overwrite the chunks + this.chunks[this.chunkIndex] = chunk; + this.chunkIndex++; + } + + //not necessary for browser + // eslint-disable-next-line @typescript-eslint/no-empty-function + initReadingResultFile(_path: string) {} + + chunkIter() { + const chunks = this.chunks; + let index = 0; + const iterator = { + [Symbol.asyncIterator]() { + return { + async next(): Promise<{ done: boolean; value?: string }> { + if (index < chunks.length) { + const chunk = chunks[index]; + index++; + return { done: false, value: chunk }; + } else { + return { done: true }; + } + }, + }; + }, + }; + + return iterator as AsyncIterable; + } + + endPostProcessingFile() { + (this.zipFS as FS).remove; + } + + getResult() { + return this.chunks.join(''); + } +} diff --git a/src/converters/obsidian/hierarchy/paragraphs.ts b/src/converters/obsidian/hierarchy/paragraphs.ts index 1b22bab..8472f06 100644 --- a/src/converters/obsidian/hierarchy/paragraphs.ts +++ b/src/converters/obsidian/hierarchy/paragraphs.ts @@ -38,6 +38,7 @@ export function findParagraphSliceEndPosition(content: string, curPosition: numb //special case, where we want an extra bullet for block quotes //TODO: same for code blocks + code block endings +// eslint-disable-next-line @typescript-eslint/no-unused-vars function detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null { if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') { return { type: HierarchyType.PARAGRAPH, level: 0 }; @@ -54,10 +55,11 @@ function newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | nul if (hierarchy) { return hierarchy; } - hierarchy = detectBlockQuoteHierarchy(content, pos); - if (hierarchy) { - return hierarchy; - } + //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block + // hierarchy = detectBlockQuoteHierarchy(content, pos); + // if (hierarchy) { + // return hierarchy; + // } hierarchy = detectCodeBlockHierarchy(content, pos); if (hierarchy) { return hierarchy; diff --git a/src/converters/obsidian/index.ts b/src/converters/obsidian/index.ts index 1d5caf7..be9afee 100644 --- a/src/converters/obsidian/index.ts +++ b/src/converters/obsidian/index.ts @@ -1,3 +1,5 @@ +import { LocalFileSystemAdapter } from './filesystem/LocalFileSystemAdapter'; import { ObsidianVaultConverter } from './ObsidianVaultConverter'; +import { createVaultContext } from './VaultContext'; -export { ObsidianVaultConverter }; +export { ObsidianVaultConverter, LocalFileSystemAdapter, createVaultContext }; diff --git a/src/converters/obsidian/links/FileDescMap.ts b/src/converters/obsidian/links/FileDescMap.ts index 94ccf37..a6105f5 100644 --- a/src/converters/obsidian/links/FileDescMap.ts +++ b/src/converters/obsidian/links/FileDescMap.ts @@ -1,4 +1,4 @@ -import { basename } from '../CustomFileSystemAdapter'; +import { basename } from '../filesystem/CustomFileSystemAdapter'; function isPath(searchStr: string) { return basename(searchStr) !== searchStr; diff --git a/src/converters/obsidian/links/headingLinks.ts b/src/converters/obsidian/links/headingLinks.ts index 75c3aa3..66625d0 100644 --- a/src/converters/obsidian/links/headingLinks.ts +++ b/src/converters/obsidian/links/headingLinks.ts @@ -94,19 +94,19 @@ export async function postProcessTIFFIle(filePath: string, context: VaultContext }); const tempPath = filePath + '_TEMP'; - context.fileSystemAdapter.initReadingFile(filePath); + context.fileSystemAdapter.initReadingResultFile(filePath); const regExes = validHeadingLinks.map((link) => ({ old: new RegExp(link.old, 'g'), new: link.new, })); - for await (const line of context.fileSystemAdapter.lineIter()) { + for await (const line of context.fileSystemAdapter.chunkIter()) { let updatedLine = line; regExes.forEach((regEx) => { updatedLine = updatedLine.replace(regEx.old, regEx.new); }); - context.fileSystemAdapter.appendToFile(tempPath, updatedLine); + context.fileSystemAdapter.appendToPostProcessingFile(tempPath, updatedLine); } - context.fileSystemAdapter.endReadingFile(); + context.fileSystemAdapter.endPostProcessingFile(); context.fileSystemAdapter.removeFile(filePath); context.fileSystemAdapter.renameFile(tempPath, filePath); } diff --git a/src/converters/obsidian/tanaconversion/vaultConversion.ts b/src/converters/obsidian/tanaconversion/vaultConversion.ts index 6f79d49..ebe6053 100644 --- a/src/converters/obsidian/tanaconversion/vaultConversion.ts +++ b/src/converters/obsidian/tanaconversion/vaultConversion.ts @@ -1,7 +1,7 @@ import { convertObsidianFile } from './fileConversion'; import { VaultContext } from '../VaultContext'; import { untrackedUidRequest } from '../links/genericLinks'; -import { basename, CustomFileSystemEntry, SEPARATOR } from '../CustomFileSystemAdapter'; +import { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter'; enum ChildrenPosition { NOT_LAST = 'NOT_LAST', @@ -26,7 +26,7 @@ function readFilteredDir(context: VaultContext, dir: string) { }); } -export function handleVault( +export async function handleVault( context: VaultContext, dir: string, handleDirStart: ReturnType, @@ -38,11 +38,11 @@ export function handleVault( const dirents = readFilteredDir(context, dir); for (let index = 0; index < dirents.length; index++) { const dirent = dirents[index]; - const res = dir + SEPARATOR + dirent.getName(); + const res = dirent.getName(); if (dirent.isDirectory()) { - handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents)); + await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents)); } else { - handleFile(res, getChildrenPosition(index, dirents)); + await handleFile(res, getChildrenPosition(index, dirents)); } } handleDirEnd(childrenPosition); @@ -80,14 +80,14 @@ export function addParentNodeEnd(context: VaultContext, targetPath: string) { } export function addFileNode(targetPath: string, today: number, context: VaultContext) { - return (file: string, childrenPosition: ChildrenPosition) => { + return async (file: string, childrenPosition: ChildrenPosition) => { //remove the vault root path and the ".md" ending to get the absolute path const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3); const fileNode = convertObsidianFile( basename(file).replace('.md', ''), absoluteFilePath, - context.fileSystemAdapter.readFile(file), + await context.fileSystemAdapter.readFile(file), context, today, ); diff --git a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts index 07c238a..14c1f43 100644 --- a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts +++ b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts @@ -1,6 +1,6 @@ import { expect, test } from '@jest/globals'; import { readFileSync, unlinkSync } from 'fs'; -import { LocalFileSystemAdapter } from '../LocalFileSystemAdapter'; +import { LocalFileSystemAdapter } from '../filesystem/LocalFileSystemAdapter'; import { ObsidianVaultConverter } from '../ObsidianVaultConverter'; import { createVaultContext } from '../VaultContext'; import { deterministicGenerator } from './testUtils'; @@ -16,6 +16,6 @@ test('obsidian vault converter', async () => { // console.log(JSON.stringify(result)); unlinkSync('./src/converters/obsidian/tests/fixtures/vault.tif.json'); const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/full.tif.json', 'utf-8')); - expect(context.dailyNoteFormat).toBe('DD-MM-YYYY'); expect(result).toStrictEqual(expected); + expect(context.dailyNoteFormat).toBe('DD-MM-YYYY'); }); diff --git a/src/converters/obsidian/tests/VaultContext.test.ts b/src/converters/obsidian/tests/VaultContext.test.ts index 4dcf423..cbc90b8 100644 --- a/src/converters/obsidian/tests/VaultContext.test.ts +++ b/src/converters/obsidian/tests/VaultContext.test.ts @@ -5,9 +5,12 @@ import { untrackedUidRequest } from '../links/genericLinks'; import { createVaultContext } from '../VaultContext'; import { deterministicGenerator } from './testUtils'; import { requestUidForLink, requestUidForContentNode } from '../links/internalLinks'; +import { CustomFileSystemAdapter } from '../filesystem/CustomFileSystemAdapter'; + +const dummyAdapter: CustomFileSystemAdapter = { resolve: (str: string) => str } as any; test('VaultContext uid test', () => { - const context = createVaultContext('', null as any, deterministicGenerator()); + const context = createVaultContext('', dummyAdapter, deterministicGenerator()); expect(requestUidForLink('link', context)).toBe('0'); //no change on second call expect(requestUidForLink('link', context)).toBe('0'); @@ -37,7 +40,7 @@ test('VaultContext uid test', () => { test('VaultContext uid block link test', () => { //first reading the file, then encountering the block ref - const context = createVaultContext('', null as any, deterministicGenerator()); + const context = createVaultContext('', dummyAdapter, deterministicGenerator()); const [uid, content] = requestUidForContentNode('fileName', 'filePath', 'content ^uid', context); expect(uid).toBe('0'); expect(content).toBe('content'); @@ -60,7 +63,7 @@ test('VaultContext uid block link test', () => { }); test('VaultContext invalid nodes test', () => { - const context = createVaultContext('', null as any, deterministicGenerator()); + const context = createVaultContext('', dummyAdapter, deterministicGenerator()); //the block link has not been accessed from its source / has not been found - just used requestUidForLink('fileName#^uid', context); expect(getAllInvalidLinks(context)).toStrictEqual([{ uid: '0', link: 'fileName#^uid' }]); diff --git a/src/converters/obsidian/tests/WebObsidianVaultConvert.test.ts b/src/converters/obsidian/tests/WebObsidianVaultConvert.test.ts new file mode 100644 index 0000000..3a20b4a --- /dev/null +++ b/src/converters/obsidian/tests/WebObsidianVaultConvert.test.ts @@ -0,0 +1,14 @@ +import { expect, test } from '@jest/globals'; +import { readFileSync } from 'fs'; +import { WebObsidianVaultConverter } from '../WebObsidianVaultConverter'; +import { deterministicGenerator } from './testUtils'; + +test('web obsidian vault converter', async () => { + const blob = new Blob([readFileSync('./src/converters/obsidian/tests/fixtures/vault.zip')]); + const [, context, adapter] = await WebObsidianVaultConverter(blob, 'vault', 1, deterministicGenerator()); + const result = JSON.parse(adapter.getResult()); + // console.log(JSON.stringify(result)); + const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/full.tif.json', 'utf-8')); + expect(result).toStrictEqual(expected); + expect(context.dailyNoteFormat).toBe('DD-MM-YYYY'); +}); diff --git a/src/converters/obsidian/tests/fixtures/vault.zip b/src/converters/obsidian/tests/fixtures/vault.zip new file mode 100644 index 0000000000000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YEd37M$~rzq0hk z?<+GKq?@m?>^;VE?d@N;soL+>#EI=%yHi&Dke;#TtdHxTwioP)K6kjFD%MJ(O7Y;M zdu4W8Cx@A=_j@*X?Z3x|A91aH^tDu~)Yjy$cwW*vqsCKCkApOgJa(=<_g8)ToYian zUQXU#x9oMo^@^Ec)1EYDFL}0;Q|zG<&!PTa_@ zQpqA4yB=;VT9r%Ky_huF)+5)Px zu-bw>-gp_1-M$oV3%m{?92}VS5wekQ(2Ybk8B{yraV%!t1Tz_wFsy*hI7pB{jf7I5 zWCE$FfNlrXR9J05q!HA53OUdxpxXd1F$sqXW+{&B_A@MKZU>nRDbs;QgUWOQjz%rf eksU1!EaM@;LeRCWY`{#wzzu}wfj-S=2k`(!IgyM2 literal 0 HcmV?d00001 diff --git a/src/converters/obsidian/tests/markdownNodes.test.ts b/src/converters/obsidian/tests/markdownNodes.test.ts index 0a35926..f9741dc 100644 --- a/src/converters/obsidian/tests/markdownNodes.test.ts +++ b/src/converters/obsidian/tests/markdownNodes.test.ts @@ -43,9 +43,10 @@ test('paragraphs', () => { expect(extractMarkdownNodes('Stuff but with\na newline.\n\n')).toStrictEqual([ { content: 'Stuff but with\na newline.', level: 0, type: HierarchyType.PARAGRAPH }, ]); + //TODO: will change again when we do something sensible with the block quotes expect(extractMarkdownNodes('Stuff but with\n> a blockquote.\n\n')).toStrictEqual([ - { content: 'Stuff but with', level: 0, type: HierarchyType.PARAGRAPH }, - { content: '> a blockquote.', level: 0, type: HierarchyType.PARAGRAPH }, + { content: 'Stuff but with\n> a blockquote.', level: 0, type: HierarchyType.PARAGRAPH }, + // { content: '> a blockquote.', level: 0, type: HierarchyType.PARAGRAPH }, ]); expect(extractMarkdownNodes('---\nFoo `paragraph-run-style-emphasis-flip.docx` bar')).toStrictEqual([ { diff --git a/src/runner.ts b/src/runner.ts index fdc2db2..c24ddd3 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -5,9 +5,7 @@ import { RoamConverter } from './converters/roam/index'; import { TanaIntermediateFile } from './types/types'; import { WorkflowyConverter } from './converters/workflowy'; import { lstatSync } from 'fs'; -import { ObsidianVaultConverter } from './converters/obsidian'; -import { createVaultContext } from './converters/obsidian/VaultContext'; -import { LocalFileSystemAdapter } from './converters/obsidian/LocalFileSystemAdapter'; +import { ObsidianVaultConverter, LocalFileSystemAdapter, createVaultContext } from './converters/obsidian'; const fileType = process.argv[2]; const file = process.argv[3]; diff --git a/yarn.lock b/yarn.lock index 45c44a6..af6deb3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1444,6 +1444,11 @@ "@typescript-eslint/types" "5.32.0" eslint-visitor-keys "^3.3.0" +"@zip.js/zip.js@^2.6.43": + version "2.6.43" + resolved "https://registry.yarnpkg.com/@zip.js/zip.js/-/zip.js-2.6.43.tgz#b6c5368a0dd286f4099ccf91117137c2de5f4090" + integrity sha512-H9mYVRKN90L5T3cknVGNcHNMgPqTJKXobdsXC5AnfjR3hud+II3C7ITZ8XTH7hpCsPh/CfQRJjVH4deVdjniXQ== + acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" From f142ee51fbe95874fd52ecc5a65f113eaa288a85 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sat, 15 Oct 2022 00:35:30 +0200 Subject: [PATCH 60/94] Obsidian: add converter homepage --- index.html | 19 + package.json | 11 +- public/assets/index.d5ac21b8.js | 45 + public/index.html | 20 + .../filesystem/WebFileSystemAdapter.ts | 5 +- .../tests/ObsidianVaultConverter.test.ts | 2 +- .../obsidian/tests/VaultContext.test.ts | 2 +- .../tests/WebObsidianVaultConvert.test.ts | 2 +- .../obsidian/tests/codeblocks.test.ts | 2 +- .../obsidian/tests/frontmatter.test.ts | 2 +- .../obsidian/tests/headingLinks.test.ts | 2 +- .../obsidian/tests/imageLinks.test.ts | 2 +- .../obsidian/tests/markdownNodes.test.ts | 2 +- .../tests/traverseTreeDepthFirst.test.ts | 2 +- src/converters/roam/roamUtils.test.ts | 2 +- src/converters/roam/tests/roam.test.ts | 2 +- .../workflowy/tests/workflowy.test.ts | 2 +- src/script.ts | 36 + src/testUtils/testUtils.ts | 2 +- src/testUtils/utils.test.ts | 2 +- yarn.lock | 1729 +++-------------- 21 files changed, 429 insertions(+), 1464 deletions(-) create mode 100644 index.html create mode 100644 public/assets/index.d5ac21b8.js create mode 100644 public/index.html create mode 100644 src/script.ts diff --git a/index.html b/index.html new file mode 100644 index 0000000..baf8a12 --- /dev/null +++ b/index.html @@ -0,0 +1,19 @@ + + + + + + Obsidian-2-Tana Converter + + +

Obsidian-2-Tana Converter

+

Select a zip of your Obsidian vault folder and get a TIF file back, ready to be imported in Tana.

+ There is no server involved in the conversion, the zip file will stay on your computer. +

+ +
+ +

+ + + diff --git a/package.json b/package.json index 1048e3f..1582ed7 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ ], "license": "MIT", "scripts": { + "dev": "vite", "ci": "yarn lint && yarn test", "format": "prettier --write \"src/**/*.ts\"", "lint": "eslint --ext .ts src/", @@ -19,20 +20,20 @@ "convert:workflowy": "yarn build && node --experimental-modules --es-module-specifier-resolution=node dist/runner.js workflowy", "convert:obsidian": "yarn build && node --experimental-modules --es-module-specifier-resolution=node dist/runner.js obsidian", "zip": "cd ./src/converters/obsidian/tests/fixtures/ && zip -r vault.zip vault && cd -", - "test": "jest" + "test": "vitest", + "deploy": "vite build && rm -rfv ./public/* && mv ./dist/* ./public/" }, "devDependencies": { "@babel/preset-env": "^7.18.6", "@babel/preset-typescript": "^7.18.6", - "@jest/globals": "^28.1.2", - "@types/jest": "^28.1.4", "@types/node": "^18.8.3", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.32.0", "eslint": "^8.21.0", - "jest": "^28.1.2", "prettier": "^2.7.1", - "typescript": "^4.7.4" + "typescript": "^4.7.4", + "vite": "^3.1.8", + "vitest": "^0.24.3" }, "dependencies": { "@zip.js/zip.js": "^2.6.43", diff --git a/public/assets/index.d5ac21b8.js b/public/assets/index.d5ac21b8.js new file mode 100644 index 0000000..506a0ce --- /dev/null +++ b/public/assets/index.d5ac21b8.js @@ -0,0 +1,45 @@ +var hc=Object.defineProperty;var mc=(e,t,n)=>t in e?hc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Zn=(e,t,n)=>(mc(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const In=15,mi=30,pi=19,pc=29,ur=256,Hi=ur+1+pc,Ms=2*Hi+1,yn=256,_c=7,Is=16,Fs=17,Ls=18,$r=8*2,hr=-1,wc=1,qn=2,gc=0,nn=0,Cs=1,xc=3,Le=4,Qe=0,Wa=1,zn=2,et=-2,yc=-3,Jt=-5;function Tr(e){return Ar(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function Ar(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?Ar(n):n),[])}const Ns=[0,1,2,3].concat(...Tr([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function se(){const e=this;function t(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,f=e.stat_desc.max_length;let d,u,p,w,D,h,c=0;for(w=0;w<=In;w++)i.bl_count[w]=0;for(s[i.heap[i.heap_max]*2+1]=0,d=i.heap_max+1;df&&(w=f,c++),s[u*2+1]=w,!(u>e.max_code)&&(i.bl_count[w]++,D=0,u>=l&&(D=o[u-l]),h=s[u*2],i.opt_len+=h*(w+D),a&&(i.static_len+=h*(a[u*2+1]+D)));if(c!==0){do{for(w=f-1;i.bl_count[w]===0;)w--;i.bl_count[w]--,i.bl_count[w+1]+=2,i.bl_count[f]--,c-=2}while(c>0);for(w=f;w!==0;w--)for(u=i.bl_count[w];u!==0;)p=i.heap[--d],!(p>e.max_code)&&(s[p*2+1]!=w&&(i.opt_len+=(w-s[p*2+1])*s[p*2],s[p*2+1]=w),u--)}}function n(i,s){let a=0;do a|=i&1,i>>>=1,a<<=1;while(--s>0);return a>>>1}function r(i,s,a){const o=[];let l=0,f,d,u;for(f=1;f<=In;f++)o[f]=l=l+a[f-1]<<1;for(d=0;d<=s;d++)u=i[d*2+1],u!==0&&(i[d*2]=n(o[u]++,u))}e.build_tree=function(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.elems;let l,f,d=-1,u;for(i.heap_len=0,i.heap_max=Ms,l=0;l=1;l--)i.pqdownheap(s,l);u=o;do l=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(s,1),f=i.heap[1],i.heap[--i.heap_max]=l,i.heap[--i.heap_max]=f,s[u*2]=s[l*2]+s[f*2],i.depth[u]=Math.max(i.depth[l],i.depth[f])+1,s[l*2+1]=s[f*2+1]=u,i.heap[1]=u++,i.pqdownheap(s,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],t(i),r(s,e.max_code,i.bl_count)}}se._length_code=[0,1,2,3,4,5,6,7].concat(...Tr([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));se.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];se.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];se.d_code=function(e){return e<256?Ns[e]:Ns[256+(e>>>7)]};se.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];se.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];se.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];se.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function De(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}const vc=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],bc=Tr([[144,8],[112,9],[24,7],[8,8]]);De.static_ltree=Ar(vc.map((e,t)=>[e,bc[t]]));const kc=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],Sc=Tr([[30,5]]);De.static_dtree=Ar(kc.map((e,t)=>[e,Sc[t]]));De.static_l_desc=new De(De.static_ltree,se.extra_lbits,ur+1,Hi,In);De.static_d_desc=new De(De.static_dtree,se.extra_dbits,0,mi,In);De.static_bl_desc=new De(null,se.extra_blbits,0,pi,_c);const Ec=9,Dc=8;function at(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const Ha=0,sr=1,Gt=2,Je=[new at(0,0,0,0,Ha),new at(4,4,8,4,sr),new at(4,5,16,8,sr),new at(4,6,32,32,sr),new at(4,4,16,16,Gt),new at(8,16,32,32,Gt),new at(8,16,128,128,Gt),new at(8,32,128,256,Gt),new at(32,128,258,1024,Gt),new at(32,258,258,4096,Gt)],$n=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ge=0,Kn=1,vn=2,Xn=3,Tc=32,Kr=42,Jn=113,bn=666,Xr=8,Ac=0,Jr=1,Oc=2,ce=3,ar=258,Ye=ar+ce+1;function Us(e,t,n,r){const i=e[t*2],s=e[n*2];return i=3&&j[se.bl_order[T]*2+1]===0;T--);return e.opt_len+=3*(T+1)+5+5+4,T}function Ve(T){e.pending_buf[e.pending++]=T}function Tt(T){Ve(T&255),Ve(T>>>8&255)}function gn(T){Ve(T>>8&255),Ve(T&255&255)}function Ee(T,R){let O;const I=R;ge>$r-I?(O=T,ue|=O<>>$r-ge,ge+=I-$r):(ue|=T<=8&&(Ve(ue&255),ue>>>=8,ge-=8)}function ac(){Ee(Jr<<1,3),Pe(yn,De.static_ltree),Ss(),1+Se+10-ge<9&&(Ee(Jr<<1,3),Pe(yn,De.static_ltree),Ss()),Se=7}function xn(T,R){let O,I,U;if(e.dist_buf[V]=T,e.lc_buf[V]=R&255,V++,T===0?N[R*2]++:(Z++,T--,N[(se._length_code[R]+ur+1)*2]++,Y[se.d_code(T)*2]++),(V&8191)===0&&A>2){for(O=V*8,I=g-m,U=0;U>>=3,Z8?Tt(ue):ge>0&&Ve(ue&255),ue=0,ge=0}function oc(T,R,O){Ds(),Se=8,O&&(Tt(R),Tt(~R)),e.pending_buf.set(l.subarray(T,T+R),e.pending),e.pending+=R}function Ts(T,R,O){Ee((Ac<<1)+(O?1:0),3),oc(T,R,!0)}function lc(T,R,O){let I,U,G=0;A>0?(q.build_tree(e),we.build_tree(e),G=wn(),I=e.opt_len+3+7>>>3,U=e.static_len+3+7>>>3,U<=I&&(I=U)):I=U=R+5,R+4<=I&&T!=-1?Ts(T,R,O):U==I?(Ee((Jr<<1)+(O?1:0),3),Es(De.static_ltree,De.static_dtree)):(Ee((Oc<<1)+(O?1:0),3),sc(q.max_code+1,we.max_code+1,G+1),Es(N,Y)),Dt(),O&&Ds()}function At(T){lc(m>=0?m:-1,g-m,T),m=g,t.flush_pending()}function qr(){let T,R,O,I;do{if(I=f-x-g,I===0&&g===0&&x===0)I=s;else if(I==-1)I--;else if(g>=s+s-Ye){l.set(l.subarray(s,s+s),0),y-=s,g-=s,m-=s,T=w,O=T;do R=u[--O]&65535,u[O]=R>=s?R-s:0;while(--T!==0);T=s,O=T;do R=d[--O]&65535,d[O]=R>=s?R-s:0;while(--T!==0);I+=s}if(t.avail_in===0)return;T=t.read_buf(l,g+x,I),x+=T,x>=ce&&(p=l[g]&255,p=(p<r-5&&(R=r-5);;){if(x<=1){if(qr(),x===0&&T==nn)return Ge;if(x===0)break}if(g+=x,x=0,O=m+R,(g===0||g>=O)&&(x=g-O,g=O,At(!1),t.avail_out===0)||g-m>=s-Ye&&(At(!1),t.avail_out===0))return Ge}return At(T==Le),t.avail_out===0?T==Le?vn:Ge:T==Le?Xn:Kn}function As(T){let R=k,O=g,I,U,G=E;const K=g>s-Ye?g-(s-Ye):0;let Me=B;const Xe=o,zr=g+ar;let Os=l[O+G-1],Rs=l[O+G];E>=F&&(R>>=2),Me>x&&(Me=x);do if(I=T,!(l[I+G]!=Rs||l[I+G-1]!=Os||l[I]!=l[O]||l[++I]!=l[O+1])){O+=2,I++;do;while(l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&OG){if(y=T,G=U,U>=Me)break;Os=l[O+G-1],Rs=l[O+G]}}while((T=d[T&Xe]&65535)>K&&--R!==0);return G<=x?G:x}function dc(T){let R=0,O;for(;;){if(x=ce&&(p=(p<=ce)if(O=xn(g-y,_-ce),x-=_,_<=S&&x>=ce){_--;do g++,p=(p<=ce&&(p=(p<4096)&&(_=ce-1)),E>=ce&&_<=E){I=g+x-ce,O=xn(g-1-v,E-ce),x-=E-1,E-=2;do++g<=I&&(p=(p<Ec||I!=Xr||O<9||O>15||R<0||R>9||G<0||G>qn?et:(T.dstate=e,a=O,s=1<9||O<0||O>qn?et:(Je[A].func!=Je[R].func&&T.total_in!==0&&(I=T.deflate(Cs)),A!=R&&(A=R,S=Je[A].max_lazy,F=Je[A].good_length,B=Je[A].nice_length,k=Je[A].max_chain),P=O,I)},e.deflateSetDictionary=function(T,R,O){let I=O,U,G=0;if(!R||n!=Kr)return et;if(Is-Ye&&(I=s-Ye,G=O-I),l.set(R.subarray(G,G+I),0),g=I,m=I,p=l[0]&255,p=(p<Le||R<0)return et;if(!T.next_out||!T.next_in&&T.avail_in!==0||n==bn&&R!=Le)return T.msg=$n[zn-et],et;if(T.avail_out===0)return T.msg=$n[zn-Jt],Jt;if(t=T,G=i,i=R,n==Kr&&(I=Xr+(a-8<<4)<<8,U=(A-1&255)>>1,U>3&&(U=3),I|=U<<6,g!==0&&(I|=Tc),I+=31-I%31,n=Jn,gn(I)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,Qe}else if(t.avail_in===0&&R<=G&&R!=Le)return t.msg=$n[zn-Jt],Jt;if(n==bn&&t.avail_in!==0)return T.msg=$n[zn-Jt],Jt;if(t.avail_in!==0||x!==0||R!=nn&&n!=bn){switch(K=-1,Je[A].func){case Ha:K=cc(R);break;case sr:K=dc(R);break;case Gt:K=fc(R);break}if((K==vn||K==Xn)&&(n=bn),K==Ge||K==vn)return t.avail_out===0&&(i=-1),Qe;if(K==Kn){if(R==Cs)ac();else if(Ts(0,0,!1),R==xc)for(O=0;On&&(i=n),i===0?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Mc(e){const t=this,n=new ja,r=Ic(e&&e.chunkSize?e.chunkSize:64*1024),i=nn,s=new Uint8Array(r);let a=e?e.level:hr;typeof a>"u"&&(a=hr),n.deflateInit(a),n.next_out=s,t.append=function(o,l){let f,d,u=0,p=0,w=0;const D=[];if(!!o.length){n.next_in_index=0,n.next_in=o,n.avail_in=o.length;do{if(n.next_out_index=0,n.avail_out=r,f=n.deflate(i),f!=Qe)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?D.push(new Uint8Array(s)):D.push(s.slice(0,n.next_out_index))),w+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=u&&(l(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return D.length>1?(d=new Uint8Array(w),D.forEach(function(h){d.set(h,p),p+=h.length})):d=D[0]||new Uint8Array,d}},t.flush=function(){let o,l,f=0,d=0;const u=[];do{if(n.next_out_index=0,n.avail_out=r,o=n.deflate(Le),o!=Wa&&o!=Qe)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&u.push(s.slice(0,n.next_out_index)),d+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),l=new Uint8Array(d),u.forEach(function(p){l.set(p,f),f+=p.length}),l}}function Ic(e){return e+5*(Math.floor(e/16383)+1)}const Fc=15,J=0,xt=1,Lc=2,Ne=-2,ae=-3,Ps=-4,yt=-5,We=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ba=1440,Cc=0,Nc=4,Uc=9,Pc=5,Yc=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Wc=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Hc=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],jc=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Bc=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Vc=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ot=15;function _i(){const e=this;let t,n,r,i,s,a;function o(f,d,u,p,w,D,h,c,m,_,v){let b,g,y,x,E,k,S,A,P,F,B,N,Y,j,q;F=0,E=u;do r[f[d+F]]++,F++,E--;while(E!==0);if(r[0]==u)return h[0]=-1,c[0]=0,J;for(A=c[0],k=1;k<=Ot&&r[k]===0;k++);for(S=k,AE&&(A=E),c[0]=A,j=1<N+A;){if(x++,N+=A,q=y-N,q=q>A?A:q,(g=1<<(k=S-N))>b+1&&(g-=b+1,Y=S,kBa)return ae;s[x]=B=_[0],_[0]+=q,x!==0?(a[x]=E,i[0]=k,i[1]=A,k=E>>>N-A,i[2]=B-s[x-1]-k,m.set(i,(s[x-1]+k)*3)):h[0]=B}for(i[1]=S-N,F>=u?i[0]=128+64:v[F]>>N;k>>=1)E^=k;for(E^=k,P=(1<257?(_==ae?m.msg="oversubscribed distance tree":_==yt?(m.msg="incomplete distance tree",_=ae):_!=Ps&&(m.msg="empty distance tree with lengths",_=ae),_):J)}}_i.inflate_trees_fixed=function(e,t,n,r){return e[0]=Uc,t[0]=Pc,n[0]=Yc,r[0]=Wc,J};const Qn=0,Ys=1,Ws=2,Hs=3,js=4,Bs=5,Vs=6,Qr=7,Gs=8,er=9;function Gc(){const e=this;let t,n=0,r,i=0,s=0,a=0,o=0,l=0,f=0,d=0,u,p=0,w,D=0;function h(c,m,_,v,b,g,y,x){let E,k,S,A,P,F,B,N,Y,j,q,we,W,he,V,Z;B=x.next_in_index,N=x.avail_in,P=y.bitb,F=y.bitk,Y=y.write,j=Y>=k[Z+1],F-=k[Z+1],y.win[Y++]=k[Z+2],j--;continue}do{if(P>>=k[Z+1],F-=k[Z+1],(A&16)!==0){for(A&=15,W=k[Z+2]+(P&We[A]),P>>=A,F-=A;F<15;)N--,P|=(x.read_byte(B++)&255)<>=k[Z+1],F-=k[Z+1],(A&16)!==0){for(A&=15;F>=A,F-=A,j-=W,Y>=he)V=Y-he,Y-V>0&&2>Y-V?(y.win[Y++]=y.win[V++],y.win[Y++]=y.win[V++],W-=2):(y.win.set(y.win.subarray(V,V+2),Y),Y+=2,V+=2,W-=2);else{V=Y-he;do V+=y.end;while(V<0);if(A=y.end-V,W>A){if(W-=A,Y-V>0&&A>Y-V)do y.win[Y++]=y.win[V++];while(--A!==0);else y.win.set(y.win.subarray(V,V+A),Y),Y+=A,V+=A,A=0;V=0}}if(Y-V>0&&W>Y-V)do y.win[Y++]=y.win[V++];while(--W!==0);else y.win.set(y.win.subarray(V,V+W),Y),Y+=W,V+=W,W=0;break}else if((A&64)===0)E+=k[Z+2],E+=P&We[A],Z=(S+E)*3,A=k[Z];else return x.msg="invalid distance code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=P,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae;while(!0);break}if((A&64)===0){if(E+=k[Z+2],E+=P&We[A],Z=(S+E)*3,(A=k[Z])===0){P>>=k[Z+1],F-=k[Z+1],y.win[Y++]=k[Z+2],j--;break}}else return(A&32)!==0?(W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=P,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,xt):(x.msg="invalid literal/length code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=P,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae)}while(!0)}while(j>=258&&N>=10);return W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=P,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,J}e.init=function(c,m,_,v,b,g){t=Qn,f=c,d=m,u=_,p=v,w=b,D=g,r=null},e.proc=function(c,m,_){let v,b,g,y=0,x=0,E=0,k,S,A,P;for(E=m.next_in_index,k=m.avail_in,y=c.bitb,x=c.bitk,S=c.write,A=S=258&&k>=10&&(c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,_=h(f,d,u,p,w,D,c,m),E=m.next_in_index,k=m.avail_in,y=c.bitb,x=c.bitk,S=c.write,A=S>>=r[b+1],x-=r[b+1],g=r[b],g===0){a=r[b+2],t=Vs;break}if((g&16)!==0){o=g&15,n=r[b+2],t=Ws;break}if((g&64)===0){s=g,i=b/3+r[b+2];break}if((g&32)!==0){t=Qr;break}return t=er,m.msg="invalid literal/length code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,c.inflate_flush(m,_);case Ws:for(v=o;x>=v,x-=v,s=d,r=w,i=D,t=Hs;case Hs:for(v=s;x>=r[b+1],x-=r[b+1],g=r[b],(g&16)!==0){o=g&15,l=r[b+2],t=js;break}if((g&64)===0){s=g,i=b/3+r[b+2];break}return t=er,m.msg="invalid distance code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,c.inflate_flush(m,_);case js:for(v=o;x>=v,x-=v,t=Bs;case Bs:for(P=S-l;P<0;)P+=c.end;for(;n!==0;){if(A===0&&(S==c.end&&c.read!==0&&(S=0,A=S7&&(x-=8,k++,E--),c.write=S,_=c.inflate_flush(m,_),S=c.write,A=Sh.avail_out&&(m=h.avail_out),m!==0&&c==yt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(v,v+m),_),_+=m,v+=m,v==n.end&&(v=0,n.write==n.end&&(n.write=0),m=n.write-v,m>h.avail_out&&(m=h.avail_out),m!==0&&c==yt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(v,v+m),_),_+=m,v+=m),h.next_out_index=_,n.read=v,c},n.proc=function(h,c){let m,_,v,b,g,y,x,E;for(b=h.next_in_index,g=h.avail_in,_=n.bitb,v=n.bitk,y=n.write,x=y>>1){case 0:_>>>=3,v-=3,m=v&7,_>>>=m,v-=m,r=ei;break;case 1:k=[],S=[],A=[[]],P=[[]],_i.inflate_trees_fixed(k,S,A,P),d.init(k[0],S[0],A[0],0,P[0],0),_>>>=3,v-=3,r=tr;break;case 2:_>>>=3,v-=3,r=zs;break;case 3:return _>>>=3,v-=3,r=jt,h.msg="invalid block type",c=ae,n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c)}break;case ei:for(;v<32;){if(g!==0)c=J;else return n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(b++)&255)<>>16&65535)!=(_&65535))return r=jt,h.msg="invalid stored block lengths",c=ae,n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c);i=_&65535,_=v=0,r=i!==0?qs:u!==0?nr:Qt;break;case qs:if(g===0||x===0&&(y==n.end&&n.read!==0&&(y=0,x=yg&&(m=g),m>x&&(m=x),n.win.set(h.read_buf(b,m),y),b+=m,g-=m,y+=m,x-=m,(i-=m)!==0)break;r=u!==0?nr:Qt;break;case zs:for(;v<14;){if(g!==0)c=J;else return n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(b++)&255)<29||(m>>5&31)>29)return r=jt,h.msg="too many length or distance symbols",c=ae,n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c);if(m=258+(m&31)+(m>>5&31),!o||o.length>>=14,v-=14,a=0,r=$s;case $s:for(;a<4+(s>>>10);){for(;v<3;){if(g!==0)c=J;else return n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(b++)&255)<>>=3,v-=3}for(;a<19;)o[Zs[a++]]=0;if(l[0]=7,m=D.inflate_trees_bits(o,l,f,p,h),m!=J)return c=m,c==ae&&(o=null,r=jt),n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c);a=0,r=Ks;case Ks:for(;m=s,!(a>=258+(m&31)+(m>>5&31));){let j,q;for(m=l[0];v>>=m,v-=m,o[a++]=q;else{for(E=q==18?7:q-14,j=q==18?11:3;v>>=m,v-=m,j+=_&We[E],_>>>=E,v-=E,E=a,m=s,E+j>258+(m&31)+(m>>5&31)||q==16&&E<1)return o=null,r=jt,h.msg="invalid bit length repeat",c=ae,n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c);q=q==16?o[E-1]:0;do o[E++]=q;while(--j!==0);a=E}}if(f[0]=-1,F=[],B=[],N=[],Y=[],F[0]=9,B[0]=6,m=s,m=D.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),o,F,B,N,Y,p,h),m!=J)return m==ae&&(o=null,r=jt),c=m,n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c);d.init(F[0],B[0],p,N[0],p,Y[0]),r=tr;case tr:if(n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,(c=d.proc(n,h,c))!=xt)return n.inflate_flush(h,c);if(c=J,d.free(h),b=h.next_in_index,g=h.avail_in,_=n.bitb,v=n.bitk,y=n.write,x=y15?(e.inflateEnd(n),Ne):(e.wbits=r,n.istate.blocks=new Zc(n,1<>4)+8>a.wbits){a.mode=Rt,n.msg="invalid win size",a.marker=5;break}a.mode=Js;case Js:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,s=n.read_byte(n.next_in_index++)&255,((a.method<<8)+s)%31!==0){a.mode=Rt,n.msg="incorrect header check",a.marker=5;break}if((s&qc)===0){a.mode=kn;break}a.mode=Qs;case Qs:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,a.mode=ea;case ea:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,a.mode=ta;case ta:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,a.mode=na;case na:return n.avail_in===0?i:(i=r,n.avail_in--,n.total_in++,a.need+=n.read_byte(n.next_in_index++)&255,a.mode=ti,Lc);case ti:return a.mode=Rt,n.msg="need dictionary",a.marker=0,Ne;case kn:if(i=a.blocks.proc(n,i),i==ae){a.mode=Rt,a.marker=0;break}if(i==J&&(i=r),i!=xt)return i;i=r,a.blocks.reset(n,a.was),a.mode=ra;case ra:return n.avail_in=0,xt;case Rt:return ae;default:return Ne}},e.inflateSetDictionary=function(n,r,i){let s=0,a=i;if(!n||!n.istate||n.istate.mode!=ti)return Ne;const o=n.istate;return a>=1<0&&n.next_in_index!=p&&(l(n.next_in_index),p=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return f.length>1?(u=new Uint8Array(D),f.forEach(function(h){u.set(h,w),w+=h.length})):u=f[0]||new Uint8Array,u}},t.flush=function(){n.inflateEnd()}}const pe=4294967295,ke=65535,wi=8,Ga=0,Za=99,qa=67324752,ji=134695760,Qc=ji,gi=33639248,za=101010256,xi=101075792,$a=117853008,sn=22,An=20,On=56,ed=sn+An+On,Ka=1,Xa=39169,Ja=10,Qa=1,Bi=21589,td=28789,nd=25461,yi=1,rd=6,vi=8,bi=2048,ki=16,id=20,ia=45,sa=51,or="/",aa=new Date(2107,11,31),oa=new Date(1980,0,1),fe=void 0,mr="undefined",eo="function";class la{constructor(t){return class extends TransformStream{constructor(n,r){const i=new t(r);super({transform(s,a){a.enqueue(i.append(s))},flush(s){const a=i.flush();a&&s.enqueue(a)}})}}}}const sd=64;let to=2;try{typeof navigator!=mr&&navigator.hardwareConcurrency&&(to=navigator.hardwareConcurrency)}catch{}const ad={chunkSize:512*1024,maxWorkers:to,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:fe,CompressionStreamNative:typeof CompressionStream!=mr&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=mr&&DecompressionStream},Ft=Object.assign({},ad);function Vi(){return Ft}function no(e){return Math.max(e.chunkSize,sd)}function Gi(e){const{baseURL:t,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:i,useCompressionStream:s,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:f,DecompressionStream:d,workerScripts:u}=e;if(Mt("baseURL",t),Mt("chunkSize",n),Mt("maxWorkers",r),Mt("terminateWorkerTimeout",i),Mt("useCompressionStream",s),Mt("useWebWorkers",a),o&&(Ft.CompressionStream=new la(o)),l&&(Ft.DecompressionStream=new la(l)),Mt("CompressionStream",f),Mt("DecompressionStream",d),u!==fe){const{deflate:p,inflate:w}=u;if((p||w)&&(Ft.workerScripts||(Ft.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");Ft.workerScripts.deflate=p}if(w){if(!Array.isArray(w))throw new Error("workerScripts.inflate must be an array");Ft.workerScripts.inflate=w}}}function Mt(e,t){t!==fe&&(Ft[e]=t)}const Sn={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin",cap:["cap","pcap"],"cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",javascript:"js",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":"odm","vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-debian-package":["deb","udeb"],"x-director":["dcr","dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-koan":["skp","skd","skt","skm"],"x-kpresenter":["kpr","kpt"],"x-kword":["kwd","kwt"],"x-latex":"latex","x-lha":"lha","x-lyx":"lyx","x-lzh":"lzh","x-lzx":"lzx","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-ms-wmd":"wmd","x-ms-wmz":"wmz","x-msdos-program":["com","exe","bat","dll"],"x-msi":"msi","x-netcdf":["nc","cdf"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":"rpm","x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tcl":"tcl","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-troff":["t","tr","roff"],"x-troff-man":"man","x-troff-me":"me","x-troff-ms":"ms","x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix",json:"json","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":"mathml",mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","x-msdownload":["exe","dll","com","bat","msi"],"x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tads":"gam","x-tex":"tex","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-compressed":"tgz","x-gzip":"gz","x-perfmon":["pma","pmc","pml","pmr","pmw"],"x-pkcs7-mime":["p7c","p7m"],"ynd.ms-pkipko":"pko"},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":["aif","aiff","aifc"],"x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2","x-wav":"wav",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":["mmd","mmod"],"x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":["sd","sdf"],"x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","mpc","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":["val","aso"],"x-pdb":["pdb","ent"],"x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-photoshop":"psd","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",pipeg:"jfif"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":["x3d","x3dz"],"x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:["tm","ts"],"tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{avif:".avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","vrml","wrl","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const t in Sn)if(Sn.hasOwnProperty(t)){for(const n in Sn[t])if(Sn[t].hasOwnProperty(n)){const r=Sn[t][n];if(typeof r=="string")e[r]=t+"/"+n;else for(let i=0;i>>1^3988292384:t=t>>>1;ro[e]=t}class pr{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let r=0,i=t.length|0;r>>8^ro[(n^t[r])&255];this.crc=n}get(){return~this.crc}}class io extends TransformStream{constructor(){const t=new pr;super({transform(n){t.append(n)},flush(n){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t.get()),n.enqueue(r)}})}}function Si(e){if(typeof TextEncoder>"u"){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n0&&t&&(e[n-1]=Fe.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let a=0;a>>t),n=e[a]<<32-t;const i=e.length?e[e.length-1]:0,s=Fe.getPartial(i);return r.push(Fe.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},_r={bytes:{fromBits(e){const n=Fe.bitLength(e)/8,r=new Uint8Array(n);let i;for(let s=0;s>>24,i<<=8;return r},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let o=t.blockSize+r-(t.blockSize+r&t.blockSize-1);o<=i;o+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=Fe.concat(t,[Fe.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r},_S(e,t){return t<>>32-e},_block(e){const t=this,n=t._h,r=Array(80);for(let f=0;f<16;f++)r[f]=e[f];let i=n[0],s=n[1],a=n[2],o=n[3],l=n[4];for(let f=0;f<=79;f++){f>=16&&(r[f]=t._S(1,r[f-3]^r[f-8]^r[f-14]^r[f-16]));const d=t._S(5,i)+t._f(f,s,a,o)+l+r[f]+t._key[Math.floor(f/20)]|0;l=o,o=a,a=t._S(30,s),s=i,i=d}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+l|0}};const so={};so.aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,o,l=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;s<4*i+28;s++){let f=a[s-1];(s%i===0||i===8&&s%i===4)&&(f=n[f>>>24]<<24^n[f>>16&255]<<16^n[f>>8&255]<<8^n[f&255],s%i===0&&(f=f<<8^f>>>24^l<<24,l=l<<1^(l>>7)*283)),a[s]=a[s-i]^f}for(let f=0;s;f++,s--){const d=a[f&3?s:s-4];s<=4||f<4?o[f]=d:o[f]=r[0][n[d>>>24]]^r[1][n[d>>16&255]]^r[2][n[d>>8&255]]^r[3][n[d&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,o,l,f;for(let d=0;d<256;d++)s[(i[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let u=a^a<<1^a<<2^a<<3^a<<4;u=u>>8^u&255^99,n[d]=u,r[u]=d,f=i[l=i[o=i[d]]];let p=f*16843009^l*65537^o*257^d*16843008,w=i[u]*257^u*16843008;for(let D=0;D<4;D++)e[D][d]=w=w<<24^w>>>8,t[D][u]=p=p<<24^p>>>8}for(let d=0;d<5;d++)e[d]=e[d].slice(0),t[d]=t[d].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],l=s[2],f=s[3],d=s[4];let u=e[0]^n[0],p=e[t?3:1]^n[1],w=e[2]^n[2],D=e[t?1:3]^n[3],h=4,c,m,_;for(let v=0;v>>24]^o[p>>16&255]^l[w>>8&255]^f[D&255]^n[h],m=a[p>>>24]^o[w>>16&255]^l[D>>8&255]^f[u&255]^n[h+1],_=a[w>>>24]^o[D>>16&255]^l[u>>8&255]^f[p&255]^n[h+2],D=a[D>>>24]^o[u>>16&255]^l[p>>8&255]^f[w&255]^n[h+3],h+=4,u=c,p=m,w=_;for(let v=0;v<4;v++)i[t?3&-v:v]=d[u>>>24]<<24^d[p>>16&255]<<16^d[w>>8&255]<<8^d[D&255]^n[h++],c=u,u=p,p=w,w=D,D=c;return i}};const od={getRandomValues(e){const t=new Uint32Array(e.buffer),n=r=>{let i=987654321;const s=4294967295;return function(){return i=36969*(i&65535)+(i>>16)&s,r=18e3*(r&65535)+(r>>16)&s,(((i<<16)+r&s)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r>24&255)===255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=Fe.bitLength(t);for(let s=0;s>5)+1<<2;let s,a,o,l,f;const d=new ArrayBuffer(i),u=new DataView(d);let p=0;const w=Fe;for(t=_r.bytes.toBits(t),f=1;p<(i||1);f++){for(s=a=e.encrypt(w.concat(t,[f])),o=1;oi&&(e=n.hash(e));for(let s=0;sthis.resolveReady=i),password:t,signed:n,strength:r-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;o?(await bd(a,l,o,qe(i,0,Fn[l]+2)),i=qe(i,Fn[l]+2),f()):await d;const u=new Uint8Array(i.length-It-(i.length-It)%an);s.enqueue(_o(a,i,u,0,It,!0))},async flush(i){const{signed:s,ctr:a,hmac:o,pending:l,ready:f}=this;await f;const d=qe(l,0,l.length-It),u=qe(l,l.length-It);let p=new Uint8Array;if(d.length){const w=Cn(lt,d);o.update(w);const D=a.update(w);p=Ln(lt,D)}if(s){const w=qe(Ln(lt,o.digest()),0,It);for(let D=0;Dthis.resolveReady=i),password:t,strength:n-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;let u=new Uint8Array;o?(u=await kd(a,l,o),f()):await d;const p=new Uint8Array(u.length+i.length-i.length%an);p.set(u,0),s.enqueue(_o(a,i,p,u.length,0))},async flush(i){const{ctr:s,hmac:a,pending:o,ready:l}=this;await l;let f=new Uint8Array;if(o.length){const d=s.update(Cn(lt,o));a.update(d),f=Ln(lt,d)}r.signature=Ln(lt,a.digest()).slice(0,It),i.enqueue(qi(f,r.signature))}}),r=this}}function _o(e,t,n,r,i,s){const{ctr:a,hmac:o,pending:l}=e,f=t.length-i;l.length&&(t=qi(l,t),n=Dd(n,f-f%an));let d;for(d=0;d<=f-an;d+=an){const u=Cn(lt,qe(t,d,d+an));s&&o.update(u);const p=a.update(u);s||o.update(p),n.set(Ln(lt,p),d+r)}return e.pending=qe(t,d),n}async function bd(e,t,n,r){const i=await wo(e,t,n,qe(r,0,Fn[t])),s=qe(r,Fn[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new Error(oo)}async function kd(e,t,n){const r=co(new Uint8Array(Fn[t])),i=await wo(e,t,n,r);return qi(r,i)}async function wo(e,t,n,r){e.password=null;const i=Si(n),s=await Sd(cd,i,ud,!1,hd),a=await Ed(Object.assign({salt:r},uo),s,8*(En[t]*2+2)),o=new Uint8Array(a),l=Cn(lt,qe(o,0,En[t])),f=Cn(lt,qe(o,En[t],En[t]*2)),d=qe(o,En[t]*2);return Object.assign(e,{keys:{key:l,authentication:f,passwordVerification:d},ctr:new gd(new wd(l),Array.from(md)),hmac:new xd(f)}),d}function Sd(e,t,n,r,i){return pd?Wn.importKey(e,t,n,r,i):Yn.importKey(t)}async function Ed(e,t,n){return _d?await Wn.deriveBits(e,t,n):Yn.pbkdf2(t,e.salt,uo.iterations,n)}function qi(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Dd(e,t){if(t&&t>e.length){const n=e;e=new Uint8Array(t),e.set(n,0)}return e}function qe(e,t,n){return e.subarray(t,n)}function Ln(e,t){return e.fromBits(t)}function Cn(e,t){return e.toBits(t)}const ln=12;class Td extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),go(this,t)},transform(r,i){const s=this;if(s.password){const a=ca(s,r.subarray(0,ln));if(s.password=null,a[ln-1]!=s.passwordVerification)throw new Error(oo);r=r.subarray(ln)}i.enqueue(ca(s,r))}})}}class Ad extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),go(this,t)},transform(r,i){const s=this;let a,o;if(s.password){s.password=null;const l=co(new Uint8Array(ln));l[ln-1]=s.passwordVerification,a=new Uint8Array(r.length+l.length),a.set(da(s,l),0),o=ln}else a=new Uint8Array(r.length),o=0;a.set(da(s,r),o),i.enqueue(a)}})}}function ca(e,t){const n=new Uint8Array(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function xo(e){const t=e.keys[2]|2;return yo(Math.imul(t,t^1)>>>8)}function yo(e){return e&255}function fa(e){return e&4294967295}const ua="deflate-raw";class Od extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:r,CompressionStreamNative:i}){super({});const{compressed:s,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:f,level:d}=t,u=this;let p,w,D=vo(super.readable);(!a||l)&&f&&([D,p]=D.tee(),p=ct(p,new io)),s&&(D=ko(D,o,{level:d,chunkSize:n},i,r)),a&&(l?D=ct(D,new Ad(t)):(w=new vd(t),D=ct(D,w))),bo(u,D,async()=>{let h;a&&!l&&(h=w.signature),(!a||l)&&f&&(h=await p.getReader().read(),h=new DataView(h.value.buffer).getUint32(0)),u.signature=h})}}class Rd extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:r,DecompressionStreamNative:i}){super({});const{zipCrypto:s,encrypted:a,signed:o,signature:l,compressed:f,useCompressionStream:d}=t;let u,p,w=vo(super.readable);a&&(s?w=ct(w,new Td(t)):(p=new yd(t),w=ct(w,p))),f&&(w=ko(w,d,{chunkSize:n},i,r)),(!a||s)&&o&&([w,u]=w.tee(),u=ct(u,new io)),bo(this,w,async()=>{if((!a||s)&&o){const D=await u.getReader().read(),h=new DataView(D.value.buffer);if(l!=h.getUint32(0,!1))throw new Error(lo)}})}}function vo(e){return ct(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function bo(e,t,n){t=ct(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function ko(e,t,n,r,i){try{const s=t&&r?r:i;e=ct(e,new s(ua,n))}catch(s){if(t)e=ct(e,new i(ua,n));else throw s}return e}function ct(e,t){return e.pipeThrough(t)}const Md="message",Id="start",Fd="pull",ha="data",Ld="ack",Cd="close",So="deflate",Eo="inflate";class Nd extends TransformStream{constructor(t,n){super({});const r=this,{codecType:i}=t;let s;i.startsWith(So)?s=Od:i.startsWith(Eo)&&(s=Rd);let a=0;const o=new s(t,n),l=super.readable,f=new TransformStream({transform(d,u){d&&d.length&&(a+=d.length,u.enqueue(d))},flush(){const{signature:d}=o;Object.assign(r,{signature:d,size:a})}});Object.defineProperty(r,"readable",{get(){return l.pipeThrough(o).pipeThrough(f)}})}}const Ud=typeof Worker!=mr;class ni{constructor(t,{readable:n,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:f},d){const{signal:u}=a;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new Pd(n,a,s),{signal:u}),writable:r,options:Object.assign({},i),scripts:f,transferStreams:l,terminate(){const{worker:p,busy:w}=t;p&&!w&&(p.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,d(t)}}),(o&&Ud?Wd:Yd)(t,s)}}class Pd extends TransformStream{constructor(t,{onstart:n,onprogress:r,size:i,onend:s},{chunkSize:a}){let o=0;super({start(){n&&ri(n,i)},async transform(l,f){o+=l.length,r&&await ri(r,o,i),f.enqueue(l)},flush(){t.size=o,s&&ri(s,o)}},{highWaterMark:1,size:()=>a})}}async function ri(e,...t){try{await e(...t)}catch{}}function Yd(e,t){return{run:()=>Hd(e,t)}}function Wd(e,{baseURL:t,chunkSize:n}){return e.interface||Object.assign(e,{worker:Vd(e.scripts[0],t,e),interface:{run:()=>jd(e,{chunkSize:n})}}),e.interface}async function Hd({options:e,readable:t,writable:n,onTaskFinished:r},i){const s=new Nd(e,i);try{await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,size:o}=s;return{signature:a,size:o}}finally{r()}}async function jd(e,t){let n,r;const i=new Promise((p,w)=>{n=p,r=w});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});const{readable:s,options:a,scripts:o}=e,{writable:l,closed:f}=Bd(e.writable);Ei({type:Id,scripts:o.slice(1),options:a,config:t,readable:s,writable:l},e)||Object.assign(e,{reader:s.getReader(),writer:l.getWriter()});const u=await i;try{await l.close()}catch{}return await f,u}function Bd(e){const t=e.getWriter();let n;const r=new Promise(s=>n=s);return{writable:new WritableStream({async write(s){await t.ready,await t.write(s)},close(){t.releaseLock(),n()},abort(s){return t.abort(s)}}),closed:r}}let ma=!0,pa=!0;function Vd(e,t,n){const r={type:"module"};let i,s;typeof e==eo&&(e=e());try{i=new URL(e,t)}catch{i=e}if(ma)try{s=new Worker(i)}catch{ma=!1,s=new Worker(i,r)}else s=new Worker(i,r);return s.addEventListener(Md,a=>Gd(a,n)),s}function Ei(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:s,readable:a,writable:o}=e;const l=[];if(s){const{buffer:f,length:d}=s;d!=f.byteLength&&(s=new Uint8Array(s)),e.value=s.buffer,l.push(e.value)}if(i&&pa?(a&&l.push(a),o&&l.push(o)):e.readable=e.writable=null,l.length)try{return t.postMessage(e,l),!0}catch{pa=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(s){throw n&&n.releaseLock(),r(),s}}async function Gd({data:e},t){const{type:n,value:r,messageId:i,result:s,error:a}=e,{reader:o,writer:l,resolveResult:f,rejectResult:d,onTaskFinished:u}=t;try{if(a){const{message:w,stack:D,code:h,name:c}=a,m=new Error(w);Object.assign(m,{stack:D,code:h,name:c}),p(m)}else{if(n==Fd){const{value:w,done:D}=await o.read();Ei({type:ha,value:w,done:D,messageId:i},t)}n==ha&&(await l.ready,await l.write(new Uint8Array(r)),Ei({type:Ld,messageId:i},t)),n==Cd&&p(null,s)}}catch(w){p(w)}function p(w,D){w?d(w):f(D),l&&l.releaseLock(),u()}}let Bt=[];const ii=[];let _a=0;async function Do(e,t){const{options:n,config:r}=t,{transferStreams:i,useWebWorkers:s,useCompressionStream:a,codecType:o,compressed:l,signed:f,encrypted:d}=n,{workerScripts:u,maxWorkers:p,terminateWorkerTimeout:w}=r;t.transferStreams=i||i===fe;const D=!l&&!f&&!d&&!t.transferStreams;t.useWebWorkers=!D&&(s||s===fe&&r.useWebWorkers),t.scripts=t.useWebWorkers&&u?u[o]:[],n.useCompressionStream=a||a===fe&&r.useCompressionStream;let h;const c=Bt.find(_=>!_.busy);if(c)wa(c),h=new ni(c,e,t,m);else if(Bt.lengthii.push({resolve:_,stream:e,workerOptions:t}));return h.run();function m(_){if(ii.length){const[{resolve:v,stream:b,workerOptions:g}]=ii.splice(0,1);v(new ni(_,b,g,m))}else _.worker?(wa(_),Number.isFinite(w)&&w>=0&&(_.terminateTimeout=setTimeout(()=>{Bt=Bt.filter(v=>v!=_),_.terminate()},w))):Bt=Bt.filter(v=>v!=_)}}function wa(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function Zd(e){const t=()=>URL.createObjectURL(new Blob([`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:"PBKDF2"},B=t.assign({hash:{name:"HMAC"}},R),E=t.assign({iterations:1e3,hash:{name:"SHA-1"}},R),M=["deriveBits"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&"function"==typeof T.importKey,L=N&&W&&"function"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s("Invalid password")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s("Invalid signature")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey("raw",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s("Invalid password");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s("Invalid signature")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)("deflate-raw",n))}catch(r){if(!t)throw r;e=pe(e,new s("deflate-raw",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=le:s.startsWith("inflate")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:"pull",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:"data",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:"close",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&ke(e),"data"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe="oversubscribed dynamic bit lengths tree":-5!=a&&0!==r[0]||(f.Oe="incomplete dynamic bit lengths tree",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe="oversubscribed literal/length tree":-4!=h&&(w.Oe="incomplete literal/length tree",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe="oversubscribed distance tree":-5==h?(w.Oe="incomplete distance tree",h=-3):-4!=h&&(w.Oe="empty distance tree with lengths",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe="invalid distance code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe="invalid literal/length code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe="invalid literal/length code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe="invalid distance code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe="invalid block type",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe="invalid stored block lengths",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe="too many length or distance symbols",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe="invalid bit length repeat",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe="need dictionary",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye}; +`],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}const To="HTTP error ",Rr="HTTP Range not supported",qd="Writer iterator completed too soon",zd="text/plain",$d="Content-Length",Kd="Content-Range",Xd="Accept-Ranges",Jd="Range",Qd="Content-Type",ef="HEAD",$i="GET",Ao="bytes",tf=64*1024,Ki="writable";class Mr{constructor(){this.size=0}init(){this.initialized=!0}}class Yt extends Mr{get readable(){const t=this,{chunkSize:n=tf}=t,r=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:s=0,size:a,diskNumberStart:o}=r,{chunkOffset:l}=this;i.enqueue(await Ie(t,s+l,Math.min(n,a-l),o)),l+n>a?i.close():this.chunkOffset+=n}});return r}}class Oo extends Mr{constructor(){super();const t=this,n=new WritableStream({write(r){return t.writeUint8Array(r)}});Object.defineProperty(t,Ki,{get(){return n}})}writeUint8Array(){}}class Di extends Yt{constructor(t){super();let n=t.length;for(;t.charAt(n-1)=="=";)n--;const r=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:r,size:Math.floor((n-r)*.75)})}readUint8Array(t,n){const{dataStart:r,dataURI:i}=this,s=new Uint8Array(n),a=Math.floor(t/3)*4,o=atob(i.substring(a+r,Math.ceil((t+n)/3)*4+r)),l=t-Math.floor(a/4)*3;for(let f=l;f2?n.data+=btoa(i):n.pending=i}getData(){return this.data+btoa(this.pending)}}class hn extends Yt{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){const r=this;return new Uint8Array(await r.blob.slice(t,t+n).arrayBuffer())}}class zt extends Mr{constructor(t){super();const n=this,r=new TransformStream,i=[];t&&i.push([Qd,t]),Object.defineProperty(n,Ki,{get(){return r.writable}}),n.blob=new Response(r.readable,{headers:i}).blob()}getData(){return this.blob}}class Ro extends hn{constructor(t){super(new Blob([t],{type:zd}))}}class Ti extends zt{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:n}=this,r=await super.getData();if(r.text&&n)return r.text();{const i=new FileReader;return new Promise((s,a)=>{Object.assign(i,{onload:({target:o})=>s(o.result),onerror:()=>a(i.error)}),i.readAsText(r,t)})}}}class nf extends Yt{constructor(t,n){super(),Mo(this,t,n)}async init(){super.init(),await Io(this,Ai,ga)}readUint8Array(t,n){return Fo(this,t,n,Ai,ga)}}class rf extends Yt{constructor(t,n){super(),Mo(this,t,n)}async init(){super.init(),await Io(this,Oi,xa)}readUint8Array(t,n){return Fo(this,t,n,Oi,xa)}}function Mo(e,t,n){const{preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s}=n;n=Object.assign({},n),delete n.preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.useXHR,Object.assign(e,{url:t,options:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s})}async function Io(e,t,n){const{url:r,useRangeHeader:i,forceRangeRequests:s}=e;if(af(r)&&(i||s)){const{headers:a}=await t($i,e,Lo(e));if(!s&&a.get(Xd)!=Ao)throw new Error(Rr);{let o;const l=a.get(Kd);if(l){const f=l.trim().split(/\s*\/\s*/);if(f.length){const d=f[1];d&&d!="*"&&(o=Number(d))}}o===fe?await ya(e,t,n):e.size=o}}else await ya(e,t,n)}async function Fo(e,t,n,r,i){const{data:s,useRangeHeader:a,forceRangeRequests:o,options:l}=e;if(a||o){const f=await r($i,e,Lo(e,t,n));if(f.status!=206)throw new Error(Rr);return new Uint8Array(await f.arrayBuffer())}else return s||await i(e,l),new Uint8Array(s.subarray(t,t+n))}function Lo(e,t=0,n=1){return Object.assign({},Xi(e),{[Jd]:Ao+"="+t+"-"+(t+n-1)})}function Xi({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function ga(e){await Co(e,Ai)}async function xa(e){await Co(e,Oi)}async function Co(e,t){const n=await t($i,e,Xi(e));e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function ya(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t(ef,e,Xi(e))).headers.get($d);i?e.size=Number(i):await n(e,e.options)}}async function Ai(e,{options:t,url:n},r){const i=await fetch(n,Object.assign({},t,{method:e,headers:r}));if(i.status<400)return i;throw i.status==416?new Error(Rr):new Error(To+(i.statusText||i.status))}function Oi(e,{url:t},n){return new Promise((r,i)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",()=>{if(s.status<400){const a=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(o=>{const l=o.trim().split(/\s*:\s*/);l[0]=l[0].trim().replace(/^[a-z]|-[a-z]/g,f=>f.toUpperCase()),a.push(l)}),r({status:s.status,arrayBuffer:()=>s.response,headers:new Map(a)})}else i(s.status==416?new Error(Rr):new Error(To+(s.statusText||s.status)))},!1),s.addEventListener("error",a=>i(a.detail.error),!1),s.open(e,t),n)for(const a of Object.entries(n))s.setRequestHeader(a[0],a[1]);s.responseType="arraybuffer",s.send()})}class va extends Yt{constructor(t,n={}){super(),Object.assign(this,{url:t,reader:n.useXHR?new rf(t,n):new nf(t,n)})}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(t,n){return this.reader.readUint8Array(t,n)}}class Ri extends Yt{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,n){return this.array.slice(t,t+n)}}class gr extends Oo{init(t=0){super.init(),Object.assign(this,{offset:0,array:new Uint8Array(t)})}writeUint8Array(t){const n=this;if(n.offset+t.length>n.array.length){const r=n.array;n.array=new Uint8Array(r.length+t.length),n.array.set(r)}n.array.set(t,n.offset),n.offset+=t.length}getData(){return this.array}}class sf extends Yt{constructor(t){super(),this.readers=t}async init(){super.init();const t=this,{readers:n}=t;t.lastDiskNumber=0,await Promise.all(n.map(async r=>{await r.init(),t.size+=r.size}))}async readUint8Array(t,n,r=0){const i=this,{readers:s}=this;let a,o=r;o==-1&&(o=s.length-1);let l=t;for(;l>=s[o].size;)l-=s[o].size,o++;const f=s[o],d=f.size;if(l+n<=d)a=await Ie(f,l,n);else{const u=d-l;a=new Uint8Array(n),a.set(await Ie(f,l,u)),a.set(await i.readUint8Array(t+u,n-u,r),u)}return i.lastDiskNumber=Math.max(o,i.lastDiskNumber),a}}class ba extends Mr{constructor(t,n=4294967296){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,availableSize:n});let i,s,a;const o=new WritableStream({async write(d){if(a)if(i.size+d.length>=n){const u=n-i.size;await l(d.slice(0,u)),await f(),r.diskOffset+=i.size,r.diskNumber++,a=null,await this.write(d.slice(u))}else d.length&&await l(d),r.availableSize=n-i.size;else{const{value:u,done:p}=await t.next();if(p&&!u)throw new Error(qd);i=u,i.size=0,s=u.writable,a=s.getWriter(),await this.write(d)}},async close(){await a.ready,await f()}});Object.defineProperty(r,Ki,{get(){return o}});async function l(d){await a.ready,await a.write(d),i.size+=d.length,r.size+=d.length}async function f(){s.size=i.size,await a.close()}}}function af(e){const{baseURL:t}=Vi(),{protocol:n}=new URL(e,t);return n=="http:"||n=="https:"}async function ze(e,t){e.init&&!e.initialized&&await e.init(t)}function Ie(e,t,n,r){return e.readUint8Array(t,n,r)}const No="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),of=No.length==256;function lf(e){if(of){let t="";for(let n=0;nthis[n]=t[n])}}const si="File format is not recognized",uf="End of central directory not found",hf="End of Zip64 central directory not found",mf="End of Zip64 central directory locator not found",pf="Central directory header not found",_f="Local file header not found",wf="Zip64 extra field not found",gf="File contains encrypted entry",xf="Encryption method not supported",ka="Compression method not supported",Sa="Split zip file",Ea="utf-8",Da="cp437",yf=[[Ho,pe],[jo,pe],[Bo,pe],[Ii,ke]],vf={[ke]:{getValue:_e,bytes:4},[pe]:{getValue:lr,bytes:8}};class bf{constructor(t,n={}){t instanceof ReadableStream&&(t={readable:t}),Object.assign(this,{reader:t,options:n,config:Vi()})}async*getEntriesGenerator(t={}){const n=this;let{reader:r}=n;const{config:i}=n;if(await ze(r),(r.size===fe||!r.readUint8Array)&&(Array.isArray(r)?r=new sf(r):r=new hn(await new Response(r.readable).blob()),await ze(r)),r.size=r.size)throw new Error(si);let _=0,v=await Ie(r,l,o,D),b=Te(v);if(o){const k=s.offset-o;if(_e(b,_)!=gi&&l!=k){const S=l;l=k,c=l-S,v=await Ie(r,l,o,D),b=Te(v)}}if(l<0||l>=r.size)throw new Error(si);const g=tt(n,t,"filenameEncoding"),y=tt(n,t,"commentEncoding");for(let k=0;kS.getData(ht,Wt,Ht),_=we;const{onprogress:Dt}=t;if(Dt)try{await Dt(k+1,h,new xr(S))}catch{}yield Wt}const x=tt(n,t,"extractPrependedData"),E=tt(n,t,"extractAppendedData");return x&&(n.prependedData=m>0?await Ie(r,0,m):new Uint8Array),n.comment=d?await Ie(r,f+sn,d):new Uint8Array,E&&(n.appendedData=u>>8&255:p>>>24&255),signature:p,compressed:f!=0,encrypted:b,useWebWorkers:tt(i,r,"useWebWorkers"),useCompressionStream:tt(i,r,"useCompressionStream"),transferStreams:tt(i,r,"transferStreams")},config:d,streamOptions:{signal:S,size:E,onstart:A,onprogress:P,onend:F}};return k.size+=(await Do({readable:x,writable:k},B)).size,tt(i,r,"preventClose")||await k.close(),t.getData?t.getData():k}}function $o(e,t,n){const r=e.rawBitFlag=ve(t,n+2),i=(r&yi)==yi,s=_e(t,n+6);Object.assign(e,{encrypted:i,version:ve(t,n),bitFlag:{level:(r&rd)>>1,dataDescriptor:(r&vi)==vi,languageEncodingFlag:(r&bi)==bi},rawLastModDate:s,lastModDate:Of(s),filenameLength:ve(t,n+22),extraFieldLength:ve(t,n+24)})}async function Ko(e,t,n,r){const{rawExtraField:i}=t,s=t.extraField=new Map,a=Te(new Uint8Array(i));let o=0;try{for(;ot[i]==s);for(let i=0,s=0;i{if(e.data.length>=a+4){const f=_e(n,a);t[o]=e[o]=new Date(f*1e3);const d=s[l];e[d]=f}a+=4})}async function Af(e,t,n,r,i){const s=new Uint8Array(4),a=Te(s);Rf(a,0,t);const o=r+i;return await l(r)||await l(Math.min(o,n));async function l(f){const d=n-f,u=await Ie(e,d,f);for(let p=u.length-r;p>=0;p--)if(u[p]==s[0]&&u[p+1]==s[1]&&u[p+2]==s[2]&&u[p+3]==s[3])return{offset:d+p,buffer:u.slice(p,p+r).buffer}}}function tt(e,t,n){return t[n]===fe?e.options[n]:t[n]}function Of(e){const t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function ai(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function cn(e,t){return e.getUint8(t)}function ve(e,t){return e.getUint16(t,!0)}function _e(e,t){return e.getUint32(t,!0)}function lr(e,t){return Number(e.getBigUint64(t,!0))}function Rf(e,t,n){e.setUint32(t,n,!0)}function Te(e){return new DataView(e.buffer)}const Mf="File already exists",If="Zip file comment exceeds 64KB",Ff="File entry comment exceeds 64KB",Lf="File entry name exceeds 64KB",Aa="Version exceeds 65535",Cf="The strength must equal 1, 2, or 3",Nf="Extra field type exceeds 65535",Uf="Extra field data exceeds 64KB",ts="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Oa=new Uint8Array([7,0,2,0,65,69,3,0,0]),Xo=28;let oi=0;const Ra=[];class Pf{constructor(t,n={}){t.writable===fe&&typeof t.next==eo&&(t=new ba(t)),t instanceof WritableStream&&(t={writable:t}),t.writable.size===fe&&(t.writable.size=0);const r=t instanceof ba;r||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0}),Object.assign(this,{writer:t,addSplitZipSignature:r,options:n,config:Vi(),files:new Map,filenames:new Set,offset:t.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set})}async add(t="",n,r={}){const i=this,{pendingAddFileCalls:s,config:a}=i;oiRa.push(l));let o;try{if(t=t.trim(),i.filenames.has(t))throw new Error(Mf);return i.filenames.add(t),o=Yf(i,t,n,r),s.add(o),await o}catch(l){throw i.filenames.delete(t),l}finally{s.delete(o);const l=Ra.shift();l?l():oi--}}async close(t=new Uint8Array,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:s}=i;for(;r.size;)await Promise.all(Array.from(r));return await qf(this,t,n),!i.preventClose&&!n.preventClose&&await s.close(),i.getData?i.getData():s}}async function Yf(e,t,n,r){t=t.trim(),r.directory&&!t.endsWith(or)?t+=or:r.directory=t.endsWith(or);const i=Si(t);if(ee(i)>ke)throw new Error(Lf);const s=r.comment||"",a=Si(s);if(ee(a)>ke)throw new Error(Ff);const o=e.options.version||r.version||0;if(o>ke)throw new Error(Aa);const l=e.options.versionMadeBy||r.versionMadeBy||20;if(l>ke)throw new Error(Aa);const f=xe(e,r,Ji)||new Date,d=xe(e,r,Qi),u=xe(e,r,es),p=xe(e,r,"password"),w=xe(e,r,"encryptionStrength")||3,D=xe(e,r,"zipCrypto");if(p!==fe&&w!==fe&&(w<1||w>3))throw new Error(Cf);let h=new Uint8Array;const{extraField:c}=r;if(c){let he=0,V=0;c.forEach(Z=>he+=4+ee(Z)),h=new Uint8Array(he),c.forEach((Z,Se)=>{if(Se>ke)throw new Error(Nf);if(ee(Z)>ke)throw new Error(Uf);be(h,new Uint16Array([Se]),V),be(h,new Uint16Array([ee(Z)]),V+2),be(h,Z,V+4),V+=4+ee(Z)})}let m=xe(e,r,"extendedTimestamp");m===fe&&(m=!0);let _=0,v=0,b=xe(e,r,"keepOrder");b===fe&&(b=!0);let g=0,y=xe(e,r,qo);y===fe&&(y=!0);const x=xe(e,r,Go)||0,E=xe(e,r,Zo)||0;let k=xe(e,r,zo);n&&(n instanceof ReadableStream&&(n={readable:n}),await ze(n),n.size===fe?(r.dataDescriptor=!0,(k||k===fe)&&(k=!0,_=pe)):(g=n.size,_=$f(g)));const{diskOffset:S}=e.writer;if(e.offset+e.pendingEntriesSize-S>=pe||g>=pe||_>=pe){if(k===!1||!b)throw new Error(ts);k=!0}k=k||!1;const A=xe(e,r,"level"),P=xe(e,r,"useWebWorkers"),F=xe(e,r,"bufferedWrite");let B=xe(e,r,"dataDescriptor"),N=xe(e,r,"dataDescriptorSignature");const Y=xe(e,r,"signal"),j=xe(e,r,"useCompressionStream");B===fe&&(B=!0),B&&N===fe&&(N=!1),r=Object.assign({},r,{rawFilename:i,rawComment:a,version:o,versionMadeBy:l,lastModDate:f,lastAccessDate:d,creationDate:u,rawExtraField:h,zip64:k,password:p,level:A,useWebWorkers:P,encryptionStrength:w,extendedTimestamp:m,zipCrypto:D,bufferedWrite:F,keepOrder:b,dataDescriptor:B,dataDescriptorSignature:N,signal:Y,msDosCompatible:y,internalFileAttribute:x,externalFileAttribute:E,useCompressionStream:j});const q=jf(r),we=Bf(r);v=ee(q.localHeaderArray,we.dataDescriptorArray)+_,e.pendingEntriesSize+=v;let W;try{W=await Wf(e,t,n,{headerInfo:q,dataDescriptorInfo:we},r)}finally{e.pendingEntriesSize-=v}return Object.assign(W,{name:t,comment:s,extraField:c}),new xr(W)}async function Wf(e,t,n,r,i){const{files:s,writer:a}=e,{keepOrder:o,dataDescriptor:l,signal:f}=i,d=Array.from(s.values()).pop();let u={},p,w,D,h,c,m;s.set(t,u);try{let b;o&&(b=d&&d.lock,_()),i.bufferedWrite||e.lockWriter||!l?(m=new zt,m.writable.size=0,p=!0,await ze(a)):(m=a,e.lockWriter=Promise.resolve(),w=()=>delete e.lockWriter),await ze(m);const{writable:g,diskNumber:y}=a;let{diskOffset:x}=a;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const E=new Uint8Array(4),k=He(E);Q(k,0,ji),await Nt(g,E),e.offset+=4}if(p||await b,c=!0,u.diskNumberStart=y,u=await Hf(n,m,u,r,e.config,i),c=!1,s.set(t,u),u.filename=t,p){await m.writable.close();let E=await m.getData();await b,await v(),h=!0,l||(E=await Gf(u,E,g,i)),u.diskNumberStart=a.diskNumber,x=a.diskOffset,await E.stream().pipeTo(g,{preventClose:!0,signal:f}),g.size+=E.size,h=!1}if(u.offset=e.offset-x,u.zip64)Zf(u);else if(u.offset>=pe)throw new Error(ts);return e.offset+=u.length,u}catch(b){throw(p&&h||!p&&c)&&(e.hasCorruptedEntries=!0,b&&(b.corruptedEntry=!0),p?e.offset+=m.writable.size:e.offset=m.writable.size),s.delete(t),b}finally{D&&D(),w&&w()}function _(){u.lock=new Promise(b=>D=b)}async function v(){const{lockWriter:b}=e;if(b)return await b.then(()=>delete e.lockWriter),v();e.lockWriter=new Promise(g=>w=g)}}async function Hf(e,t,{diskNumberStart:n,lock:r},i,s,a){const{headerInfo:o,dataDescriptorInfo:l}=i,{localHeaderArray:f,headerArray:d,lastModDate:u,rawLastModDate:p,encrypted:w,compressed:D,version:h,compressionMethod:c,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:v}=o,{dataDescriptorArray:b}=l,{rawFilename:g,lastAccessDate:y,creationDate:x,password:E,level:k,zip64:S,zipCrypto:A,dataDescriptor:P,directory:F,versionMadeBy:B,rawComment:N,rawExtraField:Y,useWebWorkers:j,onstart:q,onprogress:we,onend:W,signal:he,encryptionStrength:V,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,useCompressionStream:Wt}=a,Dt={lock:r,versionMadeBy:B,zip64:S,directory:Boolean(F),filenameUTF8:!0,rawFilename:g,commentUTF8:!0,rawComment:N,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:v,rawExtraField:Y,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,diskNumberStart:n};let ht=0,Ht=0,wn;const{writable:Ve}=t;if(e){e.chunkSize=no(s),await Nt(Ve,f);const gn=e.readable,Ee=gn.size=e.size,Pe={options:{codecType:So,level:k,password:E,encryptionStrength:V,zipCrypto:w&&A,passwordVerification:w&&A&&p>>8&255,signed:!0,compressed:D,encrypted:w,useWebWorkers:j,useCompressionStream:Wt,transferStreams:!1},config:s,streamOptions:{signal:he,size:Ee,onstart:q,onprogress:we,onend:W}},Xt=await Do({readable:gn,writable:Ve},Pe);Ve.size+=Xt.size,wn=Xt.signature,Ht=e.size=gn.size,ht=Xt.size}else await Nt(Ve,f);const Tt=S?new Uint8Array(Xo+4):new Uint8Array;return e&&Vf({signature:wn,rawExtraFieldZip64:Tt,compressedSize:ht,uncompressedSize:Ht,headerInfo:o,dataDescriptorInfo:l},a),P&&await Nt(Ve,b),Object.assign(Dt,{compressedSize:ht,lastModDate:u,rawLastModDate:p,creationDate:x,lastAccessDate:y,encrypted:w,length:ee(f,b)+ht,compressionMethod:c,version:h,headerArray:d,signature:wn,rawExtraFieldZip64:Tt}),Dt}function jf(e){const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,password:s,level:a,zip64:o,zipCrypto:l,dataDescriptor:f,directory:d,rawExtraField:u,encryptionStrength:p,extendedTimestamp:w}=e,D=a!==0&&!d,h=Boolean(s&&ee(s));let c;if(h&&!l){c=new Uint8Array(ee(Oa)+2);const N=He(c);re(N,0,Xa),be(c,Oa,2),yr(N,8,p)}else c=new Uint8Array;let m,_;if(w){_=new Uint8Array(9+(r?4:0)+(i?4:0));const N=He(_);re(N,0,Bi),re(N,2,ee(_)-4);const Y=1+(r?2:0)+(i?4:0);yr(N,4,Y),Q(N,5,Math.floor(n.getTime()/1e3)),r&&Q(N,9,Math.floor(r.getTime()/1e3)),i&&Q(N,13,Math.floor(i.getTime()/1e3));try{m=new Uint8Array(36);const j=He(m),q=li(n);re(j,0,Ja),re(j,2,32),re(j,8,Qa),re(j,10,24),Ue(j,12,q),Ue(j,20,li(r)||q),Ue(j,28,li(i)||q)}catch{m=new Uint8Array}}else m=_=new Uint8Array;let v=bi;f&&(v=v|vi);let b=Ga;D&&(b=wi);let g=e.version||id;o&&(g=g>ia?g:ia),h&&(v=v|yi,l||(g=g>sa?g:sa,b=Za,D&&(c[9]=wi)));const y=new Uint8Array(26),x=He(y);re(x,0,g),re(x,2,v),re(x,4,b);const E=new Uint32Array(1),k=He(E);let S;naa?S=aa:S=n,re(k,0,(S.getHours()<<6|S.getMinutes())<<5|S.getSeconds()/2),re(k,2,(S.getFullYear()-1980<<4|S.getMonth()+1)<<5|S.getDate());const A=E[0];Q(x,6,A),re(x,22,ee(t));const P=ee(c,_,m,u);re(x,24,P);const F=new Uint8Array(30+ee(t)+P),B=He(F);return Q(B,0,qa),be(F,y,4),be(F,t,30),be(F,c,30+ee(t)),be(F,_,30+ee(t,c)),be(F,m,30+ee(t,c,_)),be(F,u,30+ee(t,c,_,m)),{localHeaderArray:F,headerArray:y,headerView:x,lastModDate:n,rawLastModDate:A,encrypted:h,compressed:D,version:g,compressionMethod:b,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:m,rawExtraFieldAES:c}}function Bf(e){const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i=new Uint8Array,s,a=0;return n&&(i=new Uint8Array(t?r?24:20:r?16:12),s=He(i),r&&(a=4,Q(s,0,Qc))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}}function Vf(e,t){const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:s,headerInfo:a,dataDescriptorInfo:o}=e,{headerView:l,encrypted:f}=a,{dataDescriptorView:d,dataDescriptorOffset:u}=o,{zip64:p,zipCrypto:w,dataDescriptor:D}=t;if((!f||w)&&n!==fe&&(Q(l,10,n),D&&Q(d,u,n)),p){const h=He(r);re(h,0,Ka),re(h,2,Xo),Q(l,14,pe),Ue(h,12,BigInt(i)),Q(l,18,pe),Ue(h,4,BigInt(s)),D&&(Ue(d,u+4,BigInt(i)),Ue(d,u+12,BigInt(s)))}else Q(l,14,i),Q(l,18,s),D&&(Q(d,u+4,i),Q(d,u+8,s))}async function Gf(e,t,n,{zipCrypto:r}){const i=await zf(t,0,26),s=new DataView(i);return(!e.encrypted||r)&&Q(s,14,e.signature),e.zip64?(Q(s,18,pe),Q(s,22,pe)):(Q(s,18,e.compressedSize),Q(s,22,e.uncompressedSize)),await Nt(n,new Uint8Array(i)),t.slice(i.byteLength)}function Zf(e){const{rawExtraFieldZip64:t,offset:n,diskNumberStart:r}=e,i=He(t);Ue(i,20,BigInt(n)),Q(i,28,r)}async function qf(e,t,n){const{files:r,writer:i}=e;let s=0,a=0;const{diskOffset:o,writable:l}=i;let{diskNumber:f}=i,d=e.offset-o,u=r.size;for(const[,{rawFilename:b,rawExtraFieldZip64:g,rawExtraFieldAES:y,rawExtraField:x,rawComment:E,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:S}]of r)a+=46+ee(b,E,g,y,k,S,x);let p=n.zip64||e.options.zip64||!1;if(d>=pe||a>=pe||u>=ke){if(n.zip64===!1||e.options.zip64===!1)throw new Error(ts);p=!0}const w=new Uint8Array(a),D=He(w);for(const[b,g]of Array.from(r.values()).entries()){const{offset:y,rawFilename:x,rawExtraFieldZip64:E,rawExtraFieldAES:k,rawExtraFieldNTFS:S,rawExtraField:A,rawComment:P,versionMadeBy:F,headerArray:B,directory:N,zip64:Y,msDosCompatible:j,internalFileAttribute:q,externalFileAttribute:we,extendedTimestamp:W,lastModDate:he,diskNumberStart:V}=g;let Z;if(W){Z=new Uint8Array(9);const ue=He(Z);re(ue,0,Bi),re(ue,2,ee(Z)-4),yr(ue,4,1),Q(ue,5,Math.floor(he.getTime()/1e3))}else Z=new Uint8Array;const Se=ee(E,k,Z,S,A);if(Q(D,s,gi),re(D,s+4,F),be(w,B,s+6),re(D,s+30,Se),re(D,s+32,ee(P)),re(D,s+34,Y?ke:V),re(D,s+36,q),we?Q(D,s+38,we):N&&j&&yr(D,s+38,ki),Q(D,s+42,Y?pe:y),be(w,x,s+46),be(w,E,s+46+ee(x)),be(w,k,s+46+ee(x,E)),be(w,Z,s+46+ee(x,E,k)),be(w,S,s+46+ee(x,E,k,Z)),be(w,A,s+46+ee(x,E,k,Z,S)),be(w,P,s+46+ee(x)+Se),s+=46+ee(x,P)+Se,n.onprogress)try{await n.onprogress(b+1,r.size,new xr(g))}catch{}}await ze(i),await Nt(l,w);const h=new Uint8Array(p?ed:sn),c=He(h);let m=i.diskNumber;const{availableSize:_}=i;_n&&(t+=n.length)),t}class Jo{constructor(t,n,r,i){const s=this;if(t.root&&i&&i.getChildByName(n))throw new Error("Entry filename already exists");r||(r={}),Object.assign(s,{fs:t,name:n,data:r.data,id:t.entries.length,parent:i,children:[],uncompressedSize:0}),t.entries.push(s),i&&s.parent.children.push(s)}moveTo(t){const n=this;n.fs.move(n,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){const n=this;let r=n.name,i=n.parent;for(;i&&i!=t;)r=(i.name?i.name+"/":"")+r,i=i.parent;return r}isDescendantOf(t){let n=this.parent;for(;n&&n.id!=t.id;)n=n.parent;return Boolean(n)}}class Qo extends Jo{constructor(t,n,r,i){super(t,n,r,i);const s=this;s.Reader=r.Reader,s.Writer=r.Writer,r.getData&&(s.getData=r.getData)}async getData(t,n={}){const r=this;if(!t||t.constructor==r.Writer&&r.data)return r.data;{const i=r.reader=new r.Reader(r.data,n);await Promise.all([ze(i),ze(t,r.data.uncompressedSize)]);const s=i.readable;return s.size=r.uncompressedSize=i.size,await s.pipeTo(t.writable),t.getData?t.getData():t.writable}}getText(t,n){return this.getData(new Ti(t),n)}getBlob(t,n){return this.getData(new zt(t),n)}getData64URI(t,n){return this.getData(new wr(t),n)}getUint8Array(t){return this.getData(new gr,t)}getWritable(t=new WritableStream,n){return this.getData({writable:t},n)}replaceBlob(t){Object.assign(this,{data:t,Reader:hn,Writer:zt,reader:null})}replaceText(t){Object.assign(this,{data:t,Reader:Ro,Writer:Ti,reader:null})}replaceData64URI(t){Object.assign(this,{data:t,Reader:Di,Writer:wr,reader:null})}replaceUint8Array(t){Object.assign(this,{data:t,Reader:Ri,Writer:gr,reader:null})}replaceReadable(t){Object.assign(this,{data:null,Reader:function(){return{readable:t}},Writer:null,reader:null})}}class Hn extends Jo{constructor(t,n,r,i){super(t,n,r,i),this.directory=!0}addDirectory(t){return mt(this,t,null,!0)}addText(t,n){return mt(this,t,{data:n,Reader:Ro,Writer:Ti})}addBlob(t,n){return mt(this,t,{data:n,Reader:hn,Writer:zt})}addData64URI(t,n){return mt(this,t,{data:n,Reader:Di,Writer:wr})}addUint8Array(t,n){return mt(this,t,{data:n,Reader:Ri,Writer:gr})}addHttpContent(t,n,r={}){return mt(this,t,{data:n,Reader:class extends va{constructor(i){super(i,r)}}})}addReadable(t,n){return mt(this,t,{Reader:function(){return{readable:n}}})}addFileSystemEntry(t){return tu(this,t)}addData(t,n){return mt(this,t,n)}async importBlob(t,n={}){await this.importZip(new hn(t),n)}async importData64URI(t,n={}){await this.importZip(new Di(t),n)}async importUint8Array(t,n={}){await this.importZip(new Ri(t),n)}async importHttpContent(t,n={}){await this.importZip(new va(t,n),n)}async importReadable(t,n={}){await this.importZip({readable:t},n)}exportBlob(t={}){return this.exportZip(new zt("application/zip"),t)}exportData64URI(t={}){return this.exportZip(new wr("application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new gr,t)}async exportWritable(t=new WritableStream,n={}){return await this.exportZip({writable:t},n),t}async importZip(t,n){await ze(t),(await new bf(t,n).getEntries()).forEach(s=>{let a=this;const o=s.filename.split("/"),l=o.pop();o.forEach(f=>a=a.getChildByName(f)||new Hn(this.fs,f,null,a)),s.directory||mt(a,l,{data:s,Reader:Qf(Object.assign({},n))})})}async exportZip(t,n){const r=this;await Promise.all([el(r),ze(t)]);const i=new Pf(t,n);return await eu(i,r,Jf([r],"uncompressedSize"),n),await i.close(),t.getData?t.getData():t.writable}getChildByName(t){const n=this.children;for(let r=0;r{n.id==e.id&&t.splice(r,1)})}async function eu(e,t,n,r){const i=t,s=new Map;await a(e,t);async function a(o,l){await f();async function f(){if(r.bufferedWrite)await Promise.all(l.children.map(d));else for(const u of l.children)await d(u)}async function d(u){const p=r.relativePath?u.getRelativeName(i):u.getFullname();await o.add(p,u.reader,Object.assign({directory:u.directory},Object.assign({},r,{onprogress:async w=>{if(r.onprogress){s.set(p,w);try{await r.onprogress(Array.from(s.values()).reduce((D,h)=>D+h),n)}catch{}}}}))),await a(o,u)}}}async function tu(e,t){if(t.isDirectory){const i=e.addDirectory(t.name);return await n(i,t),i}else return new Promise((i,s)=>t.file(a=>i(e.addBlob(t.name,a)),s));async function n(i,s){const a=await r(s);for(const o of a)o.isDirectory?await n(i.addDirectory(o.name),o):await new Promise((l,f)=>{o.file(d=>{const u=i.addBlob(o.name,d);u.uncompressedSize=d.size,l(u)},f)})}function r(i){return new Promise((s,a)=>{let o=[];i.isDirectory&&l(i.createReader()),i.isFile&&s(o);function l(f){f.readEntries(d=>{d.length?(o=o.concat(d),l(f)):s(o)},a)}})}}function en(e){e.entries=[],e.root=new Hn(e)}function mt(e,t,n,r){if(e.directory)return r?new Hn(e.fs,t,n,e):new Qo(e.fs,t,n,e);throw new Error("Parent entry is not a directory")}let tl;try{tl=import.meta.url}catch{}Gi({baseURL:tl});Zd(Gi);Gi({Deflate:Mc,Inflate:Jc});function Ir(e){return e.slice(e.lastIndexOf(Fr)+1)}const Fr="/";class nu{constructor(t){Zn(this,"zipFS");Zn(this,"chunks",[]);Zn(this,"chunkIndex",0);this.zipBlob=t}async initReadingVault(){this.zipFS=new Xf.FS,await this.zipFS.importBlob(this.zipBlob)}readDirectory(t){return this.zipFS.find(t).children.map(r=>({isDirectory:()=>!!r.directory,getName:()=>r.getFullname()}))}readFile(t){return this.zipFS.find(t).getText("utf-8")}exists(t){return!!this.zipFS.find(t)}resolve(t){return t}resolveInDir(t,n){return t+Fr+n}removeFile(t){}renameFile(t,n){}appendToFile(t,n){this.chunks.push(n)}appendToPostProcessingFile(t,n){this.chunks[this.chunkIndex]=n,this.chunkIndex++}initReadingResultFile(t){}chunkIter(){const t=this.chunks;let n=0;return{[Symbol.asyncIterator](){return{async next(){if(n{if(s.forEach((o,l)=>s[l]+=a),r==="seenOne"&&a!=="["&&(r="normal"),r==="seenOneOut"&&a!=="]"&&(r="normal"),a==="["&&(i+=1,r==="seenOne"?(s.push(""),r="normal"):r==="normal"&&(r="seenOne")),a==="]"&&i>0){if(i-=1,r==="seenOneOut"){const o=s.pop();o&&(!t||s.length===0)&&n.push(o.slice(0,-2)),r="normal"}else r==="normal"&&(r="seenOneOut");i===0&&(r="normal")}}),n}function Ia(e){return Ir(e)!==e}class ci extends Map{fullRetrieveAndUpdate(t,n,r){const i=Array.from(this.keys());let s=i.find(a=>a.path===n);return s||(s=i.find(a=>a.name===t)),s||(s={path:n,name:t},this.set(s,r())),s.name=t,s.path=n,this.get(s)}partialRetrieveAndUpdate(t,n){const r=Array.from(this.keys()),i=Ia(t);let s;return i?s=r.find(a=>a.path===t):s=r.find(a=>a.name===t),s||(i?s={path:t}:s={name:t},this.set(s,n())),this.get(s)}findMatchingFile(t){const n=Array.from(this.keys()),r=Ia(t);let i;return r?i=n.find(s=>s.path===t):i=n.find(s=>s.name===t),i}}function Lr(e){e.totalNodes++,e.leafNodes++}function nl(e){e.leafNodes--,e.topLevelNodes++}function su(e,t,n=ru){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},fileSystemAdapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new ci,headingTracker:new ci,dummyHeadingLinkTracker:new Map,blockLinkTracker:new ci,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:"YYYY-MM-DD"}}function bt(e){return Lr(e.summary),e.idGenerator()}function au(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.partialRetrieveAndUpdate(n,()=>new Map);let s=i.get(r);return s||(s={uid:bt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function ou(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.fullRetrieveAndUpdate(r,t,()=>new Map);let a=s.get(i);return a||(a={uid:bt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function lu(e){const t=[];for(const n of e.values())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function cu(e){let t;return[e.split(` +`).map(r=>{const i=r.split(" "),s=i[i.length-1];if(s.startsWith("^"))return t=s,i.slice(0,-1).join(" ")}).join(` +`),t]}function rl(e,t,n,r,i,s){const a=[t],o=[e];for(const l of n){const f=i(l);du(f,l,a,o,r),s==null||s(f,l)}}function du(e,t,n,r,i){var o;fu(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(o=a.children)!=null?o:[],a.children.push(e)),n.push(t),r.push(e)}function fu(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function il(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=il(n.children,r);if(i)return i}}return null}function uu(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function hu(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const o=t.findMatchingFile(s),l=o?t.get(o):null;if(l){const f={uid:"DUMMY",content:"",level:-1},d={uid:"DUMMY",content:""};rl(d,f,l,(p,w)=>p.level({uid:p.uid,content:p.content,children:void 0}));const u=(i=d.children)!=null?i:[];for(const p of a){const w=il(u,p.link);w?r.push({old:p.uid,new:w.uid}):n.push(p)}}else n.push(...a)}return[r,n]}async function mu(e,t){const[n,r]=hu(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Lr(t.summary)});const i=e+"_TEMP";t.fileSystemAdapter.initReadingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.fileSystemAdapter.chunkIter()){let o=a;s.forEach(l=>{o=o.replace(l.old,l.new)}),t.fileSystemAdapter.appendToPostProcessingFile(i,o)}t.fileSystemAdapter.endPostProcessingFile(),t.fileSystemAdapter.removeFile(e),t.fileSystemAdapter.renameFile(i,e)}var sl=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(sl||{});function pu(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function _u(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function wu(e,t){const n=pu(e);switch(_u(n)){case 0:return gu(n[0],t);case 2:return au(n,t);case 1:return uu(n,t);default:throw"Invalid link type detected: "+n}}function gu(e,t){return t.defaultLinkTracker.partialRetrieveAndUpdate(e,()=>(Lr(t.summary),{uid:t.idGenerator(),obsidianLink:e,type:1})).uid}function xu(e,t,n,r){const[i,s]=cu(n);return s?[ou([e,s],t,r),i]:[bt(r),n]}function yu(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.fullRetrieveAndUpdate(r,t,()=>(Lr(n.summary),{uid:n.idGenerator(),obsidianLink:r,type:0}));return i.type=0,i.uid}function vu(e){const t=[];for(const n of e.values())n.type===sl.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function bu(e){return[...e.invalidLinks,...vu(e.defaultLinkTracker),...lu(e.blockLinkTracker)]}function ku(e,t,n){const r=bu(n).sort((a,o)=>a.link.localeCompare(o.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:bt(n),name:i,createdAt:t,editedAt:t,type:"node"};return nl(n.summary),s.children=r,s}function al(e){return e===" "||e===" "}function mn(e,t,n=0){return al(e[t])?mn(e,t+1,n+1):n}function Su(e,t){let n=t,r=e[t];for(;al(r);)n--,r=e[n];return n+1}function $t(e,t,n=0){const r=e[t+n];return ns(r)?t+n:$t(e,t,n+1)}function ol(e,t){const n=e[t-1];return ns(n)}function ns(e){return e===void 0||e===` +`}function ll(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function rs(e,t){let n=!0;const r=t+mn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ll(e,r));const a=Su(e,r-1)-1,o=e[a];return ns(o)&&n?{type:Pt.BULLET,level:r-a-1}:null}function Eu(e,t,n){let r=t+n.level;if(ll(e,r))return r;r+=1+1;const i=mn(e,r);return r+i}function Du(e,t,n){let r=$t(e,t+n.level+1+1),i=e[r];for(;;){const s=mn(e,r+1);if(s==n.level+2&&!rs(e,r+1+s))r=$t(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Tu(e,t){return e+t.level}function Au(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=mn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function cl(e,t){if(!ol(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=$t(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],o=e[i+2];for(;[s,a,o].every(d=>d!==void 0)&&[s,a,o].join("")!=="```";)i++,s=e[i],a=e[i+1],o=e[i+2];if([s,a,o].some(d=>d===void 0))return null;const l=$t(e,i+3);return e.slice(i+3,l).trim()!==""?null:{type:Pt.CODEBLOCK,level:l-t+(e[l]===` +`?1:0),codeLanguage:r!==""?r:void 0}}return null}function dl(e,t){if(!ol(e,t))return null;const n=Ou(e,t);return n>0&&e[t+n]===" "?{type:Pt.HEADING,level:n}:null}function Ou(e,t){let n=t,r=0;for(;e[n]==="#";)n++,r++;return r}function Ru(e,t,n){const r=t+n.level+1,i=mn(e,r);return r+i}function Mu(e,t,n){return $t(e,t+n.level+1)}function Iu(e,t){let n=$t(e,t),r=e[n],i=r;for(n++,r=e[n];;){if(r===void 0)return[n];if(r===` +`&&i===` +`)return[n-1];{const s=Fu(e,n);if(s)return[n-1,s]}i=r,n++,r=e[n]}}function Fu(e,t){let n=dl(e,t);return n||(n=rs(e,t),n)||(n=cl(e,t),n)?n:null}var Pt=(e=>(e.ROOT="Root",e.HEADING="Heading",e.BULLET="Bullet Node",e.PARAGRAPH="Paragraph",e.CODEBLOCK="Code Block",e))(Pt||{});function Lu(e,t=0){const n=[];for(let r=t;rju(i,t,n,r))))}function ju(e,t,n,r){let i=e;r&&(i=Hu(e));let s=t.get(i);return s===void 0&&(s=n(),t.set(i,s)),s}function Bu(e){return Array.from(e.entries()).map(t=>({name:t[0],uid:t[1]}))}function Vu(e){if(e.startsWith("[ ] "))return"todo";if(e.startsWith("[x] ")||e.startsWith("[X] "))return"done"}function Gu(e,t){if(t.type===Pt.BULLET){const n=Vu(e);if(n)return[e.slice(4),n]}return null}function Zu(e){const t=[];let n=Fi(e,0);for(;n!==null;){let r;Array.isArray(n)?(t.push(n),r=n[2]):r=n,n=Fi(e,r)}return t}function Fi(e,t){let n,r="",i="";for(let s=t;s{const o=a[0],l=a[1];if(i.every(f=>o.trim()!==f.name||l.trim()!==f.mediaUrl)){const f=a[3],d=bt(n);e.name=e.name.replaceAll(f,"[["+d+"]]"),i.push({uid:d,name:o.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:l.trim()})}}),e.children=[...(s=e.children)!=null?s:[],...i]}function $u(e,t,n){return{uid:bt(n),name:Au(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function Ku(e,t,n,r,i){var p;if(n.type===Pt.CODEBLOCK)return $u(n,r,i);const[s,a]=xu(e,t,n.content,i),o={uid:s,name:a,createdAt:r,editedAt:r,type:"node"},[l,f]=(p=Gu(a,n))!=null?p:[a,void 0];o.name=l,o.todoState=f,o.name=o.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=Wu(o.name);if(d){const w=d[d.length-1];o.name.endsWith(w)&&(o.name=o.name.slice(0,-w.length)),o.supertags=fl(d,i.superTagTracker,i.idGenerator,!0)}const u=iu(o.name,!0).filter(w=>w.trim()!=="").map(w=>{const D=w.split("|"),h=D[0],c=D[1],m=wu(h,i),_=c!==void 0&&c.trim()!==""?"["+c.trim()+"]([["+m+"]])":"[["+m+"]]";return[w,m,_]});if(u.length>0){const w=new Set;o.refs||(o.refs=[]);for(const[D,h,c]of u)w.add(h),o.name=o.name.replaceAll("[["+D+"]]",c);o.refs.push(...Array.from(w.values()))}return zu(o,r,i),o}function Xu(e){if(e.startsWith(`--- +`)){const t=e.indexOf(` +--- +`);if(t!==-1)return[Ju(e.slice(4,t)),t+5]}return null}function Ju(e){const t=e.split(` +`).map(r=>r.trim()).filter(r=>r!==""),n=[];for(let r=0;ra.trim()).filter(a=>a!=="");if(!(s[0]==="publish"||s[0]==="cssclass"||s[0]==="aliases"))if(s.length===2)if(s[1].startsWith("[")&&s[1].endsWith("]")){const a=s[1].slice(1,-1).split(",").map(o=>o.trim()).filter(o=>o!=="");n.push({key:s[0],values:a})}else n.push({key:s[0],values:[s[1]]});else{const a={key:s[0],values:[]};let o=1,l=t[r+o];for(;l!==void 0&&l.startsWith("- ");)a.values.push(l.slice(2)),o++,l=t[r+o];r+=o-1,n.push(a)}}return n}//! moment.js +//! version : 2.29.4 +//! authors : Tim Wood, Iskren Chernev, Moment.js contributors +//! license : MIT +//! momentjs.com +var hl;function L(){return hl.apply(null,arguments)}function Qu(e){hl=e}function rt(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function qt(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function te(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function is(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(te(e,t))return!1;return!0}function Ce(e){return e===void 0}function kt(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function jn(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function ml(e,t){var n=[],r,i=e.length;for(r=0;r>>0,r;for(r=0;r0)for(n=0;n=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var ls=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,fi={},dn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(dn[e]=i),t&&(dn[t[0]]=function(){return dt(i.apply(this,arguments),t[1],t[2])}),n&&(dn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function i0(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function s0(e){var t=e.match(ls),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var a0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function o0(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(ls).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var l0="Invalid date";function c0(){return this._invalidDate}var d0="%d",f0=/\d{1,2}/;function u0(e){return this._ordinal.replace("%d",e)}var h0={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function m0(e,t,n,r){var i=this._relativeTime[n];return ut(i)?i(e,t,n,r):i.replace(/%d/i,e)}function p0(e,t){var n=this._relativeTime[e>0?"future":"past"];return ut(n)?n(t):n.replace(/%s/i,t)}var Rn={};function Oe(e,t){var n=e.toLowerCase();Rn[n]=Rn[n+"s"]=Rn[t]=e}function Ke(e){return typeof e=="string"?Rn[e]||Rn[e.toLowerCase()]:void 0}function cs(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var gl={};function Re(e,t){gl[e]=t}function _0(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:gl[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Nr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function pn(e,t){return function(n){return n!=null?(xl(this,e,n),L.updateOffset(this,t),this):vr(this,e)}}function vr(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function xl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Nr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),jr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function w0(e){return e=Ke(e),ut(this[e])?this[e]():this}function g0(e,t){if(typeof e=="object"){e=cs(e);var n=_0(e),r,i=n.length;for(r=0;r68?1900:2e3)};var Ol=pn("FullYear",!0);function U0(){return Nr(this.year())}function P0(e,t,n,r,i,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function Nn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Nn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Rl(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),o=1+7*(t-1)+s+a,l,f;return o<=0?(l=e-1,f=Mn(l)+o):o>Mn(e)?(l=e+1,f=o-Mn(e)):(l=e,f=o),{year:l,dayOfYear:f}}function Un(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+vt(a,t,n)):i>vt(e.year(),t,n)?(s=i-vt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function vt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(Mn(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Oe("week","w");Oe("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Gn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function Y0(e){return Un(e,this._week.dow,this._week.doy).week}var W0={dow:0,doy:6};function H0(){return this._week.dow}function j0(){return this._week.doy}function B0(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function V0(e){var t=Un(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Oe("day","d");Oe("weekday","e");Oe("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Gn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Gn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function G0(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Z0(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function us(e,t){return e.slice(t,7).concat(e.slice(0,t))}var q0="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ml="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),z0="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),$0=Vn,K0=Vn,X0=Vn;function J0(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?us(n,this._week.dow):e?n[e.day()]:n}function Q0(e){return e===!0?us(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function eh(e){return e===!0?us(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function th(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ft([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function nh(e,t,n){var r,i,s;if(this._weekdaysParseExact)return th.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ft([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function rh(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=G0(e,this.localeData()),this.add(e-t,"d")):t}function ih(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function sh(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Z0(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function ah(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=$0),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function oh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=K0),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function lh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=X0),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function hs(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,o,l,f;for(s=0;s<7;s++)a=ft([2e3,1]).day(s),o=je(this.weekdaysMin(a,"")),l=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(o),n.push(l),r.push(f),i.push(o),i.push(l),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ms(){return this.hours()%12||12}function ch(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,ms);H("k",["kk",2],0,ch);H("hmm",0,0,function(){return""+ms.apply(this)+dt(this.minutes(),2)});H("hmmss",0,0,function(){return""+ms.apply(this)+dt(this.minutes(),2)+dt(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+dt(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+dt(this.minutes(),2)+dt(this.seconds(),2)});function Il(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Il("a",!0);Il("A",!1);Oe("hour","h");Re("hour",13);function Fl(e,t){return t._meridiemParse}C("a",Fl);C("A",Fl);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",bl);C("hmmss",kl);C("Hmm",bl);C("Hmmss",kl);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[gt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[gt]=$(e.substr(i))});function dh(e){return(e+"").toLowerCase().charAt(0)==="p"}var fh=/[ap]\.?m?\.?/i,uh=pn("Hours",!0);function hh(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Ll={calendar:n0,longDateFormat:a0,invalidDate:l0,ordinal:d0,dayOfMonthOrdinalParse:f0,relativeTime:h0,months:T0,monthsShort:Sl,week:W0,weekdays:q0,weekdaysMin:z0,weekdaysShort:Ml,meridiemParse:fh},de={},Dn={},Pn;function mh(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=Br(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&mh(s,r)>=n-1)break;n--}t++}return Pn}function _h(e){return e.match("^[^/\\\\]*$")!=null}function Br(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&_h(e))try{t=Pn._abbr,n=require,n("./locale/"+e),Ut(t)}catch{de[e]=null}return de[e]}function Ut(e,t){var n;return e&&(Ce(t)?n=St(e):n=ps(e,t),n?Pn=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Pn._abbr}function ps(e,t){if(t!==null){var n,r=Ll;if(t.abbr=e,de[e]!=null)_l("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=Br(t.parentLocale),n!=null)r=n._config;else return Dn[t.parentLocale]||(Dn[t.parentLocale]=[]),Dn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new os(Ci(r,t)),Dn[e]&&Dn[e].forEach(function(i){ps(i.name,i.config)}),Ut(e),de[e]}else return delete de[e],null}function wh(e,t){if(t!=null){var n,r,i=Ll;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Ci(de[e]._config,t)):(r=Br(e),r!=null&&(i=r._config),t=Ci(i,t),r==null&&(t.abbr=e),n=new os(t),n.parentLocale=de[e],de[e]=n),Ut(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Ut()&&Ut(e)):de[e]!=null&&delete de[e]);return de[e]}function St(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Pn;if(!rt(e)){if(t=Br(e),t)return t;e=[e]}return ph(e)}function gh(){return Ni(de)}function _s(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[wt]<0||n[wt]>11?wt:n[ot]<1||n[ot]>jr(n[Ae],n[wt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[gt]!==0||n[Zt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[gt]<0||n[gt]>59?gt:n[Zt]<0||n[Zt]>999?Zt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=S0),z(e)._overflowWeekday&&t===-1&&(t=E0),z(e).overflow=t),e}var xh=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yh=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vh=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ui=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],bh=/^\/?Date\((-?\d+)/i,kh=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Sh={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Cl(e){var t,n,r=e._i,i=xh.exec(r)||yh.exec(r),s,a,o,l,f=ir.length,d=ui.length;if(i){for(z(e).iso=!0,t=0,n=f;tMn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Nn(a,0,e._dayOfYear),e._a[wt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[gt]===0&&e._a[Zt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Nn:P0).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function Ih(e){var t,n,r,i,s,a,o,l,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=rn(t.GG,e._a[Ae],Un(oe(),1,4).year),r=rn(t.W,1),i=rn(t.E,1),(i<1||i>7)&&(l=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Un(oe(),s,a),n=rn(t.gg,e._a[Ae],f.year),r=rn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>vt(n,s,a)?z(e)._overflowWeeks=!0:l!=null?z(e)._overflowWeekday=!0:(o=Rl(n,r,i,s,a),e._a[Ae]=o.year,e._dayOfYear=o.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function gs(e){if(e._f===L.ISO_8601){Cl(e);return}if(e._f===L.RFC_2822){Nl(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,o=t.length,l=0,f,d;for(i=wl(e._f,e._locale).match(ls)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),l+=r.length),dn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),k0(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=o-l,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=Fh(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Ae]=e._locale.erasConvertYear(f,e._a[Ae])),ws(e),_s(e)}function Fh(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Lh(e){var t,n,r,i,s,a,o=!1,l=e._f.length;if(l===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Cr()});function Yl(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function t1(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return as(e,this),e=Ul(e),e._a?(t=e._isUTC?ft(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&Zh(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function n1(){return this.isValid()?!this._isUTC:!1}function r1(){return this.isValid()?this._isUTC:!1}function Hl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var i1=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,s1=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:kt(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=i1.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[gt])*i,ms:$(Pi(r[Zt]*1e3))*i}):(r=s1.exec(e))?(i=r[1]==="-"?-1:1,n={y:Vt(r[2],i),M:Vt(r[3],i),w:Vt(r[4],i),d:Vt(r[5],i),h:Vt(r[6],i),m:Vt(r[7],i),s:Vt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=a1(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Vr(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Vr.prototype;st.invalid=Gh;function Vt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ua(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function a1(e,t){var n;return e.isValid()&&t.isValid()?(t=ys(t,e),e.isBefore(t)?n=Ua(e,t):(n=Ua(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function jl(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(_l(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),Bl(this,i,e),this}}function Bl(e,t,n,r){var i=t._milliseconds,s=Pi(t._days),a=Pi(t._months);!e.isValid()||(r=r==null?!0:r,a&&Dl(e,vr(e,"Month")+a*n),s&&xl(e,"Date",vr(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var o1=jl(1,"add"),l1=jl(-1,"subtract");function Vl(e){return typeof e=="string"||e instanceof String}function c1(e){return it(e)||jn(e)||Vl(e)||kt(e)||f1(e)||d1(e)||e===null||e===void 0}function d1(e){var t=qt(e)&&!is(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ut(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function E1(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function D1(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function T1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function A1(e){return this.from(oe(),e)}function O1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function R1(e){return this.to(oe(),e)}function Gl(e){var t;return e===void 0?this._locale._abbr:(t=St(e),t!=null&&(this._locale=t),this)}var Zl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function ql(){return this._locale}var Sr=1e3,fn=60*Sr,Er=60*fn,zl=(365*400+97)*24*Er;function un(e,t){return(e%t+t)%t}function $l(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-zl:new Date(e,t,n).valueOf()}function Kl(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-zl:Date.UTC(e,t,n)}function M1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Kl:$l,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=un(t+(this._isUTC?0:this.utcOffset()*fn),Er);break;case"minute":t=this._d.valueOf(),t-=un(t,fn);break;case"second":t=this._d.valueOf(),t-=un(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function I1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Kl:$l,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-un(t+(this._isUTC?0:this.utcOffset()*fn),Er)-1;break;case"minute":t=this._d.valueOf(),t+=fn-un(t,fn)-1;break;case"second":t=this._d.valueOf(),t+=Sr-un(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function F1(){return this._d.valueOf()-(this._offset||0)*6e4}function L1(){return Math.floor(this.valueOf()/1e3)}function C1(){return new Date(this.valueOf())}function N1(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function U1(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function P1(){return this.isValid()?this.toISOString():null}function Y1(){return ss(this)}function W1(){return Lt({},z(this))}function H1(){return z(this).overflow}function j1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",vs);C("NN",vs);C("NNN",vs);C("NNNN",Q1);C("NNNNN",em);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",_n);C("yy",_n);C("yyy",_n);C("yyyy",_n);C("yo",tm);ie(["y","yy","yyy","yyyy"],Ae);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ae]=n._locale.eraYearOrdinalParse(e,i):t[Ae]=parseInt(e,10)});function B1(e,t){var n,r,i,s=this._eras||St("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function G1(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function Z1(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),lm.call(this,e,t,n,r,i))}function lm(e,t,n,r,i){var s=Rl(e,t,n,r,i),a=Nn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Oe("quarter","Q");Re("quarter",7);C("Q",yl);ie("Q",function(e,t){t[wt]=($(e)-1)*3});function cm(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Oe("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var Jl=pn("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Oe("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Pr);C("DDDD",vl);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function dm(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Oe("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var fm=pn("Minutes",!1);H("s",["ss",2],0,"second");Oe("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],gt);var um=pn("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Oe("millisecond","ms");Re("millisecond",16);C("S",Pr,yl);C("SS",Pr,Be);C("SSS",Pr,vl);var Ct,Ql;for(Ct="SSSS";Ct.length<=9;Ct+="S")C(Ct,_n);function hm(e,t){t[Zt]=$(("0."+e)*1e3)}for(Ct="S";Ct.length<=9;Ct+="S")ie(Ct,hm);Ql=pn("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function mm(){return this._isUTC?"UTC":""}function pm(){return this._isUTC?"Coordinated Universal Time":""}var M=Bn.prototype;M.add=o1;M.calendar=m1;M.clone=p1;M.diff=b1;M.endOf=I1;M.format=D1;M.from=T1;M.fromNow=A1;M.to=O1;M.toNow=R1;M.get=w0;M.invalidAt=H1;M.isAfter=_1;M.isBefore=w1;M.isBetween=g1;M.isSame=x1;M.isSameOrAfter=y1;M.isSameOrBefore=v1;M.isValid=Y1;M.lang=Zl;M.locale=Gl;M.localeData=ql;M.max=Yh;M.min=Ph;M.parsingFlags=W1;M.set=g0;M.startOf=M1;M.subtract=l1;M.toArray=N1;M.toObject=U1;M.toDate=C1;M.toISOString=S1;M.inspect=E1;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=P1;M.toString=k1;M.unix=L1;M.valueOf=F1;M.creationData=j1;M.eraName=Z1;M.eraNarrow=q1;M.eraAbbr=z1;M.eraYear=$1;M.year=Ol;M.isLeapYear=U0;M.weekYear=nm;M.isoWeekYear=rm;M.quarter=M.quarters=cm;M.month=Tl;M.daysInMonth=L0;M.week=M.weeks=B0;M.isoWeek=M.isoWeeks=V0;M.weeksInYear=am;M.weeksInWeekYear=om;M.isoWeeksInYear=im;M.isoWeeksInISOWeekYear=sm;M.date=Jl;M.day=M.days=rh;M.weekday=ih;M.isoWeekday=sh;M.dayOfYear=dm;M.hour=M.hours=uh;M.minute=M.minutes=fm;M.second=M.seconds=um;M.millisecond=M.milliseconds=Ql;M.utcOffset=zh;M.utc=Kh;M.local=Xh;M.parseZone=Jh;M.hasAlignedHourOffset=Qh;M.isDST=e1;M.isLocal=n1;M.isUtcOffset=r1;M.isUtc=Hl;M.isUTC=Hl;M.zoneAbbr=mm;M.zoneName=pm;M.dates=$e("dates accessor is deprecated. Use date instead.",Jl);M.months=$e("months accessor is deprecated. Use month instead",Tl);M.years=$e("years accessor is deprecated. Use year instead",Ol);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",$h);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",t1);function _m(e){return oe(e*1e3)}function wm(){return oe.apply(null,arguments).parseZone()}function ec(e){return e}var ne=os.prototype;ne.calendar=r0;ne.longDateFormat=o0;ne.invalidDate=c0;ne.ordinal=u0;ne.preparse=ec;ne.postformat=ec;ne.relativeTime=m0;ne.pastFuture=p0;ne.set=t0;ne.eras=B1;ne.erasParse=V1;ne.erasConvertYear=G1;ne.erasAbbrRegex=X1;ne.erasNameRegex=K1;ne.erasNarrowRegex=J1;ne.months=R0;ne.monthsShort=M0;ne.monthsParse=F0;ne.monthsRegex=N0;ne.monthsShortRegex=C0;ne.week=Y0;ne.firstDayOfYear=j0;ne.firstDayOfWeek=H0;ne.weekdays=J0;ne.weekdaysMin=eh;ne.weekdaysShort=Q0;ne.weekdaysParse=nh;ne.weekdaysRegex=ah;ne.weekdaysShortRegex=oh;ne.weekdaysMinRegex=lh;ne.isPM=dh;ne.meridiem=hh;function Dr(e,t,n,r){var i=St(),s=ft().set(r,t);return i[n](s,e)}function tc(e,t,n){if(kt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function ks(e,t,n,r){typeof e=="boolean"?(kt(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,kt(t)&&(n=t,t=void 0),t=t||"");var i=St(),s=e?i._week.dow:0,a,o=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)o[a]=Dr(t,(a+s)%7,r,"day");return o}function gm(e,t){return tc(e,t,"months")}function xm(e,t){return tc(e,t,"monthsShort")}function ym(e,t,n){return ks(e,t,n,"weekdays")}function vm(e,t,n){return ks(e,t,n,"weekdaysShort")}function bm(e,t,n){return ks(e,t,n,"weekdaysMin")}Ut("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Ut);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",St);var pt=Math.abs;function km(){var e=this._data;return this._milliseconds=pt(this._milliseconds),this._days=pt(this._days),this._months=pt(this._months),e.milliseconds=pt(e.milliseconds),e.seconds=pt(e.seconds),e.minutes=pt(e.minutes),e.hours=pt(e.hours),e.months=pt(e.months),e.years=pt(e.years),this}function nc(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Sm(e,t){return nc(this,e,t,1)}function Em(e,t){return nc(this,e,t,-1)}function Pa(e){return e<0?Math.floor(e):Math.ceil(e)}function Dm(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,o,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Pa(Wi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),l=Ze(rc(t)),n+=l,t-=Pa(Wi(l)),o=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=o,this}function rc(e){return e*4800/146097}function Wi(e){return e*146097/4800}function Tm(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+rc(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Wi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Am(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Et(e){return function(){return this.as(e)}}var Om=Et("ms"),Rm=Et("s"),Mm=Et("m"),Im=Et("h"),Fm=Et("d"),Lm=Et("w"),Cm=Et("M"),Nm=Et("Q"),Um=Et("y");function Pm(){return st(this)}function Ym(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Kt(e){return function(){return this.isValid()?this._data[e]:NaN}}var Wm=Kt("milliseconds"),Hm=Kt("seconds"),jm=Kt("minutes"),Bm=Kt("hours"),Vm=Kt("days"),Gm=Kt("months"),Zm=Kt("years");function qm(){return Ze(this.days()/7)}var _t=Math.round,on={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function zm(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function $m(e,t,n,r){var i=st(e).abs(),s=_t(i.as("s")),a=_t(i.as("m")),o=_t(i.as("h")),l=_t(i.as("d")),f=_t(i.as("M")),d=_t(i.as("w")),u=_t(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,zm.apply(null,p)}function Km(e){return e===void 0?_t:typeof e=="function"?(_t=e,!0):!1}function Xm(e,t){return on[e]===void 0?!1:t===void 0?on[e]:(on[e]=t,e==="s"&&(on.ss=t-1),!0)}function Jm(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=on,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},on,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=$m(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var hi=Math.abs;function tn(e){return(e>0)-(e<0)||+e}function Zr(){if(!this.isValid())return this.localeData().invalidDate();var e=hi(this._milliseconds)/1e3,t=hi(this._days),n=hi(this._months),r,i,s,a,o=this.asSeconds(),l,f,d,u;return o?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",f=tn(this._months)!==tn(o)?"-":"",d=tn(this._days)!==tn(o)?"-":"",u=tn(this._milliseconds)!==tn(o)?"-":"",l+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Vr.prototype;X.isValid=Vh;X.abs=km;X.add=Sm;X.subtract=Em;X.as=Tm;X.asMilliseconds=Om;X.asSeconds=Rm;X.asMinutes=Mm;X.asHours=Im;X.asDays=Fm;X.asWeeks=Lm;X.asMonths=Cm;X.asQuarters=Nm;X.asYears=Um;X.valueOf=Am;X._bubble=Dm;X.clone=Pm;X.get=Ym;X.milliseconds=Wm;X.seconds=Hm;X.minutes=jm;X.hours=Bm;X.days=Vm;X.weeks=qm;X.months=Gm;X.years=Zm;X.humanize=Jm;X.toISOString=Zr;X.toString=Zr;X.toJSON=Zr;X.locale=Gl;X.localeData=ql;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zr);X.lang=Zl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Wr);C("X",y0);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js +L.version="2.29.4";Qu(oe);L.fn=M;L.min=Wh;L.max=Hh;L.now=jh;L.utc=ft;L.unix=_m;L.months=gm;L.isDate=jn;L.locale=Ut;L.invalid=Cr;L.duration=st;L.isMoment=it;L.weekdays=ym;L.parseZone=wm;L.localeData=St;L.isDuration=dr;L.monthsShort=xm;L.weekdaysMin=bm;L.defineLocale=ps;L.updateLocale=wh;L.locales=gh;L.weekdaysShort=vm;L.normalizeUnits=Ke;L.relativeTimeRounding=Km;L.relativeTimeThreshold=Xm;L.calendarFormat=h1;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Qm(e,t,n){let r;return e.values&&e.values.length>0&&(r=e.values.map(i=>({uid:bt(n),name:i,type:"node",createdAt:t,editedAt:t}))),ep(e.key,n.attributes),n.summary.fields++,{uid:bt(n),name:e.key,type:"field",createdAt:t,editedAt:t,children:r}}function ep(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function tp(e,t,n,r,i=Date.now()){var p;const[s,a]=(p=Xu(n))!=null?p:[[],0];let o=Lu(n,a),l=e;const f=o[0]&&o[0].content.match(/^title::(.+)$/);f&&(l=f[1],o=o.slice(1)),o[0]&&o[0].content.replace(/^#+/,"").trim()===l.trim()&&(o=o.slice(1));const d=[],u=np(l,t,i,r,s);return rl(u,{type:Pt.ROOT,level:-1},o,Pu,w=>Ku(e,t,w,i,r),(w,D)=>{D.type===Pt.HEADING&&d.push({...D,uid:w.uid})}),r.headingTracker.set({name:l,path:t},d),u}function np(e,t,n,r,i){let s;const a=[];i.forEach(d=>{d.key==="tags"?s=fl(d.values,r.superTagTracker,r.idGenerator):a.push(Qm(d,n,r))});let o=yu(e,t,r),l="node";const f=rp(e,r.dailyNoteFormat);return f.length>0&&(o=f,l="date",e=f,r.summary.calendarNodes++),{uid:o,name:e,createdAt:n,editedAt:n,type:l,supertags:s,children:a.length>0?a:void 0}}function rp(e,t){const n=L(e,t,!0);return n.isValid()?n.format("MM-DD-YYYY"):""}function Ya(e,t){return e===t.length-1?"LAST":"NOT_LAST"}function ip(e,t){return e.fileSystemAdapter.readDirectory(t).filter(n=>{const r=t+Fr+n.getName();return n.isDirectory()&&!r.endsWith(".github")&&!r.endsWith(".obsidian")||!n.isDirectory()&&r.endsWith(".md")})}async function ic(e,t,n,r,i,s="LAST"){n(t);const a=ip(e,t);for(let o=0;o{const i=Ir(r),s=bt(n);n.fileSystemAdapter.appendToFile(e,`{ + "uid": "${s}", + "name": "${i}", + "createdAt": ${t}, + "editedAt": ${t}, + "type": "node", + "children": [ + `)}}function ap(e,t){return n=>{e.fileSystemAdapter.appendToFile(t,`] + }`),n!=="LAST"&&e.fileSystemAdapter.appendToFile(t,",")}}function op(e,t,n){return async(r,i)=>{const s=r.slice(n.vaultPath.length+1,-3),a=tp(Ir(r).replace(".md",""),s,await n.fileSystemAdapter.readFile(r),n,t);n.fileSystemAdapter.appendToFile(e,JSON.stringify(a,null,2)),i!=="LAST"&&n.fileSystemAdapter.appendToFile(e,",")}}async function lp(e,t=Date.now()){await e.fileSystemAdapter.initReadingVault(),await cp(e);const n=`${e.vaultPath}.tif.json`;try{e.fileSystemAdapter.removeFile(n)}catch{}e.fileSystemAdapter.appendToFile(n,`{ + "version": "TanaIntermediateFile V0.1", + "nodes": [ +`),await ic(e,e.vaultPath,sp(n,t,e),ap(e,n),op(n,t,e)),nl(e.summary),await mu(n,e);const r=ku(Ir(e.vaultPath),t,e);r&&e.fileSystemAdapter.appendToFile(n,", "+JSON.stringify(r,null,2)),e.fileSystemAdapter.appendToFile(n,` + ]`);const i=Bu(e.superTagTracker);return i.length>0&&e.fileSystemAdapter.appendToFile(n,`, + "supertags": +`+JSON.stringify(i,null,2)),e.attributes.length>0&&e.fileSystemAdapter.appendToFile(n,`, + "attributes": +`+JSON.stringify(e.attributes,null,2)),e.fileSystemAdapter.appendToFile(n,`, + "summary": +`+JSON.stringify(e.summary,null,2)),e.fileSystemAdapter.appendToFile(n,` +}`),e.summary}async function cp(e){const t=e.vaultPath+"/.obsidian/daily-notes.json";if(e.fileSystemAdapter.exists(t)){const n=await e.fileSystemAdapter.readFile(t),r=JSON.parse(n.toString());r.format&&(e.dailyNoteFormat=r.format)}}async function dp(e,t,n,r){const i=new nu(e),s=su(t,i,r);return lp(s,n).then(a=>[a,s,i])}const fp=document.getElementById("vault-zip");fp.addEventListener("change",async e=>{const t=e.target.files[0],n=t.name.slice(0,t.name.indexOf(".zip")),[r,,i]=await dp(t,n,1),s=document.createElement("b");s.innerHTML="Success!
",document.body.appendChild(s);const a=document.createElement("h2");a.innerText="Summary:",document.body.appendChild(a);const o=document.createElement("p");o.innerText=Object.entries(r).map(d=>d[0]+": "+d[1]).join(` +`),document.body.appendChild(o);const l=i.getResult(),f=document.createElement("button");f.innerText="Download TIF File",f.addEventListener("click",()=>{const d=URL.createObjectURL(new Blob([l])),u=document.createElement("a");u.style.display="none",u.href=d,u.download=n+".tif.json",document.body.appendChild(u),u.click(),URL.revokeObjectURL(d)}),document.body.appendChild(f)}); diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..abf0292 --- /dev/null +++ b/public/index.html @@ -0,0 +1,20 @@ + + + + + + Obsidian-2-Tana Converter + + + +

Obsidian-2-Tana Converter

+

Select a zip of your Obsidian vault folder and get a TIF file back, ready to be imported in Tana.

+ There is no server involved in the conversion, the zip file will stay on your computer. +

+ +
+ +

+ + + diff --git a/src/converters/obsidian/filesystem/WebFileSystemAdapter.ts b/src/converters/obsidian/filesystem/WebFileSystemAdapter.ts index 56609be..bb97874 100644 --- a/src/converters/obsidian/filesystem/WebFileSystemAdapter.ts +++ b/src/converters/obsidian/filesystem/WebFileSystemAdapter.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -// import * as zip from '@zip.js/zip.js'; +import * as zip from '@zip.js/zip.js'; import type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js'; import { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter'; @@ -12,9 +12,6 @@ export class WebFileSystemAdapter implements CustomFileSystemAdapter { constructor(private zipBlob: Blob) {} async initReadingVault() { - // hacky but I am not fixing configs in my free time :P - // eslint-disable-next-line @typescript-eslint/no-var-requires - const zip = require('@zip.js/zip.js/index.cjs'); this.zipFS = new zip.fs.FS() as FS; await this.zipFS.importBlob(this.zipBlob); } diff --git a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts index 14c1f43..99c87aa 100644 --- a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts +++ b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@jest/globals'; +import { expect, test } from 'vitest'; import { readFileSync, unlinkSync } from 'fs'; import { LocalFileSystemAdapter } from '../filesystem/LocalFileSystemAdapter'; import { ObsidianVaultConverter } from '../ObsidianVaultConverter'; diff --git a/src/converters/obsidian/tests/VaultContext.test.ts b/src/converters/obsidian/tests/VaultContext.test.ts index cbc90b8..d0ba416 100644 --- a/src/converters/obsidian/tests/VaultContext.test.ts +++ b/src/converters/obsidian/tests/VaultContext.test.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { expect, test } from '@jest/globals'; +import { expect, test } from 'vitest'; import { getAllInvalidLinks } from '../links/invalidLinks'; import { untrackedUidRequest } from '../links/genericLinks'; import { createVaultContext } from '../VaultContext'; diff --git a/src/converters/obsidian/tests/WebObsidianVaultConvert.test.ts b/src/converters/obsidian/tests/WebObsidianVaultConvert.test.ts index 3a20b4a..038d4bf 100644 --- a/src/converters/obsidian/tests/WebObsidianVaultConvert.test.ts +++ b/src/converters/obsidian/tests/WebObsidianVaultConvert.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@jest/globals'; +import { expect, test } from 'vitest'; import { readFileSync } from 'fs'; import { WebObsidianVaultConverter } from '../WebObsidianVaultConverter'; import { deterministicGenerator } from './testUtils'; diff --git a/src/converters/obsidian/tests/codeblocks.test.ts b/src/converters/obsidian/tests/codeblocks.test.ts index c527ab5..4a8259c 100644 --- a/src/converters/obsidian/tests/codeblocks.test.ts +++ b/src/converters/obsidian/tests/codeblocks.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@jest/globals'; +import { expect, test } from 'vitest'; import { detectCodeBlockHierarchy, postProcessCodeBlock } from '../hierarchy/codeblocks'; import { HierarchyType } from '../hierarchy/markdownNodes'; diff --git a/src/converters/obsidian/tests/frontmatter.test.ts b/src/converters/obsidian/tests/frontmatter.test.ts index e416442..2ecebe7 100644 --- a/src/converters/obsidian/tests/frontmatter.test.ts +++ b/src/converters/obsidian/tests/frontmatter.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@jest/globals'; +import { expect, test } from 'vitest'; import { parseFrontmatter } from '../markdown/frontmatter'; test('parseFrontmatter test', () => { diff --git a/src/converters/obsidian/tests/headingLinks.test.ts b/src/converters/obsidian/tests/headingLinks.test.ts index 917715e..60090df 100644 --- a/src/converters/obsidian/tests/headingLinks.test.ts +++ b/src/converters/obsidian/tests/headingLinks.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@jest/globals'; +import { expect, test } from 'vitest'; import { FileDescMap } from '../links/FileDescMap'; import { HeadingTracker, HeadingDummyUidTracker, matchHeadingLinks } from '../links/headingLinks'; diff --git a/src/converters/obsidian/tests/imageLinks.test.ts b/src/converters/obsidian/tests/imageLinks.test.ts index ea84646..967c6f8 100644 --- a/src/converters/obsidian/tests/imageLinks.test.ts +++ b/src/converters/obsidian/tests/imageLinks.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@jest/globals'; +import { expect, test } from 'vitest'; import { extractImageLinks } from '../markdown/imageLinks'; //TODO: write some test utils to check permutations easier diff --git a/src/converters/obsidian/tests/markdownNodes.test.ts b/src/converters/obsidian/tests/markdownNodes.test.ts index f9741dc..dc92a52 100644 --- a/src/converters/obsidian/tests/markdownNodes.test.ts +++ b/src/converters/obsidian/tests/markdownNodes.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@jest/globals'; +import { expect, test } from 'vitest'; import { countEmptySpace } from '../markdown/emptySpace'; import { extractMarkdownNodes, HierarchyType } from '../hierarchy/markdownNodes'; import { nextNewLine } from '../markdown/newline'; diff --git a/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts b/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts index 1196d71..ccb087c 100644 --- a/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts +++ b/src/converters/obsidian/tests/traverseTreeDepthFirst.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@jest/globals'; +import { expect, test } from 'vitest'; import { HeadingNode } from '../links/headingLinks'; import { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst'; diff --git a/src/converters/roam/roamUtils.test.ts b/src/converters/roam/roamUtils.test.ts index f5ffa62..a34470f 100644 --- a/src/converters/roam/roamUtils.test.ts +++ b/src/converters/roam/roamUtils.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@jest/globals'; +import { expect, test } from 'vitest'; import { findPreceedingAlias, getAttributeDefintionsFromName, diff --git a/src/converters/roam/tests/roam.test.ts b/src/converters/roam/tests/roam.test.ts index e675aa8..1112b27 100644 --- a/src/converters/roam/tests/roam.test.ts +++ b/src/converters/roam/tests/roam.test.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ -import { expect, test } from '@jest/globals'; +import { expect, test } from 'vitest'; import { expectField, expectImage } from '../../../testUtils/testUtils'; import { importRoamFile } from './testUtils'; diff --git a/src/converters/workflowy/tests/workflowy.test.ts b/src/converters/workflowy/tests/workflowy.test.ts index 874d25d..c6f4301 100644 --- a/src/converters/workflowy/tests/workflowy.test.ts +++ b/src/converters/workflowy/tests/workflowy.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@jest/globals'; +import { expect, test } from 'vitest'; import { importWorkflowyFile } from './testUtils'; test('Smoke test import preview ', async () => { diff --git a/src/script.ts b/src/script.ts new file mode 100644 index 0000000..c3c44e6 --- /dev/null +++ b/src/script.ts @@ -0,0 +1,36 @@ +import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter'; + +const zipInput = document.getElementById('vault-zip') as HTMLInputElement; +zipInput.addEventListener('change', async (event) => { + const zipFile = ((event.target as HTMLInputElement).files as FileList)[0]; + const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip')); + const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, 1); + + const success = document.createElement('b'); + success.innerHTML = 'Success!
'; + document.body.appendChild(success); + + const summaryHeading = document.createElement('h2'); + summaryHeading.innerText = 'Summary:'; + document.body.appendChild(summaryHeading); + const summaryElement = document.createElement('p'); + summaryElement.innerText = Object.entries(summary) + .map((entry) => entry[0] + ': ' + entry[1]) + .join('\n'); + document.body.appendChild(summaryElement); + + const result = adapter.getResult(); + const downloadButton = document.createElement('button'); + downloadButton.innerText = 'Download TIF File'; + downloadButton.addEventListener('click', () => { + const url = URL.createObjectURL(new Blob([result])); + const a = document.createElement('a'); + a.style.display = 'none'; + a.href = url; + a.download = vaultName + '.tif.json'; + document.body.appendChild(a); + a.click(); + URL.revokeObjectURL(url); + }); + document.body.appendChild(downloadButton); +}); diff --git a/src/testUtils/testUtils.ts b/src/testUtils/testUtils.ts index dfe7dd1..d0da055 100644 --- a/src/testUtils/testUtils.ts +++ b/src/testUtils/testUtils.ts @@ -1,5 +1,5 @@ import * as fs from 'fs'; -import { expect } from '@jest/globals'; +import { expect } from 'vitest'; import { fail } from 'assert'; import { TanaIntermediateNode, TanaIntermediateFile } from '../types/types'; import { IConverter } from '../converters/IConverter'; diff --git a/src/testUtils/utils.test.ts b/src/testUtils/utils.test.ts index 04ae57e..22a4d23 100644 --- a/src/testUtils/utils.test.ts +++ b/src/testUtils/utils.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@jest/globals'; +import { expect, test } from 'vitest'; import { findGroups, getBracketLinks, isIndexWithinBackticks, replaceTokenWithHtml } from '../utils/utils'; test('isIndexWithinBackticks', () => { diff --git a/yarn.lock b/yarn.lock index af6deb3..bb3181d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,15 +2,7 @@ # yarn lockfile v1 -"@ampproject/remapping@^2.1.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz" - integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== - dependencies: - "@jridgewell/gen-mapping" "^0.1.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.18.6": +"@babel/code-frame@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz" integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== @@ -22,28 +14,7 @@ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.6.tgz" integrity sha512-tzulrgDT0QD6U7BJ4TKVk2SDDg7wlP39P9yAx1RfLy7vP/7rsDRlWVfbWxElslu56+r7QOhB2NSDsabYYruoZQ== -"@babel/core@^7.11.6", "@babel/core@^7.12.3": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.18.6.tgz" - integrity sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ== - dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.6" - "@babel/helper-compilation-targets" "^7.18.6" - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helpers" "^7.18.6" - "@babel/parser" "^7.18.6" - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.6" - "@babel/types" "^7.18.6" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.1" - semver "^6.3.0" - -"@babel/generator@^7.18.6", "@babel/generator@^7.7.2": +"@babel/generator@^7.18.6": version "7.18.7" resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.18.7.tgz" integrity sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A== @@ -241,15 +212,6 @@ "@babel/traverse" "^7.18.6" "@babel/types" "^7.18.6" -"@babel/helpers@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.6.tgz" - integrity sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ== - dependencies: - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.6" - "@babel/types" "^7.18.6" - "@babel/highlight@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz" @@ -259,7 +221,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.6": +"@babel/parser@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.18.6.tgz" integrity sha512-uQVSa9jJUe/G/304lXspfWVpKpK4euFLgGiMQFOCpM/bgcAdeoHwi/OQz23O9GK2osz26ZiXRRV9aV+Yl1O8tw== @@ -416,14 +378,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-bigint@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz" - integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.12.13", "@babel/plugin-syntax-class-properties@^7.8.3": +"@babel/plugin-syntax-class-properties@^7.12.13": version "7.12.13" resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== @@ -458,13 +413,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-syntax-import-meta@^7.8.3": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz" - integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-json-strings@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz" @@ -472,7 +420,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== @@ -486,7 +434,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-numeric-separator@^7.10.4", "@babel/plugin-syntax-numeric-separator@^7.8.3": +"@babel/plugin-syntax-numeric-separator@^7.10.4": version "7.10.4" resolved "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz" integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== @@ -521,14 +469,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-top-level-await@^7.14.5", "@babel/plugin-syntax-top-level-await@^7.8.3": +"@babel/plugin-syntax-top-level-await@^7.14.5": version "7.14.5" resolved "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz" integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-typescript@^7.18.6", "@babel/plugin-syntax-typescript@^7.7.2": +"@babel/plugin-syntax-typescript@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz" integrity sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA== @@ -904,7 +852,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.18.6", "@babel/template@^7.3.3": +"@babel/template@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz" integrity sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw== @@ -913,7 +861,7 @@ "@babel/parser" "^7.18.6" "@babel/types" "^7.18.6" -"@babel/traverse@^7.13.0", "@babel/traverse@^7.18.6", "@babel/traverse@^7.7.2": +"@babel/traverse@^7.13.0", "@babel/traverse@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.6.tgz" integrity sha512-zS/OKyqmD7lslOtFqbscH6gMLFYOfG1YPqCKfAW5KrTeolKqvB8UelR49Fpr6y93kYkW2Ik00mT1LOGiAGvizw== @@ -929,7 +877,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.18.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": +"@babel/types@^7.18.6", "@babel/types@^7.18.7", "@babel/types@^7.4.4": version "7.18.7" resolved "https://registry.npmjs.org/@babel/types/-/types-7.18.7.tgz" integrity sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ== @@ -937,10 +885,15 @@ "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" -"@bcoe/v8-coverage@^0.2.3": - version "0.2.3" - resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" - integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@esbuild/android-arm@0.15.11": + version "0.15.11" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.11.tgz#bdd9c3e098183bdca97075aa4c3e0152ed3e10ee" + integrity sha512-PzMcQLazLBkwDEkrNPi9AbjFt6+3I7HKbiYF2XtWQ7wItrHvEOeO3T8Am434zAozWtVP7lrTue1bEfc2nYWeCA== + +"@esbuild/linux-loong64@0.15.11": + version "0.15.11" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.11.tgz#2f4f9a1083dcb4fc65233b6f59003c406abf32e5" + integrity sha512-geWp637tUhNmhL3Xgy4Bj703yXB9dqiLJe05lCUfjSFDrQf9C/8pArusyPUbUbPwlC/EAUjBw32sxuIl/11dZw== "@eslint/eslintrc@^1.3.0": version "1.3.0" @@ -976,223 +929,6 @@ resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jest/console@^28.1.1": - version "28.1.1" - resolved "https://registry.npmjs.org/@jest/console/-/console-28.1.1.tgz" - integrity sha512-0RiUocPVFEm3WRMOStIHbRWllG6iW6E3/gUPnf4lkrVFyXIIDeCe+vlKeYyFOMhB2EPE6FLFCNADSOOQMaqvyA== - dependencies: - "@jest/types" "^28.1.1" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^28.1.1" - jest-util "^28.1.1" - slash "^3.0.0" - -"@jest/core@^28.1.2": - version "28.1.2" - resolved "https://registry.npmjs.org/@jest/core/-/core-28.1.2.tgz" - integrity sha512-Xo4E+Sb/nZODMGOPt2G3cMmCBqL4/W2Ijwr7/mrXlq4jdJwcFQ/9KrrJZT2adQRk2otVBXXOz1GRQ4Z5iOgvRQ== - dependencies: - "@jest/console" "^28.1.1" - "@jest/reporters" "^28.1.2" - "@jest/test-result" "^28.1.1" - "@jest/transform" "^28.1.2" - "@jest/types" "^28.1.1" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - ci-info "^3.2.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-changed-files "^28.0.2" - jest-config "^28.1.2" - jest-haste-map "^28.1.1" - jest-message-util "^28.1.1" - jest-regex-util "^28.0.2" - jest-resolve "^28.1.1" - jest-resolve-dependencies "^28.1.2" - jest-runner "^28.1.2" - jest-runtime "^28.1.2" - jest-snapshot "^28.1.2" - jest-util "^28.1.1" - jest-validate "^28.1.1" - jest-watcher "^28.1.1" - micromatch "^4.0.4" - pretty-format "^28.1.1" - rimraf "^3.0.0" - slash "^3.0.0" - strip-ansi "^6.0.0" - -"@jest/environment@^28.1.2": - version "28.1.2" - resolved "https://registry.npmjs.org/@jest/environment/-/environment-28.1.2.tgz" - integrity sha512-I0CR1RUMmOzd0tRpz10oUfaChBWs+/Hrvn5xYhMEF/ZqrDaaeHwS8yDBqEWCrEnkH2g+WE/6g90oBv3nKpcm8Q== - dependencies: - "@jest/fake-timers" "^28.1.2" - "@jest/types" "^28.1.1" - "@types/node" "*" - jest-mock "^28.1.1" - -"@jest/expect-utils@^28.1.1": - version "28.1.1" - resolved "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.1.tgz" - integrity sha512-n/ghlvdhCdMI/hTcnn4qV57kQuV9OTsZzH1TTCVARANKhl6hXJqLKUkwX69ftMGpsbpt96SsDD8n8LD2d9+FRw== - dependencies: - jest-get-type "^28.0.2" - -"@jest/expect@^28.1.2": - version "28.1.2" - resolved "https://registry.npmjs.org/@jest/expect/-/expect-28.1.2.tgz" - integrity sha512-HBzyZBeFBiOelNbBKN0pilWbbrGvwDUwAqMC46NVJmWm8AVkuE58NbG1s7DR4cxFt4U5cVLxofAoHxgvC5MyOw== - dependencies: - expect "^28.1.1" - jest-snapshot "^28.1.2" - -"@jest/fake-timers@^28.1.2": - version "28.1.2" - resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.2.tgz" - integrity sha512-xSYEI7Y0D5FbZN2LsCUj/EKRR1zfQYmGuAUVh6xTqhx7V5JhjgMcK5Pa0iR6WIk0GXiHDe0Ke4A+yERKE9saqg== - dependencies: - "@jest/types" "^28.1.1" - "@sinonjs/fake-timers" "^9.1.2" - "@types/node" "*" - jest-message-util "^28.1.1" - jest-mock "^28.1.1" - jest-util "^28.1.1" - -"@jest/globals@^28.1.2": - version "28.1.2" - resolved "https://registry.npmjs.org/@jest/globals/-/globals-28.1.2.tgz" - integrity sha512-cz0lkJVDOtDaYhvT3Fv2U1B6FtBnV+OpEyJCzTHM1fdoTsU4QNLAt/H4RkiwEUU+dL4g/MFsoTuHeT2pvbo4Hg== - dependencies: - "@jest/environment" "^28.1.2" - "@jest/expect" "^28.1.2" - "@jest/types" "^28.1.1" - -"@jest/reporters@^28.1.2": - version "28.1.2" - resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.2.tgz" - integrity sha512-/whGLhiwAqeCTmQEouSigUZJPVl7sW8V26EiboImL+UyXznnr1a03/YZ2BX8OlFw0n+Zlwu+EZAITZtaeRTxyA== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^28.1.1" - "@jest/test-result" "^28.1.1" - "@jest/transform" "^28.1.2" - "@jest/types" "^28.1.1" - "@jridgewell/trace-mapping" "^0.3.13" - "@types/node" "*" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^5.1.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.1.3" - jest-message-util "^28.1.1" - jest-util "^28.1.1" - jest-worker "^28.1.1" - slash "^3.0.0" - string-length "^4.0.1" - strip-ansi "^6.0.0" - terminal-link "^2.0.0" - v8-to-istanbul "^9.0.1" - -"@jest/schemas@^28.0.2": - version "28.0.2" - resolved "https://registry.npmjs.org/@jest/schemas/-/schemas-28.0.2.tgz" - integrity sha512-YVDJZjd4izeTDkij00vHHAymNXQ6WWsdChFRK86qck6Jpr3DCL5W3Is3vslviRlP+bLuMYRLbdp98amMvqudhA== - dependencies: - "@sinclair/typebox" "^0.23.3" - -"@jest/source-map@^28.1.2": - version "28.1.2" - resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz" - integrity sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww== - dependencies: - "@jridgewell/trace-mapping" "^0.3.13" - callsites "^3.0.0" - graceful-fs "^4.2.9" - -"@jest/test-result@^28.1.1": - version "28.1.1" - resolved "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.1.tgz" - integrity sha512-hPmkugBktqL6rRzwWAtp1JtYT4VHwv8OQ+9lE5Gymj6dHzubI/oJHMUpPOt8NrdVWSrz9S7bHjJUmv2ggFoUNQ== - dependencies: - "@jest/console" "^28.1.1" - "@jest/types" "^28.1.1" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^28.1.1": - version "28.1.1" - resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.1.tgz" - integrity sha512-nuL+dNSVMcWB7OOtgb0EGH5AjO4UBCt68SLP08rwmC+iRhyuJWS9MtZ/MpipxFwKAlHFftbMsydXqWre8B0+XA== - dependencies: - "@jest/test-result" "^28.1.1" - graceful-fs "^4.2.9" - jest-haste-map "^28.1.1" - slash "^3.0.0" - -"@jest/transform@^28.1.2": - version "28.1.2" - resolved "https://registry.npmjs.org/@jest/transform/-/transform-28.1.2.tgz" - integrity sha512-3o+lKF6iweLeJFHBlMJysdaPbpoMmtbHEFsjzSv37HIq/wWt5ijTeO2Yf7MO5yyczCopD507cNwNLeX8Y/CuIg== - dependencies: - "@babel/core" "^7.11.6" - "@jest/types" "^28.1.1" - "@jridgewell/trace-mapping" "^0.3.13" - babel-plugin-istanbul "^6.1.1" - chalk "^4.0.0" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^28.1.1" - jest-regex-util "^28.0.2" - jest-util "^28.1.1" - micromatch "^4.0.4" - pirates "^4.0.4" - slash "^3.0.0" - write-file-atomic "^4.0.1" - -"@jest/types@^28.1.1": - version "28.1.1" - resolved "https://registry.npmjs.org/@jest/types/-/types-28.1.1.tgz" - integrity sha512-vRXVqSg1VhDnB8bWcmvLzmg0Bt9CRKVgHPXqYwvWMX3TvAjeO+nRuK6+VdTKCtWOvYlmkF/HqNAL/z+N3B53Kw== - dependencies: - "@jest/schemas" "^28.0.2" - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^17.0.8" - chalk "^4.0.0" - -"@jridgewell/gen-mapping@^0.1.0": - version "0.1.1" - resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz" - integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== - dependencies: - "@jridgewell/set-array" "^1.0.0" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/gen-mapping@^0.3.2": version "0.3.2" resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz" @@ -1207,7 +943,7 @@ resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== -"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": +"@jridgewell/set-array@^1.0.1": version "1.1.2" resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== @@ -1217,7 +953,7 @@ resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13", "@jridgewell/trace-mapping@^0.3.9": +"@jridgewell/trace-mapping@^0.3.9": version "0.3.14" resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz" integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== @@ -1246,91 +982,17 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@sinclair/typebox@^0.23.3": - version "0.23.5" - resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.23.5.tgz" - integrity sha512-AFBVi/iT4g20DHoujvMH1aEDn8fGJh4xsRGCP6d8RpLPMqsNPvW01Jcn0QysXTsg++/xj25NmJsGyH9xug/wKg== - -"@sinonjs/commons@^1.7.0": - version "1.8.3" - resolved "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz" - integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ== +"@types/chai-subset@^1.3.3": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@types/chai-subset/-/chai-subset-1.3.3.tgz#97893814e92abd2c534de422cb377e0e0bdaac94" + integrity sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw== dependencies: - type-detect "4.0.8" + "@types/chai" "*" -"@sinonjs/fake-timers@^9.1.2": - version "9.1.2" - resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz" - integrity sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw== - dependencies: - "@sinonjs/commons" "^1.7.0" - -"@types/babel__core@^7.1.14": - version "7.1.19" - resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz" - integrity sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - -"@types/babel__generator@*": - version "7.6.4" - resolved "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz" - integrity sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg== - dependencies: - "@babel/types" "^7.0.0" - -"@types/babel__template@*": - version "7.4.1" - resolved "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz" - integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.17.1" - resolved "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.17.1.tgz" - integrity sha512-kVzjari1s2YVi77D3w1yuvohV2idweYXMCDzqBiVNN63TcDWrIlTVOYpqVrvbbyOE/IyzBoTKF0fdnLPEORFxA== - dependencies: - "@babel/types" "^7.3.0" - -"@types/graceful-fs@^4.1.3": - version "4.1.5" - resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz" - integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== - dependencies: - "@types/node" "*" - -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": - version "2.0.4" - resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz" - integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== - -"@types/istanbul-lib-report@*": - version "3.0.0" - resolved "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz" - integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== - dependencies: - "@types/istanbul-lib-coverage" "*" - -"@types/istanbul-reports@^3.0.0": - version "3.0.1" - resolved "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz" - integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== - dependencies: - "@types/istanbul-lib-report" "*" - -"@types/jest@^28.1.4": - version "28.1.4" - resolved "https://registry.npmjs.org/@types/jest/-/jest-28.1.4.tgz" - integrity sha512-telv6G5N7zRJiLcI3Rs3o+ipZ28EnE+7EvF0pSrt2pZOMnAVI/f+6/LucDxOvcBcTeTL3JMF744BbVQAVBUQRA== - dependencies: - jest-matcher-utils "^28.0.0" - pretty-format "^28.0.0" +"@types/chai@*", "@types/chai@^4.3.3": + version "4.3.3" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.3.tgz#3c90752792660c4b562ad73b3fbd68bf3bc7ae07" + integrity sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g== "@types/json-schema@^7.0.9": version "7.0.11" @@ -1342,28 +1004,6 @@ resolved "https://registry.npmjs.org/@types/node/-/node-18.8.3.tgz" integrity sha512-0os9vz6BpGwxGe9LOhgP/ncvYN5Tx1fNcd2TM3rD/aCGBkysb+ZWpXEocG24h6ZzOi13+VB8HndAQFezsSOw1w== -"@types/prettier@^2.1.5": - version "2.6.3" - resolved "https://registry.npmjs.org/@types/prettier/-/prettier-2.6.3.tgz" - integrity sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg== - -"@types/stack-utils@^2.0.0": - version "2.0.1" - resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz" - integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== - -"@types/yargs-parser@*": - version "21.0.0" - resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz" - integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== - -"@types/yargs@^17.0.8": - version "17.0.10" - resolved "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz" - integrity sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA== - dependencies: - "@types/yargs-parser" "*" - "@typescript-eslint/eslint-plugin@^5.32.0": version "5.32.0" resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.32.0.tgz" @@ -1469,13 +1109,6 @@ ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ansi-escapes@^4.2.1: - version "4.3.2" - resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" @@ -1488,33 +1121,13 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0, ansi-styles@^4.1.0: +ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" -ansi-styles@^5.0.0: - version "5.2.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz" - integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== - -anymatch@^3.0.3: - version "3.1.2" - resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz" - integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - argparse@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" @@ -1537,6 +1150,11 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" @@ -1552,19 +1170,6 @@ aws4@^1.8.0: resolved "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -babel-jest@^28.1.2: - version "28.1.2" - resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.2.tgz" - integrity sha512-pfmoo6sh4L/+5/G2OOfQrGJgvH7fTa1oChnuYH2G/6gA+JwDvO8PELwvwnofKBMNrQsam0Wy/Rw+QSrBNewq2Q== - dependencies: - "@jest/transform" "^28.1.2" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^28.1.1" - chalk "^4.0.0" - graceful-fs "^4.2.9" - slash "^3.0.0" - babel-plugin-dynamic-import-node@^2.3.3: version "2.3.3" resolved "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz" @@ -1572,27 +1177,6 @@ babel-plugin-dynamic-import-node@^2.3.3: dependencies: object.assign "^4.1.0" -babel-plugin-istanbul@^6.1.1: - version "6.1.1" - resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" - test-exclude "^6.0.0" - -babel-plugin-jest-hoist@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.1.tgz" - integrity sha512-NovGCy5Hn25uMJSAU8FaHqzs13cFoOI4lhIujiepssjCKRsAo3TA734RDWSGxuFTsUJXerYOqQQodlxgmtqbzw== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.1.14" - "@types/babel__traverse" "^7.0.6" - babel-plugin-polyfill-corejs2@^0.3.1: version "0.3.1" resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz" @@ -1617,32 +1201,6 @@ babel-plugin-polyfill-regenerator@^0.3.1: dependencies: "@babel/helper-define-polyfill-provider" "^0.3.1" -babel-preset-current-node-syntax@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz" - integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== - dependencies: - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.8.3" - "@babel/plugin-syntax-import-meta" "^7.8.3" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-top-level-await" "^7.8.3" - -babel-preset-jest@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.1.tgz" - integrity sha512-FCq9Oud0ReTeWtcneYf/48981aTfXYuB9gbU4rBNNJVBSQ6ssv7E6v/qvbBxtOWwZFXjLZwpg+W3q7J6vhH25g== - dependencies: - babel-plugin-jest-hoist "^28.1.1" - babel-preset-current-node-syntax "^1.0.0" - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" @@ -1680,18 +1238,6 @@ browserslist@^4.20.2, browserslist@^4.21.0: node-releases "^2.0.5" update-browserslist-db "^1.0.4" -bser@2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz" - integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== - dependencies: - node-int64 "^0.4.0" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - call-bind@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" @@ -1705,16 +1251,6 @@ callsites@^3.0.0: resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.2.0: - version "6.3.0" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - caniuse-lite@^1.0.30001359: version "1.0.30001363" resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001363.tgz" @@ -1725,6 +1261,19 @@ caseless@~0.12.0: resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== +chai@^4.3.6: + version "4.3.6" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.6.tgz#ffe4ba2d9fa9d6680cc0b370adae709ec9011e9c" + integrity sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^3.0.1" + get-func-name "^2.0.0" + loupe "^2.3.1" + pathval "^1.1.1" + type-detect "^4.0.5" + chalk@^2.0.0: version "2.4.2" resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" @@ -1742,39 +1291,10 @@ chalk@^4.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -char-regex@^1.0.2: +check-error@^1.0.2: version "1.0.2" - resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz" - integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== - -ci-info@^3.2.0: - version "3.3.2" - resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz" - integrity sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg== - -cjs-module-lexer@^1.0.0: - version "1.2.2" - resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz" - integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz" - integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== - -collect-v8-coverage@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz" - integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg== + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== color-convert@^1.9.0: version "1.9.3" @@ -1812,13 +1332,6 @@ concat-map@0.0.1: resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: - version "1.8.0" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz" - integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== - dependencies: - safe-buffer "~5.1.1" - core-js-compat@^3.21.0, core-js-compat@^3.22.1: version "3.23.3" resolved "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.23.3.tgz" @@ -1832,7 +1345,7 @@ core-util-is@1.0.2: resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== -cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.2: version "7.0.3" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -1862,21 +1375,18 @@ debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: dependencies: ms "2.1.2" -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz" - integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== +deep-eql@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" + integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== + dependencies: + type-detect "^4.0.0" deep-is@^0.1.3: version "0.1.4" resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -deepmerge@^4.2.2: - version "4.2.2" - resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz" - integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== - define-properties@^1.1.3: version "1.1.4" resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz" @@ -1890,16 +1400,6 @@ delayed-stream@~1.0.0: resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== -detect-newline@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" - integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== - -diff-sequences@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz" - integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw== - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" @@ -1927,22 +1427,133 @@ electron-to-chromium@^1.4.172: resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.180.tgz" integrity sha512-7at5ash3FD9U5gPa3/wPr6OdiZd/zBjvDZaaHBpcqFOFUhZiWnb7stkqk8xUFL9H9nk7Yok5vCCNK8wyC/+f8A== -emittery@^0.10.2: - version "0.10.2" - resolved "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz" - integrity sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" +esbuild-android-64@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.11.tgz#50402129c3e85bb06434e212374c5f693e4c5f01" + integrity sha512-rrwoXEiuI1kaw4k475NJpexs8GfJqQUKcD08VR8sKHmuW9RUuTR2VxcupVvHdiGh9ihxL9m3lpqB1kju92Ialw== + +esbuild-android-arm64@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.11.tgz#49bee35218ea2ccf1a0c5f187af77c1c0a5dee71" + integrity sha512-/hDubOg7BHOhUUsT8KUIU7GfZm5bihqssvqK5PfO4apag7YuObZRZSzViyEKcFn2tPeHx7RKbSBXvAopSHDZJQ== + +esbuild-darwin-64@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.11.tgz#89a90c8cf6f0029ac4169bfedd012a0412c1575f" + integrity sha512-1DqHD0ms3AhiwkKnjRUzmiW7JnaJJr5FKrPiR7xuyMwnjDqvNWDdMq4rKSD9OC0piFNK6n0LghsglNMe2MwJtA== + +esbuild-darwin-arm64@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.11.tgz#556f4385c6de806cc81132dd7b8af00fe9d292df" + integrity sha512-OMzhxSbS0lwwrW40HHjRCeVIJTURdXFA8c3GU30MlHKuPCcvWNUIKVucVBtNpJySXmbkQMDJdJNrXzNDyvoqvQ== + +esbuild-freebsd-64@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.11.tgz#fd86fd1b3b65366048f35b996d9cdf3547384eee" + integrity sha512-8dKP26r0/Qyez8nTCwpq60QbuYKOeBygdgOAWGCRalunyeqWRoSZj9TQjPDnTTI9joxd3QYw3UhVZTKxO9QdRg== + +esbuild-freebsd-arm64@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.11.tgz#d346bcacfe9779ebc1a11edac1bdedeff6dda3b1" + integrity sha512-aSGiODiukLGGnSg/O9+cGO2QxEacrdCtCawehkWYTt5VX1ni2b9KoxpHCT9h9Y6wGqNHmXFnB47RRJ8BIqZgmQ== + +esbuild-linux-32@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.15.11.tgz#64b50e774bf75af7dcc6a73ad509f2eb0ac4487b" + integrity sha512-lsrAfdyJBGx+6aHIQmgqUonEzKYeBnyfJPkT6N2dOf1RoXYYV1BkWB6G02tjsrz1d5wZzaTc3cF+TKmuTo/ZwA== + +esbuild-linux-64@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.11.tgz#fba3a78b95769772863f8f6dc316abca55cf8416" + integrity sha512-Y2Rh+PcyVhQqXKBTacPCltINN3uIw2xC+dsvLANJ1SpK5NJUtxv8+rqWpjmBgaNWKQT1/uGpMmA9olALy9PLVA== + +esbuild-linux-arm64@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.11.tgz#c0cb31980eee066bfd39a4593660a0ecebe926cb" + integrity sha512-uhcXiTwTmD4OpxJu3xC5TzAAw6Wzf9O1XGWL448EE9bqGjgV1j+oK3lIHAfsHnuIn8K4nDW8yjX0Sv5S++oRuw== + +esbuild-linux-arm@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.11.tgz#7824d20099977aa671016c7de7a5038c9870010f" + integrity sha512-TJllTVk5aSyqPFvvcHTvf6Wu1ZKhWpJ/qNmZO8LL/XeB+LXCclm7HQHNEIz6MT7IX8PmlC1BZYrOiw2sXSB95A== + +esbuild-linux-mips64le@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.11.tgz#10627331c90164e553429ed25e025184bba485b6" + integrity sha512-WD61y/R1M4BLe4gxXRypoQ0Ci+Vjf714QYzcPNkiYv5I8K8WDz2ZR8Bm6cqKxd6rD+e/rZgPDbhQ9PCf7TMHmA== + +esbuild-linux-ppc64le@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.11.tgz#be42679a36a5246b893fc8b898135ebacb5a0a14" + integrity sha512-JVleZS9oPVLTlBhPTWgOwxFWU/wMUdlBwTbGA4GF8c38sLbS13cupj+C8bLq929jU7EMWry4SaL+tKGIaTlqKg== + +esbuild-linux-riscv64@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.11.tgz#3ac2f328e3db73cbff833ada94314d8e79503e54" + integrity sha512-9aLIalZ2HFHIOZpmVU11sEAS9F8TnHw49daEjcgMpBXHFF57VuT9f9/9LKJhw781Gda0P9jDkuCWJ0tFbErvJw== + +esbuild-linux-s390x@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.11.tgz#e774e0df061b6847d86783bf3c8c4300a72e03ad" + integrity sha512-sZHtiXXOKsLI3XGBGoYO4qKBzJlb8xNsWmvFiwFMHFzA4AXgDP1KDp7Dawe9C2pavTRBDvl+Ok4n/DHQ59oaTg== + +esbuild-netbsd-64@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.11.tgz#55e265fa4489e3f396b16c81f6f5a11d6ca2a9a4" + integrity sha512-hUC9yN06K9sg7ju4Vgu9ChAPdsEgtcrcLfyNT5IKwKyfpLvKUwCMZSdF+gRD3WpyZelgTQfJ+pDx5XFbXTlB0A== + +esbuild-openbsd-64@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.11.tgz#bc04103ccfd8c2f2241e1add0b51a095955b73c4" + integrity sha512-0bBo9SQR4t66Wd91LGMAqmWorzO0TTzVjYiifwoFtel8luFeXuPThQnEm5ztN4g0fnvcp7AnUPPzS/Depf17wQ== + +esbuild-sunos-64@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.11.tgz#ccd580305d31fde07b5c386da79c942aaf069013" + integrity sha512-EuBdTGlsMTjEl1sQnBX2jfygy7iR6CKfvOzi+gEOfhDqbHXsmY1dcpbVtcwHAg9/2yUZSfMJHMAgf1z8M4yyyw== + +esbuild-windows-32@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.11.tgz#40fe1d48f9b20a76f6db5109aaaf1511aed58c71" + integrity sha512-O0/Wo1Wk6dc0rZSxkvGpmTNIycEznHmkObTFz2VHBhjPsO4ZpCgfGxNkCpz4AdAIeMczpTXt/8d5vdJNKEGC+Q== + +esbuild-windows-64@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.15.11.tgz#80c58b1ef2ff030c78e3a06e7a922776cc4cb687" + integrity sha512-x977Q4HhNjnHx00b4XLAnTtj5vfbdEvkxaQwC1Zh5AN8g5EX+izgZ6e5QgqJgpzyRNJqh4hkgIJF1pyy1be0mQ== + +esbuild-windows-arm64@0.15.11: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.11.tgz#018624023b5c3f0cca334cc99f5ef7134d396333" + integrity sha512-VwUHFACuBahrvntdcMKZteUZ9HaYrBRODoKe4tIWxguQRvvYoYb7iu5LrcRS/FQx8KPZNaa72zuqwVtHeXsITw== + +esbuild@^0.15.9: + version "0.15.11" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.11.tgz#524d48612a9aa7edc1753c83459cb6fcae0cb66e" + integrity sha512-OgHGuhlfZ//mToxjte1D5iiiQgWfJ2GByVMwEC/IuoXsBGkuyK1+KrjYu0laSpnN/L1UmLUCv0s25vObdc1bVg== + optionalDependencies: + "@esbuild/android-arm" "0.15.11" + "@esbuild/linux-loong64" "0.15.11" + esbuild-android-64 "0.15.11" + esbuild-android-arm64 "0.15.11" + esbuild-darwin-64 "0.15.11" + esbuild-darwin-arm64 "0.15.11" + esbuild-freebsd-64 "0.15.11" + esbuild-freebsd-arm64 "0.15.11" + esbuild-linux-32 "0.15.11" + esbuild-linux-64 "0.15.11" + esbuild-linux-arm "0.15.11" + esbuild-linux-arm64 "0.15.11" + esbuild-linux-mips64le "0.15.11" + esbuild-linux-ppc64le "0.15.11" + esbuild-linux-riscv64 "0.15.11" + esbuild-linux-s390x "0.15.11" + esbuild-netbsd-64 "0.15.11" + esbuild-openbsd-64 "0.15.11" + esbuild-sunos-64 "0.15.11" + esbuild-windows-32 "0.15.11" + esbuild-windows-64 "0.15.11" + esbuild-windows-arm64 "0.15.11" escalade@^3.1.1: version "3.1.1" @@ -1954,11 +1565,6 @@ escape-string-regexp@^1.0.5: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" @@ -2051,11 +1657,6 @@ espree@^9.3.2, espree@^9.3.3: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.3.0" -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - esquery@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz" @@ -2085,37 +1686,6 @@ esutils@^2.0.2: resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz" - integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== - -expect@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/expect/-/expect-28.1.1.tgz" - integrity sha512-/AANEwGL0tWBwzLNOvO0yUdy2D52jVdNXppOqswC49sxMN2cPWsGCQdzuIf9tj6hHoBQzNvx75JUYuQAckPo3w== - dependencies: - "@jest/expect-utils" "^28.1.1" - jest-get-type "^28.0.2" - jest-matcher-utils "^28.1.1" - jest-message-util "^28.1.1" - jest-util "^28.1.1" - extend@~3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" @@ -2164,13 +1734,6 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" -fb-watchman@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz" - integrity sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg== - dependencies: - bser "2.1.1" - file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" @@ -2185,14 +1748,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - find-up@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" @@ -2233,7 +1788,7 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^2.3.2: +fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -2248,15 +1803,10 @@ functional-red-black-tree@^1.0.1: resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz" integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: version "1.1.2" @@ -2267,16 +1817,6 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: has "^1.0.3" has-symbols "^1.0.3" -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - getpass@^0.1.1: version "0.1.7" resolved "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz" @@ -2298,7 +1838,7 @@ glob-parent@^6.0.1: dependencies: is-glob "^4.0.3" -glob@^7.1.3, glob@^7.1.4: +glob@^7.1.3: version "7.2.3" resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -2334,11 +1874,6 @@ globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -graceful-fs@^4.2.9: - version "4.2.10" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== - grapheme-splitter@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz" @@ -2386,11 +1921,6 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - http-signature@~1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz" @@ -2400,11 +1930,6 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - ignore@^5.2.0: version "5.2.0" resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz" @@ -2418,14 +1943,6 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: parent-module "^1.0.0" resolve-from "^4.0.0" -import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" @@ -2444,11 +1961,6 @@ inherits@2: resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - is-core-module@^2.9.0: version "2.9.0" resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz" @@ -2461,16 +1973,6 @@ is-extglob@^2.1.1: resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-generator-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz" - integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== - is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: version "4.0.3" resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" @@ -2483,11 +1985,6 @@ is-number@^7.0.0: resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" @@ -2503,419 +2000,11 @@ isstream@~0.1.2: resolved "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz" - integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== - -istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: - version "5.2.0" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz" - integrity sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" - -istanbul-lib-report@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz" - integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^3.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.1.3: - version "3.1.4" - resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz" - integrity sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - -jest-changed-files@^28.0.2: - version "28.0.2" - resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.0.2.tgz" - integrity sha512-QX9u+5I2s54ZnGoMEjiM2WeBvJR2J7w/8ZUmH2um/WLAuGAYFQcsVXY9+1YL6k0H/AGUdH8pXUAv6erDqEsvIA== - dependencies: - execa "^5.0.0" - throat "^6.0.1" - -jest-circus@^28.1.2: - version "28.1.2" - resolved "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.2.tgz" - integrity sha512-E2vdPIJG5/69EMpslFhaA46WkcrN74LI5V/cSJ59L7uS8UNoXbzTxmwhpi9XrIL3zqvMt5T0pl5k2l2u2GwBNQ== - dependencies: - "@jest/environment" "^28.1.2" - "@jest/expect" "^28.1.2" - "@jest/test-result" "^28.1.1" - "@jest/types" "^28.1.1" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^0.7.0" - is-generator-fn "^2.0.0" - jest-each "^28.1.1" - jest-matcher-utils "^28.1.1" - jest-message-util "^28.1.1" - jest-runtime "^28.1.2" - jest-snapshot "^28.1.2" - jest-util "^28.1.1" - pretty-format "^28.1.1" - slash "^3.0.0" - stack-utils "^2.0.3" - throat "^6.0.1" - -jest-cli@^28.1.2: - version "28.1.2" - resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.2.tgz" - integrity sha512-l6eoi5Do/IJUXAFL9qRmDiFpBeEJAnjJb1dcd9i/VWfVWbp3mJhuH50dNtX67Ali4Ecvt4eBkWb4hXhPHkAZTw== - dependencies: - "@jest/core" "^28.1.2" - "@jest/test-result" "^28.1.1" - "@jest/types" "^28.1.1" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - import-local "^3.0.2" - jest-config "^28.1.2" - jest-util "^28.1.1" - jest-validate "^28.1.1" - prompts "^2.0.1" - yargs "^17.3.1" - -jest-config@^28.1.2: - version "28.1.2" - resolved "https://registry.npmjs.org/jest-config/-/jest-config-28.1.2.tgz" - integrity sha512-g6EfeRqddVbjPVBVY4JWpUY4IvQoFRIZcv4V36QkqzE0IGhEC/VkugFeBMAeUE7PRgC8KJF0yvJNDeQRbamEVA== - dependencies: - "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^28.1.1" - "@jest/types" "^28.1.1" - babel-jest "^28.1.2" - chalk "^4.0.0" - ci-info "^3.2.0" - deepmerge "^4.2.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-circus "^28.1.2" - jest-environment-node "^28.1.2" - jest-get-type "^28.0.2" - jest-regex-util "^28.0.2" - jest-resolve "^28.1.1" - jest-runner "^28.1.2" - jest-util "^28.1.1" - jest-validate "^28.1.1" - micromatch "^4.0.4" - parse-json "^5.2.0" - pretty-format "^28.1.1" - slash "^3.0.0" - strip-json-comments "^3.1.1" - -jest-diff@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz" - integrity sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg== - dependencies: - chalk "^4.0.0" - diff-sequences "^28.1.1" - jest-get-type "^28.0.2" - pretty-format "^28.1.1" - -jest-docblock@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz" - integrity sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA== - dependencies: - detect-newline "^3.0.0" - -jest-each@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/jest-each/-/jest-each-28.1.1.tgz" - integrity sha512-A042rqh17ZvEhRceDMi784ppoXR7MWGDEKTXEZXb4svt0eShMZvijGxzKsx+yIjeE8QYmHPrnHiTSQVhN4nqaw== - dependencies: - "@jest/types" "^28.1.1" - chalk "^4.0.0" - jest-get-type "^28.0.2" - jest-util "^28.1.1" - pretty-format "^28.1.1" - -jest-environment-node@^28.1.2: - version "28.1.2" - resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.2.tgz" - integrity sha512-oYsZz9Qw27XKmOgTtnl0jW7VplJkN2oeof+SwAwKFQacq3CLlG9u4kTGuuLWfvu3J7bVutWlrbEQMOCL/jughw== - dependencies: - "@jest/environment" "^28.1.2" - "@jest/fake-timers" "^28.1.2" - "@jest/types" "^28.1.1" - "@types/node" "*" - jest-mock "^28.1.1" - jest-util "^28.1.1" - -jest-get-type@^28.0.2: - version "28.0.2" - resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz" - integrity sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA== - -jest-haste-map@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.1.tgz" - integrity sha512-ZrRSE2o3Ezh7sb1KmeLEZRZ4mgufbrMwolcFHNRSjKZhpLa8TdooXOOFlSwoUzlbVs1t0l7upVRW2K7RWGHzbQ== - dependencies: - "@jest/types" "^28.1.1" - "@types/graceful-fs" "^4.1.3" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.9" - jest-regex-util "^28.0.2" - jest-util "^28.1.1" - jest-worker "^28.1.1" - micromatch "^4.0.4" - walker "^1.0.8" - optionalDependencies: - fsevents "^2.3.2" - -jest-leak-detector@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.1.tgz" - integrity sha512-4jvs8V8kLbAaotE+wFR7vfUGf603cwYtFf1/PYEsyX2BAjSzj8hQSVTP6OWzseTl0xL6dyHuKs2JAks7Pfubmw== - dependencies: - jest-get-type "^28.0.2" - pretty-format "^28.1.1" - -jest-matcher-utils@^28.0.0, jest-matcher-utils@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz" - integrity sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw== - dependencies: - chalk "^4.0.0" - jest-diff "^28.1.1" - jest-get-type "^28.0.2" - pretty-format "^28.1.1" - -jest-message-util@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.1.tgz" - integrity sha512-xoDOOT66fLfmTRiqkoLIU7v42mal/SqwDKvfmfiWAdJMSJiU+ozgluO7KbvoAgiwIrrGZsV7viETjc8GNrA/IQ== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^28.1.1" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - micromatch "^4.0.4" - pretty-format "^28.1.1" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-mock@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.1.tgz" - integrity sha512-bDCb0FjfsmKweAvE09dZT59IMkzgN0fYBH6t5S45NoJfd2DHkS3ySG2K+hucortryhO3fVuXdlxWcbtIuV/Skw== - dependencies: - "@jest/types" "^28.1.1" - "@types/node" "*" - -jest-pnp-resolver@^1.2.2: - version "1.2.2" - resolved "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz" - integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== - -jest-regex-util@^28.0.2: - version "28.0.2" - resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz" - integrity sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw== - -jest-resolve-dependencies@^28.1.2: - version "28.1.2" - resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.2.tgz" - integrity sha512-OXw4vbOZuyRTBi3tapWBqdyodU+T33ww5cPZORuTWkg+Y8lmsxQlVu3MWtJh6NMlKRTHQetF96yGPv01Ye7Mbg== - dependencies: - jest-regex-util "^28.0.2" - jest-snapshot "^28.1.2" - -jest-resolve@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.1.tgz" - integrity sha512-/d1UbyUkf9nvsgdBildLe6LAD4DalgkgZcKd0nZ8XUGPyA/7fsnaQIlKVnDiuUXv/IeZhPEDrRJubVSulxrShA== - dependencies: - chalk "^4.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^28.1.1" - jest-pnp-resolver "^1.2.2" - jest-util "^28.1.1" - jest-validate "^28.1.1" - resolve "^1.20.0" - resolve.exports "^1.1.0" - slash "^3.0.0" - -jest-runner@^28.1.2: - version "28.1.2" - resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.2.tgz" - integrity sha512-6/k3DlAsAEr5VcptCMdhtRhOoYClZQmxnVMZvZ/quvPGRpN7OBQYPIC32tWSgOnbgqLXNs5RAniC+nkdFZpD4A== - dependencies: - "@jest/console" "^28.1.1" - "@jest/environment" "^28.1.2" - "@jest/test-result" "^28.1.1" - "@jest/transform" "^28.1.2" - "@jest/types" "^28.1.1" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.10.2" - graceful-fs "^4.2.9" - jest-docblock "^28.1.1" - jest-environment-node "^28.1.2" - jest-haste-map "^28.1.1" - jest-leak-detector "^28.1.1" - jest-message-util "^28.1.1" - jest-resolve "^28.1.1" - jest-runtime "^28.1.2" - jest-util "^28.1.1" - jest-watcher "^28.1.1" - jest-worker "^28.1.1" - source-map-support "0.5.13" - throat "^6.0.1" - -jest-runtime@^28.1.2: - version "28.1.2" - resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.2.tgz" - integrity sha512-i4w93OsWzLOeMXSi9epmakb2+3z0AchZtUQVF1hesBmcQQy4vtaql5YdVe9KexdJaVRyPDw8DoBR0j3lYsZVYw== - dependencies: - "@jest/environment" "^28.1.2" - "@jest/fake-timers" "^28.1.2" - "@jest/globals" "^28.1.2" - "@jest/source-map" "^28.1.2" - "@jest/test-result" "^28.1.1" - "@jest/transform" "^28.1.2" - "@jest/types" "^28.1.1" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - execa "^5.0.0" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-haste-map "^28.1.1" - jest-message-util "^28.1.1" - jest-mock "^28.1.1" - jest-regex-util "^28.0.2" - jest-resolve "^28.1.1" - jest-snapshot "^28.1.2" - jest-util "^28.1.1" - slash "^3.0.0" - strip-bom "^4.0.0" - -jest-snapshot@^28.1.2: - version "28.1.2" - resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.2.tgz" - integrity sha512-wzrieFttZYfLvrCVRJxX+jwML2YTArOUqFpCoSVy1QUapx+LlV9uLbV/mMEhYj4t7aMeE9aSQFHSvV/oNoDAMA== - dependencies: - "@babel/core" "^7.11.6" - "@babel/generator" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/traverse" "^7.7.2" - "@babel/types" "^7.3.3" - "@jest/expect-utils" "^28.1.1" - "@jest/transform" "^28.1.2" - "@jest/types" "^28.1.1" - "@types/babel__traverse" "^7.0.6" - "@types/prettier" "^2.1.5" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^28.1.1" - graceful-fs "^4.2.9" - jest-diff "^28.1.1" - jest-get-type "^28.0.2" - jest-haste-map "^28.1.1" - jest-matcher-utils "^28.1.1" - jest-message-util "^28.1.1" - jest-util "^28.1.1" - natural-compare "^1.4.0" - pretty-format "^28.1.1" - semver "^7.3.5" - -jest-util@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/jest-util/-/jest-util-28.1.1.tgz" - integrity sha512-FktOu7ca1DZSyhPAxgxB6hfh2+9zMoJ7aEQA759Z6p45NuO8mWcqujH+UdHlCm/V6JTWwDztM2ITCzU1ijJAfw== - dependencies: - "@jest/types" "^28.1.1" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - -jest-validate@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.1.tgz" - integrity sha512-Kpf6gcClqFCIZ4ti5++XemYJWUPCFUW+N2gknn+KgnDf549iLul3cBuKVe1YcWRlaF8tZV8eJCap0eECOEE3Ug== - dependencies: - "@jest/types" "^28.1.1" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^28.0.2" - leven "^3.1.0" - pretty-format "^28.1.1" - -jest-watcher@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.1.tgz" - integrity sha512-RQIpeZ8EIJMxbQrXpJQYIIlubBnB9imEHsxxE41f54ZwcqWLysL/A0ZcdMirf+XsMn3xfphVQVV4EW0/p7i7Ug== - dependencies: - "@jest/test-result" "^28.1.1" - "@jest/types" "^28.1.1" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - emittery "^0.10.2" - jest-util "^28.1.1" - string-length "^4.0.1" - -jest-worker@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.1.tgz" - integrity sha512-Au7slXB08C6h+xbJPp7VIb6U0XX5Kc9uel/WFc6/rcTzGiaVCBRngBExSYuXSLFPULPSYU3cJ3ybS988lNFQhQ== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jest@^28.1.2: - version "28.1.2" - resolved "https://registry.npmjs.org/jest/-/jest-28.1.2.tgz" - integrity sha512-Tuf05DwLeCh2cfWCQbcz9UxldoDyiR1E9Igaei5khjonKncYdc6LDfynKCEWozK0oLE3GD+xKAo2u8x/0s6GOg== - dependencies: - "@jest/core" "^28.1.2" - "@jest/types" "^28.1.1" - import-local "^3.0.2" - jest-cli "^28.1.2" - js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" @@ -2938,11 +2027,6 @@ jsesc@~0.5.0: resolved "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz" integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== -json-parse-even-better-errors@^2.3.0: - version "2.3.1" - resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" @@ -2963,11 +2047,6 @@ json-stringify-safe@~5.0.1: resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== -json5@^2.2.1: - version "2.2.1" - resolved "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz" - integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== - jsprim@^1.2.2: version "1.4.2" resolved "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz" @@ -2978,16 +2057,6 @@ jsprim@^1.2.2: json-schema "0.4.0" verror "1.10.0" -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - -leven@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz" - integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== - levn@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" @@ -2996,17 +2065,10 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" +local-pkg@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.2.tgz#13107310b77e74a0e513147a131a2ba288176c2f" + integrity sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg== locate-path@^6.0.0: version "6.0.0" @@ -3025,6 +2087,13 @@ lodash.merge@^4.6.2: resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +loupe@^2.3.1: + version "2.3.4" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.4.tgz#7e0b9bffc76f148f9be769cb1321d3dcf3cb25f3" + integrity sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ== + dependencies: + get-func-name "^2.0.0" + lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" @@ -3032,25 +2101,6 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -make-dir@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -makeerror@1.0.12: - version "1.0.12" - resolved "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz" - integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== - dependencies: - tmpl "1.0.5" - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" @@ -3076,11 +2126,6 @@ mime-types@^2.1.12, mime-types@~2.1.19: dependencies: mime-db "1.52.0" -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" @@ -3098,33 +2143,21 @@ ms@2.1.2: resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +nanoid@^3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz" - integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== - node-releases@^2.0.5: version "2.0.5" resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.5.tgz" integrity sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q== -normalize-path@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz" @@ -3152,13 +2185,6 @@ once@^1.3.0: dependencies: wrappy "1" -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - opml@^0.4.24: version "0.4.24" resolved "https://registry.npmjs.org/opml/-/opml-0.4.24.tgz" @@ -3190,13 +2216,6 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - p-limit@^3.0.2: version "3.1.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" @@ -3204,13 +2223,6 @@ p-limit@^3.0.2: dependencies: yocto-queue "^0.1.0" -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - p-locate@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" @@ -3218,11 +2230,6 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - parent-module@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" @@ -3230,16 +2237,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-json@^5.2.0: - version "5.2.0" - resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - path-exists@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" @@ -3250,7 +2247,7 @@ path-is-absolute@^1.0.0: resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -path-key@^3.0.0, path-key@^3.1.0: +path-key@^3.1.0: version "3.1.1" resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== @@ -3265,6 +2262,11 @@ path-type@^4.0.0: resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" @@ -3275,22 +2277,19 @@ picocolors@^1.0.0: resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: +picomatch@^2.3.1: version "2.3.1" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pirates@^4.0.4: - version "4.0.5" - resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz" - integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== - -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== +postcss@^8.4.16: + version "8.4.18" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.18.tgz#6d50046ea7d3d66a85e0e782074e7203bc7fbca2" + integrity sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA== dependencies: - find-up "^4.0.0" + nanoid "^3.3.4" + picocolors "^1.0.0" + source-map-js "^1.0.2" prelude-ls@^1.2.1: version "1.2.1" @@ -3302,24 +2301,6 @@ prettier@^2.7.1: resolved "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== -pretty-format@^28.0.0, pretty-format@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz" - integrity sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw== - dependencies: - "@jest/schemas" "^28.0.2" - ansi-regex "^5.0.1" - ansi-styles "^5.0.0" - react-is "^18.0.0" - -prompts@^2.0.1: - version "2.4.2" - resolved "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz" - integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - psl@^1.1.28: version "1.9.0" resolved "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz" @@ -3340,11 +2321,6 @@ queue-microtask@^1.2.2: resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -react-is@^18.0.0: - version "18.2.0" - resolved "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz" - integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== - regenerate-unicode-properties@^10.0.1: version "10.0.1" resolved "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz" @@ -3424,34 +2400,12 @@ request@*: tunnel-agent "^0.6.0" uuid "^3.3.2" -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve.exports@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz" - integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== - -resolve@^1.14.2, resolve@^1.20.0: +resolve@^1.14.2, resolve@^1.22.1: version "1.22.1" resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== @@ -3465,13 +2419,20 @@ reusify@^1.0.4: resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^3.0.0, rimraf@^3.0.2: +rimraf@^3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" +rollup@~2.78.0: + version "2.78.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.78.1.tgz#52fe3934d9c83cb4f7c4cb5fb75d88591be8648f" + integrity sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg== + optionalDependencies: + fsevents "~2.3.2" + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" @@ -3484,11 +2445,6 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.2: resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" @@ -3504,12 +2460,12 @@ semver@7.0.0: resolved "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: +semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: version "6.3.0" resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.3.5, semver@^7.3.7: +semver@^7.3.7: version "7.3.7" resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz" integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== @@ -3528,38 +2484,15 @@ shebang-regex@^3.0.0: resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -signal-exit@^3.0.3, signal-exit@^3.0.7: - version "3.0.7" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - slash@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -source-map-support@0.5.13: - version "0.5.13" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== sshpk@^1.7.0: version "1.17.0" @@ -3576,52 +2509,25 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" -stack-utils@^2.0.3: - version "2.0.5" - resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz" - integrity sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA== - dependencies: - escape-string-regexp "^2.0.0" - -string-length@^4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" - integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== - dependencies: - char-regex "^1.0.2" - strip-ansi "^6.0.0" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: +strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: ansi-regex "^5.0.1" -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +strip-literal@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-0.4.2.tgz#4f9fa6c38bb157b924e9ace7155ebf8a2342cbcf" + integrity sha512-pv48ybn4iE1O9RLgCAN0iU4Xv7RlBTiit6DKmMiErbs9x1wH6vXBs45tWc0H5wUIF6TLTrKweqkmYF/iraQKNw== + dependencies: + acorn "^8.8.0" + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" @@ -3629,64 +2535,37 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -supports-color@^7.0.0, supports-color@^7.1.0: +supports-color@^7.1.0: version "7.2.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-hyperlinks@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz" - integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ== - dependencies: - has-flag "^4.0.0" - supports-color "^7.0.0" - supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -terminal-link@^2.0.0: - version "2.1.1" - resolved "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz" - integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== - dependencies: - ansi-escapes "^4.2.1" - supports-hyperlinks "^2.0.0" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - text-table@^0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== -throat@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz" - integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w== +tinybench@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.3.0.tgz#febb2e697c735c0cdb8eb1e43cb1d2fa1821f983" + integrity sha512-zs1gMVBwyyG2QbVchYIbnabRhMOCGvrwZz/q+SV+LIMa9q5YDQZi2kkI6ZRqV2Bz7ba1uvrc7ieUoE4KWnGeKg== -tmpl@1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz" - integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== +tinypool@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.3.0.tgz#c405d8b743509fc28ea4ca358433190be654f819" + integrity sha512-NX5KeqHOBZU6Bc0xj9Vr5Szbb1j8tUHIeD18s41aDJaPeC5QTdEhK0SpdpUrZlj2nv5cctNcSjaKNanXlfcVEQ== + +tinyspy@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-1.0.2.tgz#6da0b3918bfd56170fb3cd3a2b5ef832ee1dff0d" + integrity sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q== to-fast-properties@^2.0.0: version "2.0.0" @@ -3739,7 +2618,7 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" -type-detect@4.0.8: +type-detect@^4.0.0, type-detect@^4.0.5: version "4.0.8" resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== @@ -3749,11 +2628,6 @@ type-fest@^0.20.2: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - typescript@^4.7.4: version "4.7.4" resolved "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz" @@ -3807,15 +2681,6 @@ v8-compile-cache@^2.0.3: resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== -v8-to-istanbul@^9.0.1: - version "9.0.1" - resolved "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz" - integrity sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w== - dependencies: - "@jridgewell/trace-mapping" "^0.3.12" - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" - verror@1.10.0: version "1.10.0" resolved "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz" @@ -3825,12 +2690,34 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -walker@^1.0.8: - version "1.0.8" - resolved "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz" - integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== +vite@^3.0.0, vite@^3.1.8: + version "3.1.8" + resolved "https://registry.yarnpkg.com/vite/-/vite-3.1.8.tgz#fa29144167d19b773baffd65b3972ea4c12359c9" + integrity sha512-m7jJe3nufUbuOfotkntGFupinL/fmuTNuQmiVE7cH2IZMuf4UbfbGYMUT3jVWgGYuRVLY9j8NnrRqgw5rr5QTg== dependencies: - makeerror "1.0.12" + esbuild "^0.15.9" + postcss "^8.4.16" + resolve "^1.22.1" + rollup "~2.78.0" + optionalDependencies: + fsevents "~2.3.2" + +vitest@^0.24.3: + version "0.24.3" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.24.3.tgz#d91c7e2d557877d5270033efdf18add6063f0c97" + integrity sha512-aM0auuPPgMSstWvr851hB74g/LKaKBzSxcG3da7ejfZbx08Y21JpZmbmDYrMTCGhVZKqTGwzcnLMwyfz2WzkhQ== + dependencies: + "@types/chai" "^4.3.3" + "@types/chai-subset" "^1.3.3" + "@types/node" "*" + chai "^4.3.6" + debug "^4.3.4" + local-pkg "^0.4.2" + strip-literal "^0.4.2" + tinybench "^2.3.0" + tinypool "^0.3.0" + tinyspy "^1.0.2" + vite "^3.0.0" which@^2.0.1: version "2.0.2" @@ -3844,28 +2731,11 @@ word-wrap@^1.2.3: resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrappy@1: version "1.0.2" resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -write-file-atomic@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz" - integrity sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ== - dependencies: - imurmurhash "^0.1.4" - signal-exit "^3.0.7" - xml2js@*: version "0.4.23" resolved "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz" @@ -3879,34 +2749,11 @@ xmlbuilder@~11.0.0: resolved "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz" integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - yallist@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@^21.0.0: - version "21.0.1" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz" - integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== - -yargs@^17.3.1: - version "17.5.1" - resolved "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz" - integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.0.0" - yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" From 77c839f88ffd625fa08a7cb62bfb1a1027cb6f81 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sat, 15 Oct 2022 00:45:15 +0200 Subject: [PATCH 61/94] Obsidian: add progess text to converter homepage --- index.html | 2 +- public/index.html | 2 +- src/script.ts | 5 +++++ vite.config.ts | 5 +++++ 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 vite.config.ts diff --git a/index.html b/index.html index baf8a12..e419b40 100644 --- a/index.html +++ b/index.html @@ -14,6 +14,6 @@

Obsidian-2-Tana Converter


- + diff --git a/public/index.html b/public/index.html index abf0292..2f654d7 100644 --- a/public/index.html +++ b/public/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

diff --git a/src/script.ts b/src/script.ts index c3c44e6..c79527c 100644 --- a/src/script.ts +++ b/src/script.ts @@ -4,7 +4,12 @@ const zipInput = document.getElementById('vault-zip') as HTMLInputElement; zipInput.addEventListener('change', async (event) => { const zipFile = ((event.target as HTMLInputElement).files as FileList)[0]; const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip')); + const progress = document.createElement('b'); + progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
'; + document.body.appendChild(progress); + const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, 1); + document.body.removeChild(progress); const success = document.createElement('b'); success.innerHTML = 'Success!
'; diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..6923897 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,5 @@ +import { defineConfig } from 'vite'; + +export default defineConfig({ + base: '', +}); From ed1c453ff16785312f7b8e214063b91982f77310 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sat, 15 Oct 2022 01:18:51 +0200 Subject: [PATCH 62/94] Obsidian: adapt converter homepage deployment --- .../assets/index.d5ac21b8.js => docs/assets/index.89830bcb.js | 4 ++-- {public => docs}/index.html | 2 +- package.json | 4 ++-- src/converters/obsidian/filesystem/WebFileSystemAdapter.ts | 4 ++-- tsconfig.build.json | 1 + 5 files changed, 8 insertions(+), 7 deletions(-) rename public/assets/index.d5ac21b8.js => docs/assets/index.89830bcb.js (99%) rename {public => docs}/index.html (89%) diff --git a/public/assets/index.d5ac21b8.js b/docs/assets/index.89830bcb.js similarity index 99% rename from public/assets/index.d5ac21b8.js rename to docs/assets/index.89830bcb.js index 506a0ce..2b3df35 100644 --- a/public/assets/index.d5ac21b8.js +++ b/docs/assets/index.89830bcb.js @@ -41,5 +41,5 @@ L.version="2.29.4";Qu(oe);L.fn=M;L.min=Wh;L.max=Hh;L.now=jh;L.utc=ft;L.unix=_m;L `+JSON.stringify(e.attributes,null,2)),e.fileSystemAdapter.appendToFile(n,`, "summary": `+JSON.stringify(e.summary,null,2)),e.fileSystemAdapter.appendToFile(n,` -}`),e.summary}async function cp(e){const t=e.vaultPath+"/.obsidian/daily-notes.json";if(e.fileSystemAdapter.exists(t)){const n=await e.fileSystemAdapter.readFile(t),r=JSON.parse(n.toString());r.format&&(e.dailyNoteFormat=r.format)}}async function dp(e,t,n,r){const i=new nu(e),s=su(t,i,r);return lp(s,n).then(a=>[a,s,i])}const fp=document.getElementById("vault-zip");fp.addEventListener("change",async e=>{const t=e.target.files[0],n=t.name.slice(0,t.name.indexOf(".zip")),[r,,i]=await dp(t,n,1),s=document.createElement("b");s.innerHTML="Success!
",document.body.appendChild(s);const a=document.createElement("h2");a.innerText="Summary:",document.body.appendChild(a);const o=document.createElement("p");o.innerText=Object.entries(r).map(d=>d[0]+": "+d[1]).join(` -`),document.body.appendChild(o);const l=i.getResult(),f=document.createElement("button");f.innerText="Download TIF File",f.addEventListener("click",()=>{const d=URL.createObjectURL(new Blob([l])),u=document.createElement("a");u.style.display="none",u.href=d,u.download=n+".tif.json",document.body.appendChild(u),u.click(),URL.revokeObjectURL(d)}),document.body.appendChild(f)}); +}`),e.summary}async function cp(e){const t=e.vaultPath+"/.obsidian/daily-notes.json";if(e.fileSystemAdapter.exists(t)){const n=await e.fileSystemAdapter.readFile(t),r=JSON.parse(n.toString());r.format&&(e.dailyNoteFormat=r.format)}}async function dp(e,t,n,r){const i=new nu(e),s=su(t,i,r);return lp(s,n).then(a=>[a,s,i])}const fp=document.getElementById("vault-zip");fp.addEventListener("change",async e=>{const t=e.target.files[0],n=t.name.slice(0,t.name.indexOf(".zip")),r=document.createElement("b");r.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(r);const[i,,s]=await dp(t,n,1);document.body.removeChild(r);const a=document.createElement("b");a.innerHTML="Success!
",document.body.appendChild(a);const o=document.createElement("h2");o.innerText="Summary:",document.body.appendChild(o);const l=document.createElement("p");l.innerText=Object.entries(i).map(u=>u[0]+": "+u[1]).join(` +`),document.body.appendChild(l);const f=s.getResult(),d=document.createElement("button");d.innerText="Download TIF File",d.addEventListener("click",()=>{const u=URL.createObjectURL(new Blob([f])),p=document.createElement("a");p.style.display="none",p.href=u,p.download=n+".tif.json",document.body.appendChild(p),p.click(),URL.revokeObjectURL(u)}),document.body.appendChild(d)}); diff --git a/public/index.html b/docs/index.html similarity index 89% rename from public/index.html rename to docs/index.html index 2f654d7..0674e7c 100644 --- a/public/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

diff --git a/package.json b/package.json index 1582ed7..89daff9 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "convert:obsidian": "yarn build && node --experimental-modules --es-module-specifier-resolution=node dist/runner.js obsidian", "zip": "cd ./src/converters/obsidian/tests/fixtures/ && zip -r vault.zip vault && cd -", "test": "vitest", - "deploy": "vite build && rm -rfv ./public/* && mv ./dist/* ./public/" + "deploy": "vite build && rm -rfv ./docs/* && mv ./dist/* ./docs/" }, "devDependencies": { "@babel/preset-env": "^7.18.6", @@ -81,6 +81,6 @@ ] }, "engines": { - "node": ">=17.0.0" + "node": ">=18.3.0" } } diff --git a/src/converters/obsidian/filesystem/WebFileSystemAdapter.ts b/src/converters/obsidian/filesystem/WebFileSystemAdapter.ts index bb97874..7cb3691 100644 --- a/src/converters/obsidian/filesystem/WebFileSystemAdapter.ts +++ b/src/converters/obsidian/filesystem/WebFileSystemAdapter.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import * as zip from '@zip.js/zip.js'; +import { fs } from '@zip.js/zip.js'; import type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js'; import { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter'; @@ -12,7 +12,7 @@ export class WebFileSystemAdapter implements CustomFileSystemAdapter { constructor(private zipBlob: Blob) {} async initReadingVault() { - this.zipFS = new zip.fs.FS() as FS; + this.zipFS = new fs.FS() as FS; await this.zipFS.importBlob(this.zipBlob); } diff --git a/tsconfig.build.json b/tsconfig.build.json index 132d119..80ab868 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -6,6 +6,7 @@ "src/**/*.test.ts", "src/importers/roam/tests", "src/importers/workflowy/tests", + "src/importers/obsidian/tests", "src/testUtils" ] } From 7a4bbb2e6b7aad1bd1a3a8287d074d1f8ccf1fa8 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sat, 15 Oct 2022 22:00:18 +0200 Subject: [PATCH 63/94] Obsidian: added some more help text to the webpage --- docs/index.html | 8 +++++++- index.html | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/index.html b/docs/index.html index 0674e7c..b106196 100644 --- a/docs/index.html +++ b/docs/index.html @@ -8,7 +8,13 @@

Obsidian-2-Tana Converter

-

Select a zip of your Obsidian vault folder and get a TIF file back, ready to be imported in Tana.

+

+ Select a zip of your Obsidian vault folder and get a TIF file back, ready to be imported in Tana.
+ + Zip the central vault folder directly (not just the sub-folders) and don't rename the zip file. Example: my + vault is called pkm, this is also the name of its folder and the zip file is called pkm.zip. + +

There is no server involved in the conversion, the zip file will stay on your computer.

diff --git a/index.html b/index.html index e419b40..0bef681 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,13 @@

Obsidian-2-Tana Converter

-

Select a zip of your Obsidian vault folder and get a TIF file back, ready to be imported in Tana.

+

+ Select a zip of your Obsidian vault folder and get a TIF file back, ready to be imported in Tana.
+ + Zip the central vault folder directly (not just the sub-folders) and don't rename the zip file. Example: my + vault is called pkm, this is also the name of its folder and the zip file is called pkm.zip. + +

There is no server involved in the conversion, the zip file will stay on your computer.

From 9834622c2feec93182d3b3df4ee7d66538a38438 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sat, 15 Oct 2022 22:16:04 +0200 Subject: [PATCH 64/94] Obsidian: added basic error display to webpage --- .../{index.89830bcb.js => index.c6ef5213.js} | 6 +- docs/index.html | 2 +- src/script.ts | 73 +++++++++++-------- 3 files changed, 46 insertions(+), 35 deletions(-) rename docs/assets/{index.89830bcb.js => index.c6ef5213.js} (99%) diff --git a/docs/assets/index.89830bcb.js b/docs/assets/index.c6ef5213.js similarity index 99% rename from docs/assets/index.89830bcb.js rename to docs/assets/index.c6ef5213.js index 2b3df35..cc0ee77 100644 --- a/docs/assets/index.89830bcb.js +++ b/docs/assets/index.c6ef5213.js @@ -41,5 +41,7 @@ L.version="2.29.4";Qu(oe);L.fn=M;L.min=Wh;L.max=Hh;L.now=jh;L.utc=ft;L.unix=_m;L `+JSON.stringify(e.attributes,null,2)),e.fileSystemAdapter.appendToFile(n,`, "summary": `+JSON.stringify(e.summary,null,2)),e.fileSystemAdapter.appendToFile(n,` -}`),e.summary}async function cp(e){const t=e.vaultPath+"/.obsidian/daily-notes.json";if(e.fileSystemAdapter.exists(t)){const n=await e.fileSystemAdapter.readFile(t),r=JSON.parse(n.toString());r.format&&(e.dailyNoteFormat=r.format)}}async function dp(e,t,n,r){const i=new nu(e),s=su(t,i,r);return lp(s,n).then(a=>[a,s,i])}const fp=document.getElementById("vault-zip");fp.addEventListener("change",async e=>{const t=e.target.files[0],n=t.name.slice(0,t.name.indexOf(".zip")),r=document.createElement("b");r.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(r);const[i,,s]=await dp(t,n,1);document.body.removeChild(r);const a=document.createElement("b");a.innerHTML="Success!
",document.body.appendChild(a);const o=document.createElement("h2");o.innerText="Summary:",document.body.appendChild(o);const l=document.createElement("p");l.innerText=Object.entries(i).map(u=>u[0]+": "+u[1]).join(` -`),document.body.appendChild(l);const f=s.getResult(),d=document.createElement("button");d.innerText="Download TIF File",d.addEventListener("click",()=>{const u=URL.createObjectURL(new Blob([f])),p=document.createElement("a");p.style.display="none",p.href=u,p.download=n+".tif.json",document.body.appendChild(p),p.click(),URL.revokeObjectURL(u)}),document.body.appendChild(d)}); +}`),e.summary}async function cp(e){const t=e.vaultPath+"/.obsidian/daily-notes.json";if(e.fileSystemAdapter.exists(t)){const n=await e.fileSystemAdapter.readFile(t),r=JSON.parse(n.toString());r.format&&(e.dailyNoteFormat=r.format)}}async function dp(e,t,n,r){const i=new nu(e),s=su(t,i,r);return lp(s,n).then(a=>[a,s,i])}const fp=document.getElementById("vault-zip");fp.addEventListener("change",async e=>{try{const t=e.target.files[0],n=t.name.slice(0,t.name.indexOf(".zip")),r=document.createElement("b");r.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(r);const[i,,s]=await dp(t,n,1);document.body.removeChild(r);const a=document.createElement("b");a.innerHTML="Success!
",document.body.appendChild(a);const o=document.createElement("h2");o.innerText="Summary:",document.body.appendChild(o);const l=document.createElement("p");l.innerText=Object.entries(i).map(u=>u[0]+": "+u[1]).join(` +`),document.body.appendChild(l);const f=s.getResult(),d=document.createElement("button");d.innerText="Download TIF File",d.addEventListener("click",()=>{const u=URL.createObjectURL(new Blob([f])),p=document.createElement("a");p.style.display="none",p.href=u,p.download=n+".tif.json",document.body.appendChild(p),p.click(),URL.revokeObjectURL(u)}),document.body.appendChild(d)}catch(t){document.body.appendChild(document.createElement("br")),console.log(t);const n=document.createElement("b");n.innerText=`An Error occured: + +`+t.stack.toString(),document.body.appendChild(n)}}); diff --git a/docs/index.html b/docs/index.html index b106196..003be56 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

diff --git a/src/script.ts b/src/script.ts index c79527c..8182b74 100644 --- a/src/script.ts +++ b/src/script.ts @@ -2,40 +2,49 @@ import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaul const zipInput = document.getElementById('vault-zip') as HTMLInputElement; zipInput.addEventListener('change', async (event) => { - const zipFile = ((event.target as HTMLInputElement).files as FileList)[0]; - const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip')); - const progress = document.createElement('b'); - progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
'; - document.body.appendChild(progress); + try { + const zipFile = ((event.target as HTMLInputElement).files as FileList)[0]; + const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip')); + const progress = document.createElement('b'); + progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
'; + document.body.appendChild(progress); - const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, 1); - document.body.removeChild(progress); + const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, 1); + document.body.removeChild(progress); - const success = document.createElement('b'); - success.innerHTML = 'Success!
'; - document.body.appendChild(success); + const success = document.createElement('b'); + success.innerHTML = 'Success!
'; + document.body.appendChild(success); - const summaryHeading = document.createElement('h2'); - summaryHeading.innerText = 'Summary:'; - document.body.appendChild(summaryHeading); - const summaryElement = document.createElement('p'); - summaryElement.innerText = Object.entries(summary) - .map((entry) => entry[0] + ': ' + entry[1]) - .join('\n'); - document.body.appendChild(summaryElement); + const summaryHeading = document.createElement('h2'); + summaryHeading.innerText = 'Summary:'; + document.body.appendChild(summaryHeading); + const summaryElement = document.createElement('p'); + summaryElement.innerText = Object.entries(summary) + .map((entry) => entry[0] + ': ' + entry[1]) + .join('\n'); + document.body.appendChild(summaryElement); - const result = adapter.getResult(); - const downloadButton = document.createElement('button'); - downloadButton.innerText = 'Download TIF File'; - downloadButton.addEventListener('click', () => { - const url = URL.createObjectURL(new Blob([result])); - const a = document.createElement('a'); - a.style.display = 'none'; - a.href = url; - a.download = vaultName + '.tif.json'; - document.body.appendChild(a); - a.click(); - URL.revokeObjectURL(url); - }); - document.body.appendChild(downloadButton); + const result = adapter.getResult(); + const downloadButton = document.createElement('button'); + downloadButton.innerText = 'Download TIF File'; + downloadButton.addEventListener('click', () => { + const url = URL.createObjectURL(new Blob([result])); + const a = document.createElement('a'); + a.style.display = 'none'; + a.href = url; + a.download = vaultName + '.tif.json'; + document.body.appendChild(a); + a.click(); + URL.revokeObjectURL(url); + }); + document.body.appendChild(downloadButton); + } catch (error) { + document.body.appendChild(document.createElement('br')); + console.log(error); + const errorParagraph = document.createElement('b'); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + errorParagraph.innerText = 'An Error occured: \n\n' + (error as any).stack.toString(); + document.body.appendChild(errorParagraph); + } }); From 6eaab6ba02068614b4dab48663e2732dc917a362 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sat, 15 Oct 2022 22:23:33 +0200 Subject: [PATCH 65/94] Obsidian: added basic error display to webpage (2) --- src/script.ts | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/src/script.ts b/src/script.ts index 8182b74..0216102 100644 --- a/src/script.ts +++ b/src/script.ts @@ -2,10 +2,12 @@ import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaul const zipInput = document.getElementById('vault-zip') as HTMLInputElement; zipInput.addEventListener('change', async (event) => { + let progress; + try { const zipFile = ((event.target as HTMLInputElement).files as FileList)[0]; const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip')); - const progress = document.createElement('b'); + progress = document.createElement('b'); progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
'; document.body.appendChild(progress); @@ -40,11 +42,30 @@ zipInput.addEventListener('change', async (event) => { }); document.body.appendChild(downloadButton); } catch (error) { + if (progress) { + document.body.removeChild(progress); + } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const stackStr: string = (error as any).stack.toString(); + document.body.appendChild(document.createElement('br')); - console.log(error); const errorParagraph = document.createElement('b'); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - errorParagraph.innerText = 'An Error occured: \n\n' + (error as any).stack.toString(); + errorParagraph.innerText = 'An Error occured.'; document.body.appendChild(errorParagraph); + if (stackStr.toLowerCase().includes('readdirectory')) { + document.body.appendChild(document.createElement('br')); + document.body.appendChild(document.createElement('br')); + const additionalInfo = document.createElement('b'); + additionalInfo.innerText = + 'It probably has to do with a not properly zipped vault.\nPlease check the text at the top again.'; + document.body.appendChild(additionalInfo); + } + + document.body.appendChild(document.createElement('br')); + document.body.appendChild(document.createElement('br')); + const errorContent = document.createElement('b'); + errorContent.innerText = 'Content of Error (please post in the Slack):\n\n' + stackStr; + document.body.appendChild(errorContent); } }); From 5e58ef2e2bb92e22524190ada839f9e606301e56 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sat, 15 Oct 2022 22:23:47 +0200 Subject: [PATCH 66/94] Obsidian: added basic error display to webpage (3) --- docs/assets/{index.c6ef5213.js => index.b58a0b68.js} | 7 ++++--- docs/index.html | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) rename docs/assets/{index.c6ef5213.js => index.b58a0b68.js} (99%) diff --git a/docs/assets/index.c6ef5213.js b/docs/assets/index.b58a0b68.js similarity index 99% rename from docs/assets/index.c6ef5213.js rename to docs/assets/index.b58a0b68.js index cc0ee77..9849254 100644 --- a/docs/assets/index.c6ef5213.js +++ b/docs/assets/index.b58a0b68.js @@ -41,7 +41,8 @@ L.version="2.29.4";Qu(oe);L.fn=M;L.min=Wh;L.max=Hh;L.now=jh;L.utc=ft;L.unix=_m;L `+JSON.stringify(e.attributes,null,2)),e.fileSystemAdapter.appendToFile(n,`, "summary": `+JSON.stringify(e.summary,null,2)),e.fileSystemAdapter.appendToFile(n,` -}`),e.summary}async function cp(e){const t=e.vaultPath+"/.obsidian/daily-notes.json";if(e.fileSystemAdapter.exists(t)){const n=await e.fileSystemAdapter.readFile(t),r=JSON.parse(n.toString());r.format&&(e.dailyNoteFormat=r.format)}}async function dp(e,t,n,r){const i=new nu(e),s=su(t,i,r);return lp(s,n).then(a=>[a,s,i])}const fp=document.getElementById("vault-zip");fp.addEventListener("change",async e=>{try{const t=e.target.files[0],n=t.name.slice(0,t.name.indexOf(".zip")),r=document.createElement("b");r.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(r);const[i,,s]=await dp(t,n,1);document.body.removeChild(r);const a=document.createElement("b");a.innerHTML="Success!
",document.body.appendChild(a);const o=document.createElement("h2");o.innerText="Summary:",document.body.appendChild(o);const l=document.createElement("p");l.innerText=Object.entries(i).map(u=>u[0]+": "+u[1]).join(` -`),document.body.appendChild(l);const f=s.getResult(),d=document.createElement("button");d.innerText="Download TIF File",d.addEventListener("click",()=>{const u=URL.createObjectURL(new Blob([f])),p=document.createElement("a");p.style.display="none",p.href=u,p.download=n+".tif.json",document.body.appendChild(p),p.click(),URL.revokeObjectURL(u)}),document.body.appendChild(d)}catch(t){document.body.appendChild(document.createElement("br")),console.log(t);const n=document.createElement("b");n.innerText=`An Error occured: +}`),e.summary}async function cp(e){const t=e.vaultPath+"/.obsidian/daily-notes.json";if(e.fileSystemAdapter.exists(t)){const n=await e.fileSystemAdapter.readFile(t),r=JSON.parse(n.toString());r.format&&(e.dailyNoteFormat=r.format)}}async function dp(e,t,n,r){const i=new nu(e),s=su(t,i,r);return lp(s,n).then(a=>[a,s,i])}const fp=document.getElementById("vault-zip");fp.addEventListener("change",async e=>{let t;try{const n=e.target.files[0],r=n.name.slice(0,n.name.indexOf(".zip"));t=document.createElement("b"),t.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(t);const[i,,s]=await dp(n,r,1);document.body.removeChild(t);const a=document.createElement("b");a.innerHTML="Success!
",document.body.appendChild(a);const o=document.createElement("h2");o.innerText="Summary:",document.body.appendChild(o);const l=document.createElement("p");l.innerText=Object.entries(i).map(u=>u[0]+": "+u[1]).join(` +`),document.body.appendChild(l);const f=s.getResult(),d=document.createElement("button");d.innerText="Download TIF File",d.addEventListener("click",()=>{const u=URL.createObjectURL(new Blob([f])),p=document.createElement("a");p.style.display="none",p.href=u,p.download=r+".tif.json",document.body.appendChild(p),p.click(),URL.revokeObjectURL(u)}),document.body.appendChild(d)}catch(n){t&&document.body.removeChild(t);const r=n.stack.toString();document.body.appendChild(document.createElement("br"));const i=document.createElement("b");if(i.innerText="An Error occured.",document.body.appendChild(i),r.toLowerCase().includes("readdirectory")){document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`It probably has to do with a not properly zipped vault. +Please check the text at the top again.`,document.body.appendChild(a)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const s=document.createElement("b");s.innerText=`Content of Error (please post in the Slack): -`+t.stack.toString(),document.body.appendChild(n)}}); +`+r,document.body.appendChild(s)}}); diff --git a/docs/index.html b/docs/index.html index 003be56..82d368a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

From b0fd6c7385c937d4a17264564eb7834b003d22f9 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sun, 16 Oct 2022 14:50:52 +0200 Subject: [PATCH 67/94] Obsidian: double speed of local execution by cutting down on IO --- .../obsidian/ObsidianVaultConverter.ts | 27 +++++++--- .../filesystem/CustomFileSystemAdapter.ts | 9 ++-- .../filesystem/LocalFileSystemAdapter.ts | 54 +++++++++++++++---- .../filesystem/WebFileSystemAdapter.ts | 11 ++-- src/converters/obsidian/links/headingLinks.ts | 6 +-- .../obsidian/tanaconversion/fileConversion.ts | 4 ++ .../obsidian/tanaconversion/nodeConversion.ts | 4 +- .../tanaconversion/vaultConversion.ts | 10 ++-- 8 files changed, 91 insertions(+), 34 deletions(-) diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index fc5bdf0..838f11e 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -20,7 +20,10 @@ export async function ObsidianVaultConverter(context: VaultContext, today: numbe // eslint-disable-next-line no-empty } catch (e) {} - context.fileSystemAdapter.appendToFile(targetPath, '{\n "version": "TanaIntermediateFile V0.1",\n "nodes": [\n'); + context.fileSystemAdapter.appendToResultFile( + targetPath, + '{\n "version": "TanaIntermediateFile V0.1",\n "nodes": [\n', + ); await handleVault( context, @@ -29,40 +32,48 @@ export async function ObsidianVaultConverter(context: VaultContext, today: numbe addParentNodeEnd(context, targetPath), addFileNode(targetPath, today, context), ); + context.fileSystemAdapter.flushResultsFromInitialProcessing(targetPath); //the vault-node needs to be counted as a top level node shiftFromLeafToTop(context.summary); //post processing can be done before unlinked (it will add unlinked headings) //because the unlinked summary nodes are just created by the converter and have no connection to the rest + //20 secs await postProcessTIFFIle(targetPath, context); const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context); if (collectedUnlinkedNodes) { //TODO: summary? - context.fileSystemAdapter.appendToFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2)); + context.fileSystemAdapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2)); } //close vault-node children - context.fileSystemAdapter.appendToFile(targetPath, '\n ]'); + context.fileSystemAdapter.appendToResultFile(targetPath, '\n ]'); const superTags = createSuperTagObjects(context.superTagTracker); if (superTags.length > 0) { - context.fileSystemAdapter.appendToFile(targetPath, ',\n "supertags": \n' + JSON.stringify(superTags, null, 2)); + context.fileSystemAdapter.appendToResultFile( + targetPath, + ',\n "supertags": \n' + JSON.stringify(superTags, null, 2), + ); } if (context.attributes.length > 0) { - context.fileSystemAdapter.appendToFile( + context.fileSystemAdapter.appendToResultFile( targetPath, ',\n "attributes": \n' + JSON.stringify(context.attributes, null, 2), ); } - context.fileSystemAdapter.appendToFile(targetPath, ',\n "summary": \n' + JSON.stringify(context.summary, null, 2)); + context.fileSystemAdapter.appendToResultFile( + targetPath, + ',\n "summary": \n' + JSON.stringify(context.summary, null, 2), + ); //close target object - context.fileSystemAdapter.appendToFile(targetPath, '\n}'); - + context.fileSystemAdapter.appendToResultFile(targetPath, '\n}'); + context.fileSystemAdapter.flushResultsFromInitialProcessing(targetPath); return context.summary; } diff --git a/src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts b/src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts index 988313d..1a40a64 100644 --- a/src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts +++ b/src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts @@ -9,17 +9,18 @@ export interface CustomFileSystemAdapter { removeFile: (targetPath: string) => void; renameFile: (oldPath: string, newPath: string) => void; - appendToFile: (targetPath: string, chunk: string) => void; - appendToPostProcessingFile: (targetPath: string, chunk: string) => void; + appendToResultFile: (targetPath: string, chunk: string) => void; + flushResultsFromInitialProcessing: (targetPath: string) => void; - initReadingResultFile: (path: string) => void; + initPostProcessingResultFile: (resultFilePath: string) => void; + appendToPostProcessingFile: (targetPath: string, chunk: string) => void; /** * Return an iterable to read chunks from the already written file. * * Local the chunks are lines. Online the chunks are the same chunks that where written. */ chunkIter: () => AsyncIterable; - endPostProcessingFile: () => void; + endPostProcessingFile: (targetPath: string) => void; } export interface CustomFileSystemEntry { diff --git a/src/converters/obsidian/filesystem/LocalFileSystemAdapter.ts b/src/converters/obsidian/filesystem/LocalFileSystemAdapter.ts index a3b0908..05c1ab3 100644 --- a/src/converters/obsidian/filesystem/LocalFileSystemAdapter.ts +++ b/src/converters/obsidian/filesystem/LocalFileSystemAdapter.ts @@ -13,9 +13,15 @@ import { resolve } from 'path'; import { createInterface, Interface } from 'readline'; import { CustomFileSystemAdapter, CustomFileSystemEntry } from './CustomFileSystemAdapter'; +const fourtyMBinBytes = 1000000 * 40; + export class LocalFileSystemAdapter implements CustomFileSystemAdapter { private readStream: ReadStream | undefined; private readlineInterface: Interface | undefined; + private resultChunks: string[] = []; + private resultChunkCharByteSize = 0; + private postProcessingChunks: string[] = []; + private postProcessingChunkCharByteSize = 0; initReadingVault() { return Promise.resolve(); @@ -49,28 +55,58 @@ export class LocalFileSystemAdapter implements CustomFileSystemAdapter { renameSync(oldPath, newPath); } - appendToFile(targetPath: string, content: string) { - appendFileSync(targetPath, content); + appendToResultFile(targetPath: string, chunk: string) { + this.resultChunks.push(chunk); + this.resultChunkCharByteSize += chunk.length * 2; //every char has around 2 bytes + if (this.resultChunkCharByteSize > fourtyMBinBytes) { + this.writeResultChunks(targetPath); + } + } + + flushResultsFromInitialProcessing(targetPath: string) { + if (this.resultChunkCharByteSize !== 0) { + this.writeResultChunks(targetPath); + } } - appendToPostProcessingFile(targetPath: string, content: string) { - return this.appendToFile(targetPath, content); + private writeResultChunks(targetPath: string) { + appendFileSync(targetPath, this.resultChunks.join('\n')); + this.resultChunks = []; + this.resultChunkCharByteSize = 0; } - initReadingResultFile(path: string) { + initPostProcessingResultFile(resultPath: string) { //the converter is build to append to the file, so we dont want to load the whole file into memory at the end, that would be counter to the whole idea - this.readStream = createReadStream(path, 'utf-8'); + this.readStream = createReadStream(resultPath, 'utf-8'); this.readlineInterface = createInterface(this.readStream); } - chunkIter() { - return this.readlineInterface as Interface; + appendToPostProcessingFile(targetPath: string, chunk: string) { + this.postProcessingChunks.push(chunk); + this.postProcessingChunkCharByteSize += chunk.length * 2; //every char has around 2 bytes + if (this.postProcessingChunkCharByteSize > fourtyMBinBytes) { + this.writePostProcessingChunks(targetPath); + } } - endPostProcessingFile() { + endPostProcessingFile(targetPath: string) { + if (this.postProcessingChunkCharByteSize !== 0) { + this.writePostProcessingChunks(targetPath); + } + this.readlineInterface?.close(); this.readStream?.close(); } + + private writePostProcessingChunks(targetPath: string) { + appendFileSync(targetPath, this.postProcessingChunks.join('\n')); + this.postProcessingChunks = []; + this.postProcessingChunkCharByteSize = 0; + } + + chunkIter() { + return this.readlineInterface as Interface; + } } function toEntry(dir: string, dirent: Dirent): CustomFileSystemEntry { diff --git a/src/converters/obsidian/filesystem/WebFileSystemAdapter.ts b/src/converters/obsidian/filesystem/WebFileSystemAdapter.ts index 7cb3691..3c2d60b 100644 --- a/src/converters/obsidian/filesystem/WebFileSystemAdapter.ts +++ b/src/converters/obsidian/filesystem/WebFileSystemAdapter.ts @@ -46,8 +46,11 @@ export class WebFileSystemAdapter implements CustomFileSystemAdapter { //not necessary for browser // eslint-disable-next-line @typescript-eslint/no-empty-function renameFile(_oldPath: string, _newPath: string) {} + //not necessary for browser + // eslint-disable-next-line @typescript-eslint/no-empty-function + flushResultsFromInitialProcessing(_targetPath: string) {} - appendToFile(_targetPath: string, chunk: string) { + appendToResultFile(_targetPath: string, chunk: string) { this.chunks.push(chunk); } @@ -59,7 +62,7 @@ export class WebFileSystemAdapter implements CustomFileSystemAdapter { //not necessary for browser // eslint-disable-next-line @typescript-eslint/no-empty-function - initReadingResultFile(_path: string) {} + initPostProcessingResultFile(_path: string) {} chunkIter() { const chunks = this.chunks; @@ -83,8 +86,8 @@ export class WebFileSystemAdapter implements CustomFileSystemAdapter { return iterator as AsyncIterable; } - endPostProcessingFile() { - (this.zipFS as FS).remove; + endPostProcessingFile(_targetPath: string) { + (this.zipFS as FS).remove((this.zipFS as FS).children[0]); } getResult() { diff --git a/src/converters/obsidian/links/headingLinks.ts b/src/converters/obsidian/links/headingLinks.ts index 66625d0..8682d1a 100644 --- a/src/converters/obsidian/links/headingLinks.ts +++ b/src/converters/obsidian/links/headingLinks.ts @@ -94,7 +94,7 @@ export async function postProcessTIFFIle(filePath: string, context: VaultContext }); const tempPath = filePath + '_TEMP'; - context.fileSystemAdapter.initReadingResultFile(filePath); + context.fileSystemAdapter.initPostProcessingResultFile(filePath); const regExes = validHeadingLinks.map((link) => ({ old: new RegExp(link.old, 'g'), new: link.new, @@ -104,9 +104,9 @@ export async function postProcessTIFFIle(filePath: string, context: VaultContext regExes.forEach((regEx) => { updatedLine = updatedLine.replace(regEx.old, regEx.new); }); - context.fileSystemAdapter.appendToPostProcessingFile(tempPath, updatedLine); + await context.fileSystemAdapter.appendToPostProcessingFile(tempPath, updatedLine); } - context.fileSystemAdapter.endPostProcessingFile(); + context.fileSystemAdapter.endPostProcessingFile(tempPath); context.fileSystemAdapter.removeFile(filePath); context.fileSystemAdapter.renameFile(tempPath, filePath); } diff --git a/src/converters/obsidian/tanaconversion/fileConversion.ts b/src/converters/obsidian/tanaconversion/fileConversion.ts index 022690d..fdb4b10 100644 --- a/src/converters/obsidian/tanaconversion/fileConversion.ts +++ b/src/converters/obsidian/tanaconversion/fileConversion.ts @@ -53,6 +53,10 @@ export function convertObsidianFile( }, ); + //making GC a little easier + // eslint-disable-next-line @typescript-eslint/no-explicit-any + obsidianNodes = null as any; + context.headingTracker.set({ name: displayName, path: filePath }, headingData); return fileNode; diff --git a/src/converters/obsidian/tanaconversion/nodeConversion.ts b/src/converters/obsidian/tanaconversion/nodeConversion.ts index 07f2831..a240d36 100644 --- a/src/converters/obsidian/tanaconversion/nodeConversion.ts +++ b/src/converters/obsidian/tanaconversion/nodeConversion.ts @@ -1,5 +1,5 @@ import { NodeType, TanaIntermediateNode } from '../../../types/types'; -import { getBracketLinks } from '../../../utils/utils'; +import { getBracketLinks, idgenerator } from '../../../utils/utils'; import { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes'; import { VaultContext } from '../VaultContext'; import { superTagUidRequests } from '../tanafeatures/supertags'; @@ -22,6 +22,7 @@ function convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: Va return tanaNode; } +//30 sec export function convertMarkdownNode( fileName: string, filePath: string, @@ -33,6 +34,7 @@ export function convertMarkdownNode( return convertCodeBlock(obsidianNode, today, context); } + //1 sec const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context); const tanaNode: TanaIntermediateNode = { uid, diff --git a/src/converters/obsidian/tanaconversion/vaultConversion.ts b/src/converters/obsidian/tanaconversion/vaultConversion.ts index ebe6053..54166dc 100644 --- a/src/converters/obsidian/tanaconversion/vaultConversion.ts +++ b/src/converters/obsidian/tanaconversion/vaultConversion.ts @@ -52,7 +52,7 @@ export function addParentNodeStart(targetPath: string, today: number, context: V return (dir: string) => { const name = basename(dir); const uid = untrackedUidRequest(context); - context.fileSystemAdapter.appendToFile( + context.fileSystemAdapter.appendToResultFile( targetPath, `{ "uid": "${uid}", @@ -68,13 +68,13 @@ export function addParentNodeStart(targetPath: string, today: number, context: V export function addParentNodeEnd(context: VaultContext, targetPath: string) { return (childrenPosition: ChildrenPosition) => { - context.fileSystemAdapter.appendToFile( + context.fileSystemAdapter.appendToResultFile( targetPath, `] }`, ); if (childrenPosition !== ChildrenPosition.LAST) { - context.fileSystemAdapter.appendToFile(targetPath, ','); + context.fileSystemAdapter.appendToResultFile(targetPath, ','); } }; } @@ -91,9 +91,9 @@ export function addFileNode(targetPath: string, today: number, context: VaultCon context, today, ); - context.fileSystemAdapter.appendToFile(targetPath, JSON.stringify(fileNode, null, 2)); + context.fileSystemAdapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2)); if (childrenPosition !== ChildrenPosition.LAST) { - context.fileSystemAdapter.appendToFile(targetPath, ','); + context.fileSystemAdapter.appendToResultFile(targetPath, ','); } }; } From 92b86cae80cda86f59897aef49eb6916f460caef Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sun, 16 Oct 2022 15:10:06 +0200 Subject: [PATCH 68/94] Obsidian: added zip converter to runner --- .../LocalObsidianZipVaultConverter.ts | 31 +++++++++++++++++++ .../LocalObsidianZipVaultConverter.test.ts | 18 +++++++++++ src/runner.ts | 21 ++++++++++++- src/script.ts | 2 +- 4 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 src/converters/obsidian/LocalObsidianZipVaultConverter.ts create mode 100644 src/converters/obsidian/tests/LocalObsidianZipVaultConverter.test.ts diff --git a/src/converters/obsidian/LocalObsidianZipVaultConverter.ts b/src/converters/obsidian/LocalObsidianZipVaultConverter.ts new file mode 100644 index 0000000..9405188 --- /dev/null +++ b/src/converters/obsidian/LocalObsidianZipVaultConverter.ts @@ -0,0 +1,31 @@ +import { readFileSync, unlinkSync, writeFileSync } from 'fs'; +import { TanaIntermediateSummary } from '../../types/types'; +import { basename } from './filesystem/CustomFileSystemAdapter'; +import { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter'; +import { ObsidianVaultConverter } from './ObsidianVaultConverter'; +import { IdGenerator } from './utils/IdGenerator'; +import { createVaultContext, VaultContext } from './VaultContext'; + +export async function LocalObsidianZipVaultConverter( + zipPath: string, + today: number = Date.now(), + idGenerator?: IdGenerator, +): Promise<[TanaIntermediateSummary, VaultContext]> { + const zipBlob = readFileSync(zipPath); + const adapter = new WebFileSystemAdapter(new Blob([zipBlob])); + //removing ".zip" + const vaultName = basename(zipPath).slice(0, -4); + const context = createVaultContext(vaultName, adapter, idGenerator); + return ObsidianVaultConverter(context, today).then((summary) => { + const result = adapter.getResult(); + const targetPath = `${zipPath.slice(0, -4)}.tif.json`; + + try { + unlinkSync(targetPath); + // eslint-disable-next-line no-empty + } catch (e) {} + writeFileSync(targetPath, result); + + return [summary, context]; + }); +} diff --git a/src/converters/obsidian/tests/LocalObsidianZipVaultConverter.test.ts b/src/converters/obsidian/tests/LocalObsidianZipVaultConverter.test.ts new file mode 100644 index 0000000..c66e042 --- /dev/null +++ b/src/converters/obsidian/tests/LocalObsidianZipVaultConverter.test.ts @@ -0,0 +1,18 @@ +import { expect, test } from 'vitest'; +import { readFileSync, unlinkSync } from 'fs'; +import { LocalObsidianZipVaultConverter } from '../LocalObsidianZipVaultConverter'; +import { deterministicGenerator } from './testUtils'; + +test('local obsidian zip vault converter', async () => { + const [, context] = await LocalObsidianZipVaultConverter( + './src/converters/obsidian/tests/fixtures/vault.zip', + 1, + deterministicGenerator(), + ); + const result = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/vault.tif.json', 'utf-8')); + // console.log(JSON.stringify(result)); + unlinkSync('./src/converters/obsidian/tests/fixtures/vault.tif.json'); + const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/full.tif.json', 'utf-8')); + expect(result).toStrictEqual(expected); + expect(context.dailyNoteFormat).toBe('DD-MM-YYYY'); +}); diff --git a/src/runner.ts b/src/runner.ts index c24ddd3..f074d39 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -6,6 +6,7 @@ import { TanaIntermediateFile } from './types/types'; import { WorkflowyConverter } from './converters/workflowy'; import { lstatSync } from 'fs'; import { ObsidianVaultConverter, LocalFileSystemAdapter, createVaultContext } from './converters/obsidian'; +import { LocalObsidianZipVaultConverter } from './converters/obsidian/LocalObsidianZipVaultConverter'; const fileType = process.argv[2]; const file = process.argv[3]; @@ -61,6 +62,20 @@ function handleSingleFileConversion() { saveFile(file, tanaIntermediteFile); } +async function handleZipConversion() { + console.log(`\n\nReading zip: ${file} for import as: ${fileType}`); + let summary; + switch (fileType) { + case 'obsidian': + summary = await LocalObsidianZipVaultConverter(file); + break; + default: + console.log(`File type ${fileType} is not supported for zips`); + exit(0); + } + console.dir(summary); +} + async function handleFolderConversion() { console.log(`\n\nReading folder: ${file} for import as: ${fileType}`); let summary; @@ -78,5 +93,9 @@ async function handleFolderConversion() { if (lstatSync(file).isDirectory()) { handleFolderConversion(); } else { - handleSingleFileConversion(); + if (file.endsWith('.zip')) { + handleZipConversion(); + } else { + handleSingleFileConversion(); + } } diff --git a/src/script.ts b/src/script.ts index 0216102..40d270a 100644 --- a/src/script.ts +++ b/src/script.ts @@ -1,4 +1,4 @@ -import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter'; +import { WebObsidianVaultConverter } from './converters/obsidian/LocalObsidianZipVaultConverter'; const zipInput = document.getElementById('vault-zip') as HTMLInputElement; zipInput.addEventListener('change', async (event) => { From a0d7cb234e8be622a496e66685377289894d3483 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sun, 16 Oct 2022 15:18:06 +0200 Subject: [PATCH 69/94] Obsidian: added zip converter to runner (2) --- src/converters/obsidian/index.ts | 3 ++- src/runner.ts | 10 +++++++--- src/script.ts | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/converters/obsidian/index.ts b/src/converters/obsidian/index.ts index be9afee..a1b83de 100644 --- a/src/converters/obsidian/index.ts +++ b/src/converters/obsidian/index.ts @@ -1,5 +1,6 @@ import { LocalFileSystemAdapter } from './filesystem/LocalFileSystemAdapter'; +import { LocalObsidianZipVaultConverter } from './LocalObsidianZipVaultConverter'; import { ObsidianVaultConverter } from './ObsidianVaultConverter'; import { createVaultContext } from './VaultContext'; -export { ObsidianVaultConverter, LocalFileSystemAdapter, createVaultContext }; +export { ObsidianVaultConverter, LocalFileSystemAdapter, createVaultContext, LocalObsidianZipVaultConverter }; diff --git a/src/runner.ts b/src/runner.ts index f074d39..5572f15 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -5,8 +5,12 @@ import { RoamConverter } from './converters/roam/index'; import { TanaIntermediateFile } from './types/types'; import { WorkflowyConverter } from './converters/workflowy'; import { lstatSync } from 'fs'; -import { ObsidianVaultConverter, LocalFileSystemAdapter, createVaultContext } from './converters/obsidian'; -import { LocalObsidianZipVaultConverter } from './converters/obsidian/LocalObsidianZipVaultConverter'; +import { + ObsidianVaultConverter, + LocalFileSystemAdapter, + createVaultContext, + LocalObsidianZipVaultConverter, +} from './converters/obsidian'; const fileType = process.argv[2]; const file = process.argv[3]; @@ -67,7 +71,7 @@ async function handleZipConversion() { let summary; switch (fileType) { case 'obsidian': - summary = await LocalObsidianZipVaultConverter(file); + summary = (await LocalObsidianZipVaultConverter(file))[0]; break; default: console.log(`File type ${fileType} is not supported for zips`); diff --git a/src/script.ts b/src/script.ts index 40d270a..0216102 100644 --- a/src/script.ts +++ b/src/script.ts @@ -1,4 +1,4 @@ -import { WebObsidianVaultConverter } from './converters/obsidian/LocalObsidianZipVaultConverter'; +import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter'; const zipInput = document.getElementById('vault-zip') as HTMLInputElement; zipInput.addEventListener('change', async (event) => { From e429481771d69789c79ca420618ef462d8d344d2 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sun, 16 Oct 2022 15:21:08 +0200 Subject: [PATCH 70/94] Obsidian: fix timestamps in webpage --- src/script.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script.ts b/src/script.ts index 0216102..bdfbfea 100644 --- a/src/script.ts +++ b/src/script.ts @@ -11,7 +11,7 @@ zipInput.addEventListener('change', async (event) => { progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
'; document.body.appendChild(progress); - const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, 1); + const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now()); document.body.removeChild(progress); const success = document.createElement('b'); From 6cb455e8bb73d057197d75f4b0b6b18381847a2e Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sun, 16 Oct 2022 22:54:03 +0200 Subject: [PATCH 71/94] Obsidian: add more output to web page errors --- src/converters/obsidian/markdown/tags.ts | 1 + src/converters/obsidian/tanaconversion/nodeConversion.ts | 2 +- src/script.ts | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/converters/obsidian/markdown/tags.ts b/src/converters/obsidian/markdown/tags.ts index 3b9fc3a..bb252fa 100644 --- a/src/converters/obsidian/markdown/tags.ts +++ b/src/converters/obsidian/markdown/tags.ts @@ -2,6 +2,7 @@ // eslint-disable-next-line no-useless-escape const tagRegex = /(?:\s|^)(#([^\[\]]+?))(?:(?=\s)|$)/g; +//TODO: tags are too naive! () export function detectTags(content: string) { return content.match(tagRegex); } diff --git a/src/converters/obsidian/tanaconversion/nodeConversion.ts b/src/converters/obsidian/tanaconversion/nodeConversion.ts index a240d36..779f16c 100644 --- a/src/converters/obsidian/tanaconversion/nodeConversion.ts +++ b/src/converters/obsidian/tanaconversion/nodeConversion.ts @@ -1,5 +1,5 @@ import { NodeType, TanaIntermediateNode } from '../../../types/types'; -import { getBracketLinks, idgenerator } from '../../../utils/utils'; +import { getBracketLinks } from '../../../utils/utils'; import { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes'; import { VaultContext } from '../VaultContext'; import { superTagUidRequests } from '../tanafeatures/supertags'; diff --git a/src/script.ts b/src/script.ts index bdfbfea..3d2b52b 100644 --- a/src/script.ts +++ b/src/script.ts @@ -42,6 +42,8 @@ zipInput.addEventListener('change', async (event) => { }); document.body.appendChild(downloadButton); } catch (error) { + console.trace(error); + if (progress) { document.body.removeChild(progress); } From 64325aec052f039095f9cc455b4096c53783fe75 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 17 Oct 2022 02:06:04 +0200 Subject: [PATCH 72/94] Obsidian: fix top level file path uid errors and double zip-converter perf --- .../{index.b58a0b68.js => index.cc37ed43.js} | 48 +-- docs/index.html | 2 +- .../obsidian/ObsidianVaultConverter.ts | 48 +-- src/converters/obsidian/VaultContext.ts | 9 +- .../filesystem/CustomFileSystemAdapter.ts | 16 + src/converters/obsidian/links/FileDescMap.ts | 86 ++--- src/converters/obsidian/links/blockLinks.ts | 6 +- src/converters/obsidian/links/headingLinks.ts | 16 +- .../obsidian/links/internalLinks.ts | 5 +- src/converters/obsidian/links/invalidLinks.ts | 2 +- .../obsidian/tanaconversion/fileConversion.ts | 13 +- .../tanaconversion/vaultConversion.ts | 42 ++- .../tests/ObsidianVaultConverter.test.ts | 2 +- .../obsidian/tests/VaultContext.test.ts | 62 +++- .../obsidian/tests/fixtures/full.tif.json | 294 +++++++++--------- .../obsidian/tests/fixtures/vault.zip | Bin 2900 -> 2900 bytes .../obsidian/tests/headingLinks.test.ts | 6 +- .../obsidian/tests/vaultConversion.test.ts | 45 +++ 18 files changed, 417 insertions(+), 285 deletions(-) rename docs/assets/{index.b58a0b68.js => index.cc37ed43.js} (64%) create mode 100644 src/converters/obsidian/tests/vaultConversion.test.ts diff --git a/docs/assets/index.b58a0b68.js b/docs/assets/index.cc37ed43.js similarity index 64% rename from docs/assets/index.b58a0b68.js rename to docs/assets/index.cc37ed43.js index 9849254..1478ddb 100644 --- a/docs/assets/index.b58a0b68.js +++ b/docs/assets/index.cc37ed43.js @@ -1,48 +1,48 @@ -var hc=Object.defineProperty;var mc=(e,t,n)=>t in e?hc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Zn=(e,t,n)=>(mc(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const In=15,mi=30,pi=19,pc=29,ur=256,Hi=ur+1+pc,Ms=2*Hi+1,yn=256,_c=7,Is=16,Fs=17,Ls=18,$r=8*2,hr=-1,wc=1,qn=2,gc=0,nn=0,Cs=1,xc=3,Le=4,Qe=0,Wa=1,zn=2,et=-2,yc=-3,Jt=-5;function Tr(e){return Ar(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function Ar(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?Ar(n):n),[])}const Ns=[0,1,2,3].concat(...Tr([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function se(){const e=this;function t(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,f=e.stat_desc.max_length;let d,u,p,w,D,h,c=0;for(w=0;w<=In;w++)i.bl_count[w]=0;for(s[i.heap[i.heap_max]*2+1]=0,d=i.heap_max+1;df&&(w=f,c++),s[u*2+1]=w,!(u>e.max_code)&&(i.bl_count[w]++,D=0,u>=l&&(D=o[u-l]),h=s[u*2],i.opt_len+=h*(w+D),a&&(i.static_len+=h*(a[u*2+1]+D)));if(c!==0){do{for(w=f-1;i.bl_count[w]===0;)w--;i.bl_count[w]--,i.bl_count[w+1]+=2,i.bl_count[f]--,c-=2}while(c>0);for(w=f;w!==0;w--)for(u=i.bl_count[w];u!==0;)p=i.heap[--d],!(p>e.max_code)&&(s[p*2+1]!=w&&(i.opt_len+=(w-s[p*2+1])*s[p*2],s[p*2+1]=w),u--)}}function n(i,s){let a=0;do a|=i&1,i>>>=1,a<<=1;while(--s>0);return a>>>1}function r(i,s,a){const o=[];let l=0,f,d,u;for(f=1;f<=In;f++)o[f]=l=l+a[f-1]<<1;for(d=0;d<=s;d++)u=i[d*2+1],u!==0&&(i[d*2]=n(o[u]++,u))}e.build_tree=function(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.elems;let l,f,d=-1,u;for(i.heap_len=0,i.heap_max=Ms,l=0;l=1;l--)i.pqdownheap(s,l);u=o;do l=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(s,1),f=i.heap[1],i.heap[--i.heap_max]=l,i.heap[--i.heap_max]=f,s[u*2]=s[l*2]+s[f*2],i.depth[u]=Math.max(i.depth[l],i.depth[f])+1,s[l*2+1]=s[f*2+1]=u,i.heap[1]=u++,i.pqdownheap(s,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],t(i),r(s,e.max_code,i.bl_count)}}se._length_code=[0,1,2,3,4,5,6,7].concat(...Tr([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));se.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];se.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];se.d_code=function(e){return e<256?Ns[e]:Ns[256+(e>>>7)]};se.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];se.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];se.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];se.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function De(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}const vc=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],bc=Tr([[144,8],[112,9],[24,7],[8,8]]);De.static_ltree=Ar(vc.map((e,t)=>[e,bc[t]]));const kc=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],Sc=Tr([[30,5]]);De.static_dtree=Ar(kc.map((e,t)=>[e,Sc[t]]));De.static_l_desc=new De(De.static_ltree,se.extra_lbits,ur+1,Hi,In);De.static_d_desc=new De(De.static_dtree,se.extra_dbits,0,mi,In);De.static_bl_desc=new De(null,se.extra_blbits,0,pi,_c);const Ec=9,Dc=8;function at(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const Ha=0,sr=1,Gt=2,Je=[new at(0,0,0,0,Ha),new at(4,4,8,4,sr),new at(4,5,16,8,sr),new at(4,6,32,32,sr),new at(4,4,16,16,Gt),new at(8,16,32,32,Gt),new at(8,16,128,128,Gt),new at(8,32,128,256,Gt),new at(32,128,258,1024,Gt),new at(32,258,258,4096,Gt)],$n=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ge=0,Kn=1,vn=2,Xn=3,Tc=32,Kr=42,Jn=113,bn=666,Xr=8,Ac=0,Jr=1,Oc=2,ce=3,ar=258,Ye=ar+ce+1;function Us(e,t,n,r){const i=e[t*2],s=e[n*2];return i=3&&j[se.bl_order[T]*2+1]===0;T--);return e.opt_len+=3*(T+1)+5+5+4,T}function Ve(T){e.pending_buf[e.pending++]=T}function Tt(T){Ve(T&255),Ve(T>>>8&255)}function gn(T){Ve(T>>8&255),Ve(T&255&255)}function Ee(T,R){let O;const I=R;ge>$r-I?(O=T,ue|=O<>>$r-ge,ge+=I-$r):(ue|=T<=8&&(Ve(ue&255),ue>>>=8,ge-=8)}function ac(){Ee(Jr<<1,3),Pe(yn,De.static_ltree),Ss(),1+Se+10-ge<9&&(Ee(Jr<<1,3),Pe(yn,De.static_ltree),Ss()),Se=7}function xn(T,R){let O,I,U;if(e.dist_buf[V]=T,e.lc_buf[V]=R&255,V++,T===0?N[R*2]++:(Z++,T--,N[(se._length_code[R]+ur+1)*2]++,Y[se.d_code(T)*2]++),(V&8191)===0&&A>2){for(O=V*8,I=g-m,U=0;U>>=3,Z8?Tt(ue):ge>0&&Ve(ue&255),ue=0,ge=0}function oc(T,R,O){Ds(),Se=8,O&&(Tt(R),Tt(~R)),e.pending_buf.set(l.subarray(T,T+R),e.pending),e.pending+=R}function Ts(T,R,O){Ee((Ac<<1)+(O?1:0),3),oc(T,R,!0)}function lc(T,R,O){let I,U,G=0;A>0?(q.build_tree(e),we.build_tree(e),G=wn(),I=e.opt_len+3+7>>>3,U=e.static_len+3+7>>>3,U<=I&&(I=U)):I=U=R+5,R+4<=I&&T!=-1?Ts(T,R,O):U==I?(Ee((Jr<<1)+(O?1:0),3),Es(De.static_ltree,De.static_dtree)):(Ee((Oc<<1)+(O?1:0),3),sc(q.max_code+1,we.max_code+1,G+1),Es(N,Y)),Dt(),O&&Ds()}function At(T){lc(m>=0?m:-1,g-m,T),m=g,t.flush_pending()}function qr(){let T,R,O,I;do{if(I=f-x-g,I===0&&g===0&&x===0)I=s;else if(I==-1)I--;else if(g>=s+s-Ye){l.set(l.subarray(s,s+s),0),y-=s,g-=s,m-=s,T=w,O=T;do R=u[--O]&65535,u[O]=R>=s?R-s:0;while(--T!==0);T=s,O=T;do R=d[--O]&65535,d[O]=R>=s?R-s:0;while(--T!==0);I+=s}if(t.avail_in===0)return;T=t.read_buf(l,g+x,I),x+=T,x>=ce&&(p=l[g]&255,p=(p<r-5&&(R=r-5);;){if(x<=1){if(qr(),x===0&&T==nn)return Ge;if(x===0)break}if(g+=x,x=0,O=m+R,(g===0||g>=O)&&(x=g-O,g=O,At(!1),t.avail_out===0)||g-m>=s-Ye&&(At(!1),t.avail_out===0))return Ge}return At(T==Le),t.avail_out===0?T==Le?vn:Ge:T==Le?Xn:Kn}function As(T){let R=k,O=g,I,U,G=E;const K=g>s-Ye?g-(s-Ye):0;let Me=B;const Xe=o,zr=g+ar;let Os=l[O+G-1],Rs=l[O+G];E>=F&&(R>>=2),Me>x&&(Me=x);do if(I=T,!(l[I+G]!=Rs||l[I+G-1]!=Os||l[I]!=l[O]||l[++I]!=l[O+1])){O+=2,I++;do;while(l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&OG){if(y=T,G=U,U>=Me)break;Os=l[O+G-1],Rs=l[O+G]}}while((T=d[T&Xe]&65535)>K&&--R!==0);return G<=x?G:x}function dc(T){let R=0,O;for(;;){if(x=ce&&(p=(p<=ce)if(O=xn(g-y,_-ce),x-=_,_<=S&&x>=ce){_--;do g++,p=(p<=ce&&(p=(p<4096)&&(_=ce-1)),E>=ce&&_<=E){I=g+x-ce,O=xn(g-1-v,E-ce),x-=E-1,E-=2;do++g<=I&&(p=(p<Ec||I!=Xr||O<9||O>15||R<0||R>9||G<0||G>qn?et:(T.dstate=e,a=O,s=1<9||O<0||O>qn?et:(Je[A].func!=Je[R].func&&T.total_in!==0&&(I=T.deflate(Cs)),A!=R&&(A=R,S=Je[A].max_lazy,F=Je[A].good_length,B=Je[A].nice_length,k=Je[A].max_chain),P=O,I)},e.deflateSetDictionary=function(T,R,O){let I=O,U,G=0;if(!R||n!=Kr)return et;if(Is-Ye&&(I=s-Ye,G=O-I),l.set(R.subarray(G,G+I),0),g=I,m=I,p=l[0]&255,p=(p<Le||R<0)return et;if(!T.next_out||!T.next_in&&T.avail_in!==0||n==bn&&R!=Le)return T.msg=$n[zn-et],et;if(T.avail_out===0)return T.msg=$n[zn-Jt],Jt;if(t=T,G=i,i=R,n==Kr&&(I=Xr+(a-8<<4)<<8,U=(A-1&255)>>1,U>3&&(U=3),I|=U<<6,g!==0&&(I|=Tc),I+=31-I%31,n=Jn,gn(I)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,Qe}else if(t.avail_in===0&&R<=G&&R!=Le)return t.msg=$n[zn-Jt],Jt;if(n==bn&&t.avail_in!==0)return T.msg=$n[zn-Jt],Jt;if(t.avail_in!==0||x!==0||R!=nn&&n!=bn){switch(K=-1,Je[A].func){case Ha:K=cc(R);break;case sr:K=dc(R);break;case Gt:K=fc(R);break}if((K==vn||K==Xn)&&(n=bn),K==Ge||K==vn)return t.avail_out===0&&(i=-1),Qe;if(K==Kn){if(R==Cs)ac();else if(Ts(0,0,!1),R==xc)for(O=0;On&&(i=n),i===0?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Mc(e){const t=this,n=new ja,r=Ic(e&&e.chunkSize?e.chunkSize:64*1024),i=nn,s=new Uint8Array(r);let a=e?e.level:hr;typeof a>"u"&&(a=hr),n.deflateInit(a),n.next_out=s,t.append=function(o,l){let f,d,u=0,p=0,w=0;const D=[];if(!!o.length){n.next_in_index=0,n.next_in=o,n.avail_in=o.length;do{if(n.next_out_index=0,n.avail_out=r,f=n.deflate(i),f!=Qe)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?D.push(new Uint8Array(s)):D.push(s.slice(0,n.next_out_index))),w+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=u&&(l(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return D.length>1?(d=new Uint8Array(w),D.forEach(function(h){d.set(h,p),p+=h.length})):d=D[0]||new Uint8Array,d}},t.flush=function(){let o,l,f=0,d=0;const u=[];do{if(n.next_out_index=0,n.avail_out=r,o=n.deflate(Le),o!=Wa&&o!=Qe)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&u.push(s.slice(0,n.next_out_index)),d+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),l=new Uint8Array(d),u.forEach(function(p){l.set(p,f),f+=p.length}),l}}function Ic(e){return e+5*(Math.floor(e/16383)+1)}const Fc=15,J=0,xt=1,Lc=2,Ne=-2,ae=-3,Ps=-4,yt=-5,We=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ba=1440,Cc=0,Nc=4,Uc=9,Pc=5,Yc=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Wc=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Hc=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],jc=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Bc=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Vc=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ot=15;function _i(){const e=this;let t,n,r,i,s,a;function o(f,d,u,p,w,D,h,c,m,_,v){let b,g,y,x,E,k,S,A,P,F,B,N,Y,j,q;F=0,E=u;do r[f[d+F]]++,F++,E--;while(E!==0);if(r[0]==u)return h[0]=-1,c[0]=0,J;for(A=c[0],k=1;k<=Ot&&r[k]===0;k++);for(S=k,AE&&(A=E),c[0]=A,j=1<N+A;){if(x++,N+=A,q=y-N,q=q>A?A:q,(g=1<<(k=S-N))>b+1&&(g-=b+1,Y=S,kBa)return ae;s[x]=B=_[0],_[0]+=q,x!==0?(a[x]=E,i[0]=k,i[1]=A,k=E>>>N-A,i[2]=B-s[x-1]-k,m.set(i,(s[x-1]+k)*3)):h[0]=B}for(i[1]=S-N,F>=u?i[0]=128+64:v[F]>>N;k>>=1)E^=k;for(E^=k,P=(1<257?(_==ae?m.msg="oversubscribed distance tree":_==yt?(m.msg="incomplete distance tree",_=ae):_!=Ps&&(m.msg="empty distance tree with lengths",_=ae),_):J)}}_i.inflate_trees_fixed=function(e,t,n,r){return e[0]=Uc,t[0]=Pc,n[0]=Yc,r[0]=Wc,J};const Qn=0,Ys=1,Ws=2,Hs=3,js=4,Bs=5,Vs=6,Qr=7,Gs=8,er=9;function Gc(){const e=this;let t,n=0,r,i=0,s=0,a=0,o=0,l=0,f=0,d=0,u,p=0,w,D=0;function h(c,m,_,v,b,g,y,x){let E,k,S,A,P,F,B,N,Y,j,q,we,W,he,V,Z;B=x.next_in_index,N=x.avail_in,P=y.bitb,F=y.bitk,Y=y.write,j=Y>=k[Z+1],F-=k[Z+1],y.win[Y++]=k[Z+2],j--;continue}do{if(P>>=k[Z+1],F-=k[Z+1],(A&16)!==0){for(A&=15,W=k[Z+2]+(P&We[A]),P>>=A,F-=A;F<15;)N--,P|=(x.read_byte(B++)&255)<>=k[Z+1],F-=k[Z+1],(A&16)!==0){for(A&=15;F>=A,F-=A,j-=W,Y>=he)V=Y-he,Y-V>0&&2>Y-V?(y.win[Y++]=y.win[V++],y.win[Y++]=y.win[V++],W-=2):(y.win.set(y.win.subarray(V,V+2),Y),Y+=2,V+=2,W-=2);else{V=Y-he;do V+=y.end;while(V<0);if(A=y.end-V,W>A){if(W-=A,Y-V>0&&A>Y-V)do y.win[Y++]=y.win[V++];while(--A!==0);else y.win.set(y.win.subarray(V,V+A),Y),Y+=A,V+=A,A=0;V=0}}if(Y-V>0&&W>Y-V)do y.win[Y++]=y.win[V++];while(--W!==0);else y.win.set(y.win.subarray(V,V+W),Y),Y+=W,V+=W,W=0;break}else if((A&64)===0)E+=k[Z+2],E+=P&We[A],Z=(S+E)*3,A=k[Z];else return x.msg="invalid distance code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=P,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae;while(!0);break}if((A&64)===0){if(E+=k[Z+2],E+=P&We[A],Z=(S+E)*3,(A=k[Z])===0){P>>=k[Z+1],F-=k[Z+1],y.win[Y++]=k[Z+2],j--;break}}else return(A&32)!==0?(W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=P,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,xt):(x.msg="invalid literal/length code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=P,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae)}while(!0)}while(j>=258&&N>=10);return W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=P,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,J}e.init=function(c,m,_,v,b,g){t=Qn,f=c,d=m,u=_,p=v,w=b,D=g,r=null},e.proc=function(c,m,_){let v,b,g,y=0,x=0,E=0,k,S,A,P;for(E=m.next_in_index,k=m.avail_in,y=c.bitb,x=c.bitk,S=c.write,A=S=258&&k>=10&&(c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,_=h(f,d,u,p,w,D,c,m),E=m.next_in_index,k=m.avail_in,y=c.bitb,x=c.bitk,S=c.write,A=S>>=r[b+1],x-=r[b+1],g=r[b],g===0){a=r[b+2],t=Vs;break}if((g&16)!==0){o=g&15,n=r[b+2],t=Ws;break}if((g&64)===0){s=g,i=b/3+r[b+2];break}if((g&32)!==0){t=Qr;break}return t=er,m.msg="invalid literal/length code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,c.inflate_flush(m,_);case Ws:for(v=o;x>=v,x-=v,s=d,r=w,i=D,t=Hs;case Hs:for(v=s;x>=r[b+1],x-=r[b+1],g=r[b],(g&16)!==0){o=g&15,l=r[b+2],t=js;break}if((g&64)===0){s=g,i=b/3+r[b+2];break}return t=er,m.msg="invalid distance code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,c.inflate_flush(m,_);case js:for(v=o;x>=v,x-=v,t=Bs;case Bs:for(P=S-l;P<0;)P+=c.end;for(;n!==0;){if(A===0&&(S==c.end&&c.read!==0&&(S=0,A=S7&&(x-=8,k++,E--),c.write=S,_=c.inflate_flush(m,_),S=c.write,A=Sh.avail_out&&(m=h.avail_out),m!==0&&c==yt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(v,v+m),_),_+=m,v+=m,v==n.end&&(v=0,n.write==n.end&&(n.write=0),m=n.write-v,m>h.avail_out&&(m=h.avail_out),m!==0&&c==yt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(v,v+m),_),_+=m,v+=m),h.next_out_index=_,n.read=v,c},n.proc=function(h,c){let m,_,v,b,g,y,x,E;for(b=h.next_in_index,g=h.avail_in,_=n.bitb,v=n.bitk,y=n.write,x=y>>1){case 0:_>>>=3,v-=3,m=v&7,_>>>=m,v-=m,r=ei;break;case 1:k=[],S=[],A=[[]],P=[[]],_i.inflate_trees_fixed(k,S,A,P),d.init(k[0],S[0],A[0],0,P[0],0),_>>>=3,v-=3,r=tr;break;case 2:_>>>=3,v-=3,r=zs;break;case 3:return _>>>=3,v-=3,r=jt,h.msg="invalid block type",c=ae,n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c)}break;case ei:for(;v<32;){if(g!==0)c=J;else return n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(b++)&255)<>>16&65535)!=(_&65535))return r=jt,h.msg="invalid stored block lengths",c=ae,n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c);i=_&65535,_=v=0,r=i!==0?qs:u!==0?nr:Qt;break;case qs:if(g===0||x===0&&(y==n.end&&n.read!==0&&(y=0,x=yg&&(m=g),m>x&&(m=x),n.win.set(h.read_buf(b,m),y),b+=m,g-=m,y+=m,x-=m,(i-=m)!==0)break;r=u!==0?nr:Qt;break;case zs:for(;v<14;){if(g!==0)c=J;else return n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(b++)&255)<29||(m>>5&31)>29)return r=jt,h.msg="too many length or distance symbols",c=ae,n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c);if(m=258+(m&31)+(m>>5&31),!o||o.length>>=14,v-=14,a=0,r=$s;case $s:for(;a<4+(s>>>10);){for(;v<3;){if(g!==0)c=J;else return n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(b++)&255)<>>=3,v-=3}for(;a<19;)o[Zs[a++]]=0;if(l[0]=7,m=D.inflate_trees_bits(o,l,f,p,h),m!=J)return c=m,c==ae&&(o=null,r=jt),n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c);a=0,r=Ks;case Ks:for(;m=s,!(a>=258+(m&31)+(m>>5&31));){let j,q;for(m=l[0];v>>=m,v-=m,o[a++]=q;else{for(E=q==18?7:q-14,j=q==18?11:3;v>>=m,v-=m,j+=_&We[E],_>>>=E,v-=E,E=a,m=s,E+j>258+(m&31)+(m>>5&31)||q==16&&E<1)return o=null,r=jt,h.msg="invalid bit length repeat",c=ae,n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c);q=q==16?o[E-1]:0;do o[E++]=q;while(--j!==0);a=E}}if(f[0]=-1,F=[],B=[],N=[],Y=[],F[0]=9,B[0]=6,m=s,m=D.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),o,F,B,N,Y,p,h),m!=J)return m==ae&&(o=null,r=jt),c=m,n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,n.inflate_flush(h,c);d.init(F[0],B[0],p,N[0],p,Y[0]),r=tr;case tr:if(n.bitb=_,n.bitk=v,h.avail_in=g,h.total_in+=b-h.next_in_index,h.next_in_index=b,n.write=y,(c=d.proc(n,h,c))!=xt)return n.inflate_flush(h,c);if(c=J,d.free(h),b=h.next_in_index,g=h.avail_in,_=n.bitb,v=n.bitk,y=n.write,x=y15?(e.inflateEnd(n),Ne):(e.wbits=r,n.istate.blocks=new Zc(n,1<>4)+8>a.wbits){a.mode=Rt,n.msg="invalid win size",a.marker=5;break}a.mode=Js;case Js:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,s=n.read_byte(n.next_in_index++)&255,((a.method<<8)+s)%31!==0){a.mode=Rt,n.msg="incorrect header check",a.marker=5;break}if((s&qc)===0){a.mode=kn;break}a.mode=Qs;case Qs:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,a.mode=ea;case ea:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,a.mode=ta;case ta:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,a.mode=na;case na:return n.avail_in===0?i:(i=r,n.avail_in--,n.total_in++,a.need+=n.read_byte(n.next_in_index++)&255,a.mode=ti,Lc);case ti:return a.mode=Rt,n.msg="need dictionary",a.marker=0,Ne;case kn:if(i=a.blocks.proc(n,i),i==ae){a.mode=Rt,a.marker=0;break}if(i==J&&(i=r),i!=xt)return i;i=r,a.blocks.reset(n,a.was),a.mode=ra;case ra:return n.avail_in=0,xt;case Rt:return ae;default:return Ne}},e.inflateSetDictionary=function(n,r,i){let s=0,a=i;if(!n||!n.istate||n.istate.mode!=ti)return Ne;const o=n.istate;return a>=1<0&&n.next_in_index!=p&&(l(n.next_in_index),p=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return f.length>1?(u=new Uint8Array(D),f.forEach(function(h){u.set(h,w),w+=h.length})):u=f[0]||new Uint8Array,u}},t.flush=function(){n.inflateEnd()}}const pe=4294967295,ke=65535,wi=8,Ga=0,Za=99,qa=67324752,ji=134695760,Qc=ji,gi=33639248,za=101010256,xi=101075792,$a=117853008,sn=22,An=20,On=56,ed=sn+An+On,Ka=1,Xa=39169,Ja=10,Qa=1,Bi=21589,td=28789,nd=25461,yi=1,rd=6,vi=8,bi=2048,ki=16,id=20,ia=45,sa=51,or="/",aa=new Date(2107,11,31),oa=new Date(1980,0,1),fe=void 0,mr="undefined",eo="function";class la{constructor(t){return class extends TransformStream{constructor(n,r){const i=new t(r);super({transform(s,a){a.enqueue(i.append(s))},flush(s){const a=i.flush();a&&s.enqueue(a)}})}}}}const sd=64;let to=2;try{typeof navigator!=mr&&navigator.hardwareConcurrency&&(to=navigator.hardwareConcurrency)}catch{}const ad={chunkSize:512*1024,maxWorkers:to,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:fe,CompressionStreamNative:typeof CompressionStream!=mr&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=mr&&DecompressionStream},Ft=Object.assign({},ad);function Vi(){return Ft}function no(e){return Math.max(e.chunkSize,sd)}function Gi(e){const{baseURL:t,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:i,useCompressionStream:s,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:f,DecompressionStream:d,workerScripts:u}=e;if(Mt("baseURL",t),Mt("chunkSize",n),Mt("maxWorkers",r),Mt("terminateWorkerTimeout",i),Mt("useCompressionStream",s),Mt("useWebWorkers",a),o&&(Ft.CompressionStream=new la(o)),l&&(Ft.DecompressionStream=new la(l)),Mt("CompressionStream",f),Mt("DecompressionStream",d),u!==fe){const{deflate:p,inflate:w}=u;if((p||w)&&(Ft.workerScripts||(Ft.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");Ft.workerScripts.deflate=p}if(w){if(!Array.isArray(w))throw new Error("workerScripts.inflate must be an array");Ft.workerScripts.inflate=w}}}function Mt(e,t){t!==fe&&(Ft[e]=t)}const Sn={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin",cap:["cap","pcap"],"cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",javascript:"js",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":"odm","vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-debian-package":["deb","udeb"],"x-director":["dcr","dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-koan":["skp","skd","skt","skm"],"x-kpresenter":["kpr","kpt"],"x-kword":["kwd","kwt"],"x-latex":"latex","x-lha":"lha","x-lyx":"lyx","x-lzh":"lzh","x-lzx":"lzx","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-ms-wmd":"wmd","x-ms-wmz":"wmz","x-msdos-program":["com","exe","bat","dll"],"x-msi":"msi","x-netcdf":["nc","cdf"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":"rpm","x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tcl":"tcl","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-troff":["t","tr","roff"],"x-troff-man":"man","x-troff-me":"me","x-troff-ms":"ms","x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix",json:"json","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":"mathml",mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","x-msdownload":["exe","dll","com","bat","msi"],"x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tads":"gam","x-tex":"tex","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-compressed":"tgz","x-gzip":"gz","x-perfmon":["pma","pmc","pml","pmr","pmw"],"x-pkcs7-mime":["p7c","p7m"],"ynd.ms-pkipko":"pko"},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":["aif","aiff","aifc"],"x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2","x-wav":"wav",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":["mmd","mmod"],"x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":["sd","sdf"],"x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","mpc","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":["val","aso"],"x-pdb":["pdb","ent"],"x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-photoshop":"psd","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",pipeg:"jfif"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":["x3d","x3dz"],"x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:["tm","ts"],"tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{avif:".avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","vrml","wrl","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const t in Sn)if(Sn.hasOwnProperty(t)){for(const n in Sn[t])if(Sn[t].hasOwnProperty(n)){const r=Sn[t][n];if(typeof r=="string")e[r]=t+"/"+n;else for(let i=0;i>>1^3988292384:t=t>>>1;ro[e]=t}class pr{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let r=0,i=t.length|0;r>>8^ro[(n^t[r])&255];this.crc=n}get(){return~this.crc}}class io extends TransformStream{constructor(){const t=new pr;super({transform(n){t.append(n)},flush(n){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t.get()),n.enqueue(r)}})}}function Si(e){if(typeof TextEncoder>"u"){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n0&&t&&(e[n-1]=Fe.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let a=0;a>>t),n=e[a]<<32-t;const i=e.length?e[e.length-1]:0,s=Fe.getPartial(i);return r.push(Fe.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},_r={bytes:{fromBits(e){const n=Fe.bitLength(e)/8,r=new Uint8Array(n);let i;for(let s=0;s>>24,i<<=8;return r},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let o=t.blockSize+r-(t.blockSize+r&t.blockSize-1);o<=i;o+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=Fe.concat(t,[Fe.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r},_S(e,t){return t<>>32-e},_block(e){const t=this,n=t._h,r=Array(80);for(let f=0;f<16;f++)r[f]=e[f];let i=n[0],s=n[1],a=n[2],o=n[3],l=n[4];for(let f=0;f<=79;f++){f>=16&&(r[f]=t._S(1,r[f-3]^r[f-8]^r[f-14]^r[f-16]));const d=t._S(5,i)+t._f(f,s,a,o)+l+r[f]+t._key[Math.floor(f/20)]|0;l=o,o=a,a=t._S(30,s),s=i,i=d}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+l|0}};const so={};so.aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,o,l=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;s<4*i+28;s++){let f=a[s-1];(s%i===0||i===8&&s%i===4)&&(f=n[f>>>24]<<24^n[f>>16&255]<<16^n[f>>8&255]<<8^n[f&255],s%i===0&&(f=f<<8^f>>>24^l<<24,l=l<<1^(l>>7)*283)),a[s]=a[s-i]^f}for(let f=0;s;f++,s--){const d=a[f&3?s:s-4];s<=4||f<4?o[f]=d:o[f]=r[0][n[d>>>24]]^r[1][n[d>>16&255]]^r[2][n[d>>8&255]]^r[3][n[d&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,o,l,f;for(let d=0;d<256;d++)s[(i[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let u=a^a<<1^a<<2^a<<3^a<<4;u=u>>8^u&255^99,n[d]=u,r[u]=d,f=i[l=i[o=i[d]]];let p=f*16843009^l*65537^o*257^d*16843008,w=i[u]*257^u*16843008;for(let D=0;D<4;D++)e[D][d]=w=w<<24^w>>>8,t[D][u]=p=p<<24^p>>>8}for(let d=0;d<5;d++)e[d]=e[d].slice(0),t[d]=t[d].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],l=s[2],f=s[3],d=s[4];let u=e[0]^n[0],p=e[t?3:1]^n[1],w=e[2]^n[2],D=e[t?1:3]^n[3],h=4,c,m,_;for(let v=0;v>>24]^o[p>>16&255]^l[w>>8&255]^f[D&255]^n[h],m=a[p>>>24]^o[w>>16&255]^l[D>>8&255]^f[u&255]^n[h+1],_=a[w>>>24]^o[D>>16&255]^l[u>>8&255]^f[p&255]^n[h+2],D=a[D>>>24]^o[u>>16&255]^l[p>>8&255]^f[w&255]^n[h+3],h+=4,u=c,p=m,w=_;for(let v=0;v<4;v++)i[t?3&-v:v]=d[u>>>24]<<24^d[p>>16&255]<<16^d[w>>8&255]<<8^d[D&255]^n[h++],c=u,u=p,p=w,w=D,D=c;return i}};const od={getRandomValues(e){const t=new Uint32Array(e.buffer),n=r=>{let i=987654321;const s=4294967295;return function(){return i=36969*(i&65535)+(i>>16)&s,r=18e3*(r&65535)+(r>>16)&s,(((i<<16)+r&s)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r>24&255)===255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=Fe.bitLength(t);for(let s=0;s>5)+1<<2;let s,a,o,l,f;const d=new ArrayBuffer(i),u=new DataView(d);let p=0;const w=Fe;for(t=_r.bytes.toBits(t),f=1;p<(i||1);f++){for(s=a=e.encrypt(w.concat(t,[f])),o=1;oi&&(e=n.hash(e));for(let s=0;sthis.resolveReady=i),password:t,signed:n,strength:r-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;o?(await bd(a,l,o,qe(i,0,Fn[l]+2)),i=qe(i,Fn[l]+2),f()):await d;const u=new Uint8Array(i.length-It-(i.length-It)%an);s.enqueue(_o(a,i,u,0,It,!0))},async flush(i){const{signed:s,ctr:a,hmac:o,pending:l,ready:f}=this;await f;const d=qe(l,0,l.length-It),u=qe(l,l.length-It);let p=new Uint8Array;if(d.length){const w=Cn(lt,d);o.update(w);const D=a.update(w);p=Ln(lt,D)}if(s){const w=qe(Ln(lt,o.digest()),0,It);for(let D=0;Dthis.resolveReady=i),password:t,strength:n-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;let u=new Uint8Array;o?(u=await kd(a,l,o),f()):await d;const p=new Uint8Array(u.length+i.length-i.length%an);p.set(u,0),s.enqueue(_o(a,i,p,u.length,0))},async flush(i){const{ctr:s,hmac:a,pending:o,ready:l}=this;await l;let f=new Uint8Array;if(o.length){const d=s.update(Cn(lt,o));a.update(d),f=Ln(lt,d)}r.signature=Ln(lt,a.digest()).slice(0,It),i.enqueue(qi(f,r.signature))}}),r=this}}function _o(e,t,n,r,i,s){const{ctr:a,hmac:o,pending:l}=e,f=t.length-i;l.length&&(t=qi(l,t),n=Dd(n,f-f%an));let d;for(d=0;d<=f-an;d+=an){const u=Cn(lt,qe(t,d,d+an));s&&o.update(u);const p=a.update(u);s||o.update(p),n.set(Ln(lt,p),d+r)}return e.pending=qe(t,d),n}async function bd(e,t,n,r){const i=await wo(e,t,n,qe(r,0,Fn[t])),s=qe(r,Fn[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new Error(oo)}async function kd(e,t,n){const r=co(new Uint8Array(Fn[t])),i=await wo(e,t,n,r);return qi(r,i)}async function wo(e,t,n,r){e.password=null;const i=Si(n),s=await Sd(cd,i,ud,!1,hd),a=await Ed(Object.assign({salt:r},uo),s,8*(En[t]*2+2)),o=new Uint8Array(a),l=Cn(lt,qe(o,0,En[t])),f=Cn(lt,qe(o,En[t],En[t]*2)),d=qe(o,En[t]*2);return Object.assign(e,{keys:{key:l,authentication:f,passwordVerification:d},ctr:new gd(new wd(l),Array.from(md)),hmac:new xd(f)}),d}function Sd(e,t,n,r,i){return pd?Wn.importKey(e,t,n,r,i):Yn.importKey(t)}async function Ed(e,t,n){return _d?await Wn.deriveBits(e,t,n):Yn.pbkdf2(t,e.salt,uo.iterations,n)}function qi(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Dd(e,t){if(t&&t>e.length){const n=e;e=new Uint8Array(t),e.set(n,0)}return e}function qe(e,t,n){return e.subarray(t,n)}function Ln(e,t){return e.fromBits(t)}function Cn(e,t){return e.toBits(t)}const ln=12;class Td extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),go(this,t)},transform(r,i){const s=this;if(s.password){const a=ca(s,r.subarray(0,ln));if(s.password=null,a[ln-1]!=s.passwordVerification)throw new Error(oo);r=r.subarray(ln)}i.enqueue(ca(s,r))}})}}class Ad extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),go(this,t)},transform(r,i){const s=this;let a,o;if(s.password){s.password=null;const l=co(new Uint8Array(ln));l[ln-1]=s.passwordVerification,a=new Uint8Array(r.length+l.length),a.set(da(s,l),0),o=ln}else a=new Uint8Array(r.length),o=0;a.set(da(s,r),o),i.enqueue(a)}})}}function ca(e,t){const n=new Uint8Array(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function xo(e){const t=e.keys[2]|2;return yo(Math.imul(t,t^1)>>>8)}function yo(e){return e&255}function fa(e){return e&4294967295}const ua="deflate-raw";class Od extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:r,CompressionStreamNative:i}){super({});const{compressed:s,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:f,level:d}=t,u=this;let p,w,D=vo(super.readable);(!a||l)&&f&&([D,p]=D.tee(),p=ct(p,new io)),s&&(D=ko(D,o,{level:d,chunkSize:n},i,r)),a&&(l?D=ct(D,new Ad(t)):(w=new vd(t),D=ct(D,w))),bo(u,D,async()=>{let h;a&&!l&&(h=w.signature),(!a||l)&&f&&(h=await p.getReader().read(),h=new DataView(h.value.buffer).getUint32(0)),u.signature=h})}}class Rd extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:r,DecompressionStreamNative:i}){super({});const{zipCrypto:s,encrypted:a,signed:o,signature:l,compressed:f,useCompressionStream:d}=t;let u,p,w=vo(super.readable);a&&(s?w=ct(w,new Td(t)):(p=new yd(t),w=ct(w,p))),f&&(w=ko(w,d,{chunkSize:n},i,r)),(!a||s)&&o&&([w,u]=w.tee(),u=ct(u,new io)),bo(this,w,async()=>{if((!a||s)&&o){const D=await u.getReader().read(),h=new DataView(D.value.buffer);if(l!=h.getUint32(0,!1))throw new Error(lo)}})}}function vo(e){return ct(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function bo(e,t,n){t=ct(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function ko(e,t,n,r,i){try{const s=t&&r?r:i;e=ct(e,new s(ua,n))}catch(s){if(t)e=ct(e,new i(ua,n));else throw s}return e}function ct(e,t){return e.pipeThrough(t)}const Md="message",Id="start",Fd="pull",ha="data",Ld="ack",Cd="close",So="deflate",Eo="inflate";class Nd extends TransformStream{constructor(t,n){super({});const r=this,{codecType:i}=t;let s;i.startsWith(So)?s=Od:i.startsWith(Eo)&&(s=Rd);let a=0;const o=new s(t,n),l=super.readable,f=new TransformStream({transform(d,u){d&&d.length&&(a+=d.length,u.enqueue(d))},flush(){const{signature:d}=o;Object.assign(r,{signature:d,size:a})}});Object.defineProperty(r,"readable",{get(){return l.pipeThrough(o).pipeThrough(f)}})}}const Ud=typeof Worker!=mr;class ni{constructor(t,{readable:n,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:f},d){const{signal:u}=a;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new Pd(n,a,s),{signal:u}),writable:r,options:Object.assign({},i),scripts:f,transferStreams:l,terminate(){const{worker:p,busy:w}=t;p&&!w&&(p.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,d(t)}}),(o&&Ud?Wd:Yd)(t,s)}}class Pd extends TransformStream{constructor(t,{onstart:n,onprogress:r,size:i,onend:s},{chunkSize:a}){let o=0;super({start(){n&&ri(n,i)},async transform(l,f){o+=l.length,r&&await ri(r,o,i),f.enqueue(l)},flush(){t.size=o,s&&ri(s,o)}},{highWaterMark:1,size:()=>a})}}async function ri(e,...t){try{await e(...t)}catch{}}function Yd(e,t){return{run:()=>Hd(e,t)}}function Wd(e,{baseURL:t,chunkSize:n}){return e.interface||Object.assign(e,{worker:Vd(e.scripts[0],t,e),interface:{run:()=>jd(e,{chunkSize:n})}}),e.interface}async function Hd({options:e,readable:t,writable:n,onTaskFinished:r},i){const s=new Nd(e,i);try{await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,size:o}=s;return{signature:a,size:o}}finally{r()}}async function jd(e,t){let n,r;const i=new Promise((p,w)=>{n=p,r=w});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});const{readable:s,options:a,scripts:o}=e,{writable:l,closed:f}=Bd(e.writable);Ei({type:Id,scripts:o.slice(1),options:a,config:t,readable:s,writable:l},e)||Object.assign(e,{reader:s.getReader(),writer:l.getWriter()});const u=await i;try{await l.close()}catch{}return await f,u}function Bd(e){const t=e.getWriter();let n;const r=new Promise(s=>n=s);return{writable:new WritableStream({async write(s){await t.ready,await t.write(s)},close(){t.releaseLock(),n()},abort(s){return t.abort(s)}}),closed:r}}let ma=!0,pa=!0;function Vd(e,t,n){const r={type:"module"};let i,s;typeof e==eo&&(e=e());try{i=new URL(e,t)}catch{i=e}if(ma)try{s=new Worker(i)}catch{ma=!1,s=new Worker(i,r)}else s=new Worker(i,r);return s.addEventListener(Md,a=>Gd(a,n)),s}function Ei(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:s,readable:a,writable:o}=e;const l=[];if(s){const{buffer:f,length:d}=s;d!=f.byteLength&&(s=new Uint8Array(s)),e.value=s.buffer,l.push(e.value)}if(i&&pa?(a&&l.push(a),o&&l.push(o)):e.readable=e.writable=null,l.length)try{return t.postMessage(e,l),!0}catch{pa=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(s){throw n&&n.releaseLock(),r(),s}}async function Gd({data:e},t){const{type:n,value:r,messageId:i,result:s,error:a}=e,{reader:o,writer:l,resolveResult:f,rejectResult:d,onTaskFinished:u}=t;try{if(a){const{message:w,stack:D,code:h,name:c}=a,m=new Error(w);Object.assign(m,{stack:D,code:h,name:c}),p(m)}else{if(n==Fd){const{value:w,done:D}=await o.read();Ei({type:ha,value:w,done:D,messageId:i},t)}n==ha&&(await l.ready,await l.write(new Uint8Array(r)),Ei({type:Ld,messageId:i},t)),n==Cd&&p(null,s)}}catch(w){p(w)}function p(w,D){w?d(w):f(D),l&&l.releaseLock(),u()}}let Bt=[];const ii=[];let _a=0;async function Do(e,t){const{options:n,config:r}=t,{transferStreams:i,useWebWorkers:s,useCompressionStream:a,codecType:o,compressed:l,signed:f,encrypted:d}=n,{workerScripts:u,maxWorkers:p,terminateWorkerTimeout:w}=r;t.transferStreams=i||i===fe;const D=!l&&!f&&!d&&!t.transferStreams;t.useWebWorkers=!D&&(s||s===fe&&r.useWebWorkers),t.scripts=t.useWebWorkers&&u?u[o]:[],n.useCompressionStream=a||a===fe&&r.useCompressionStream;let h;const c=Bt.find(_=>!_.busy);if(c)wa(c),h=new ni(c,e,t,m);else if(Bt.lengthii.push({resolve:_,stream:e,workerOptions:t}));return h.run();function m(_){if(ii.length){const[{resolve:v,stream:b,workerOptions:g}]=ii.splice(0,1);v(new ni(_,b,g,m))}else _.worker?(wa(_),Number.isFinite(w)&&w>=0&&(_.terminateTimeout=setTimeout(()=>{Bt=Bt.filter(v=>v!=_),_.terminate()},w))):Bt=Bt.filter(v=>v!=_)}}function wa(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function Zd(e){const t=()=>URL.createObjectURL(new Blob([`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:"PBKDF2"},B=t.assign({hash:{name:"HMAC"}},R),E=t.assign({iterations:1e3,hash:{name:"SHA-1"}},R),M=["deriveBits"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&"function"==typeof T.importKey,L=N&&W&&"function"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s("Invalid password")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s("Invalid signature")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey("raw",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s("Invalid password");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s("Invalid signature")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)("deflate-raw",n))}catch(r){if(!t)throw r;e=pe(e,new s("deflate-raw",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=le:s.startsWith("inflate")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:"pull",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:"data",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:"close",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&ke(e),"data"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe="oversubscribed dynamic bit lengths tree":-5!=a&&0!==r[0]||(f.Oe="incomplete dynamic bit lengths tree",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe="oversubscribed literal/length tree":-4!=h&&(w.Oe="incomplete literal/length tree",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe="oversubscribed distance tree":-5==h?(w.Oe="incomplete distance tree",h=-3):-4!=h&&(w.Oe="empty distance tree with lengths",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe="invalid distance code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe="invalid literal/length code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe="invalid literal/length code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe="invalid distance code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe="invalid block type",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe="invalid stored block lengths",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe="too many length or distance symbols",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe="invalid bit length repeat",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe="need dictionary",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye}; -`],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}const To="HTTP error ",Rr="HTTP Range not supported",qd="Writer iterator completed too soon",zd="text/plain",$d="Content-Length",Kd="Content-Range",Xd="Accept-Ranges",Jd="Range",Qd="Content-Type",ef="HEAD",$i="GET",Ao="bytes",tf=64*1024,Ki="writable";class Mr{constructor(){this.size=0}init(){this.initialized=!0}}class Yt extends Mr{get readable(){const t=this,{chunkSize:n=tf}=t,r=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:s=0,size:a,diskNumberStart:o}=r,{chunkOffset:l}=this;i.enqueue(await Ie(t,s+l,Math.min(n,a-l),o)),l+n>a?i.close():this.chunkOffset+=n}});return r}}class Oo extends Mr{constructor(){super();const t=this,n=new WritableStream({write(r){return t.writeUint8Array(r)}});Object.defineProperty(t,Ki,{get(){return n}})}writeUint8Array(){}}class Di extends Yt{constructor(t){super();let n=t.length;for(;t.charAt(n-1)=="=";)n--;const r=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:r,size:Math.floor((n-r)*.75)})}readUint8Array(t,n){const{dataStart:r,dataURI:i}=this,s=new Uint8Array(n),a=Math.floor(t/3)*4,o=atob(i.substring(a+r,Math.ceil((t+n)/3)*4+r)),l=t-Math.floor(a/4)*3;for(let f=l;f2?n.data+=btoa(i):n.pending=i}getData(){return this.data+btoa(this.pending)}}class hn extends Yt{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){const r=this;return new Uint8Array(await r.blob.slice(t,t+n).arrayBuffer())}}class zt extends Mr{constructor(t){super();const n=this,r=new TransformStream,i=[];t&&i.push([Qd,t]),Object.defineProperty(n,Ki,{get(){return r.writable}}),n.blob=new Response(r.readable,{headers:i}).blob()}getData(){return this.blob}}class Ro extends hn{constructor(t){super(new Blob([t],{type:zd}))}}class Ti extends zt{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:n}=this,r=await super.getData();if(r.text&&n)return r.text();{const i=new FileReader;return new Promise((s,a)=>{Object.assign(i,{onload:({target:o})=>s(o.result),onerror:()=>a(i.error)}),i.readAsText(r,t)})}}}class nf extends Yt{constructor(t,n){super(),Mo(this,t,n)}async init(){super.init(),await Io(this,Ai,ga)}readUint8Array(t,n){return Fo(this,t,n,Ai,ga)}}class rf extends Yt{constructor(t,n){super(),Mo(this,t,n)}async init(){super.init(),await Io(this,Oi,xa)}readUint8Array(t,n){return Fo(this,t,n,Oi,xa)}}function Mo(e,t,n){const{preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s}=n;n=Object.assign({},n),delete n.preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.useXHR,Object.assign(e,{url:t,options:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s})}async function Io(e,t,n){const{url:r,useRangeHeader:i,forceRangeRequests:s}=e;if(af(r)&&(i||s)){const{headers:a}=await t($i,e,Lo(e));if(!s&&a.get(Xd)!=Ao)throw new Error(Rr);{let o;const l=a.get(Kd);if(l){const f=l.trim().split(/\s*\/\s*/);if(f.length){const d=f[1];d&&d!="*"&&(o=Number(d))}}o===fe?await ya(e,t,n):e.size=o}}else await ya(e,t,n)}async function Fo(e,t,n,r,i){const{data:s,useRangeHeader:a,forceRangeRequests:o,options:l}=e;if(a||o){const f=await r($i,e,Lo(e,t,n));if(f.status!=206)throw new Error(Rr);return new Uint8Array(await f.arrayBuffer())}else return s||await i(e,l),new Uint8Array(s.subarray(t,t+n))}function Lo(e,t=0,n=1){return Object.assign({},Xi(e),{[Jd]:Ao+"="+t+"-"+(t+n-1)})}function Xi({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function ga(e){await Co(e,Ai)}async function xa(e){await Co(e,Oi)}async function Co(e,t){const n=await t($i,e,Xi(e));e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function ya(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t(ef,e,Xi(e))).headers.get($d);i?e.size=Number(i):await n(e,e.options)}}async function Ai(e,{options:t,url:n},r){const i=await fetch(n,Object.assign({},t,{method:e,headers:r}));if(i.status<400)return i;throw i.status==416?new Error(Rr):new Error(To+(i.statusText||i.status))}function Oi(e,{url:t},n){return new Promise((r,i)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",()=>{if(s.status<400){const a=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(o=>{const l=o.trim().split(/\s*:\s*/);l[0]=l[0].trim().replace(/^[a-z]|-[a-z]/g,f=>f.toUpperCase()),a.push(l)}),r({status:s.status,arrayBuffer:()=>s.response,headers:new Map(a)})}else i(s.status==416?new Error(Rr):new Error(To+(s.statusText||s.status)))},!1),s.addEventListener("error",a=>i(a.detail.error),!1),s.open(e,t),n)for(const a of Object.entries(n))s.setRequestHeader(a[0],a[1]);s.responseType="arraybuffer",s.send()})}class va extends Yt{constructor(t,n={}){super(),Object.assign(this,{url:t,reader:n.useXHR?new rf(t,n):new nf(t,n)})}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(t,n){return this.reader.readUint8Array(t,n)}}class Ri extends Yt{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,n){return this.array.slice(t,t+n)}}class gr extends Oo{init(t=0){super.init(),Object.assign(this,{offset:0,array:new Uint8Array(t)})}writeUint8Array(t){const n=this;if(n.offset+t.length>n.array.length){const r=n.array;n.array=new Uint8Array(r.length+t.length),n.array.set(r)}n.array.set(t,n.offset),n.offset+=t.length}getData(){return this.array}}class sf extends Yt{constructor(t){super(),this.readers=t}async init(){super.init();const t=this,{readers:n}=t;t.lastDiskNumber=0,await Promise.all(n.map(async r=>{await r.init(),t.size+=r.size}))}async readUint8Array(t,n,r=0){const i=this,{readers:s}=this;let a,o=r;o==-1&&(o=s.length-1);let l=t;for(;l>=s[o].size;)l-=s[o].size,o++;const f=s[o],d=f.size;if(l+n<=d)a=await Ie(f,l,n);else{const u=d-l;a=new Uint8Array(n),a.set(await Ie(f,l,u)),a.set(await i.readUint8Array(t+u,n-u,r),u)}return i.lastDiskNumber=Math.max(o,i.lastDiskNumber),a}}class ba extends Mr{constructor(t,n=4294967296){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,availableSize:n});let i,s,a;const o=new WritableStream({async write(d){if(a)if(i.size+d.length>=n){const u=n-i.size;await l(d.slice(0,u)),await f(),r.diskOffset+=i.size,r.diskNumber++,a=null,await this.write(d.slice(u))}else d.length&&await l(d),r.availableSize=n-i.size;else{const{value:u,done:p}=await t.next();if(p&&!u)throw new Error(qd);i=u,i.size=0,s=u.writable,a=s.getWriter(),await this.write(d)}},async close(){await a.ready,await f()}});Object.defineProperty(r,Ki,{get(){return o}});async function l(d){await a.ready,await a.write(d),i.size+=d.length,r.size+=d.length}async function f(){s.size=i.size,await a.close()}}}function af(e){const{baseURL:t}=Vi(),{protocol:n}=new URL(e,t);return n=="http:"||n=="https:"}async function ze(e,t){e.init&&!e.initialized&&await e.init(t)}function Ie(e,t,n,r){return e.readUint8Array(t,n,r)}const No="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),of=No.length==256;function lf(e){if(of){let t="";for(let n=0;nthis[n]=t[n])}}const si="File format is not recognized",uf="End of central directory not found",hf="End of Zip64 central directory not found",mf="End of Zip64 central directory locator not found",pf="Central directory header not found",_f="Local file header not found",wf="Zip64 extra field not found",gf="File contains encrypted entry",xf="Encryption method not supported",ka="Compression method not supported",Sa="Split zip file",Ea="utf-8",Da="cp437",yf=[[Ho,pe],[jo,pe],[Bo,pe],[Ii,ke]],vf={[ke]:{getValue:_e,bytes:4},[pe]:{getValue:lr,bytes:8}};class bf{constructor(t,n={}){t instanceof ReadableStream&&(t={readable:t}),Object.assign(this,{reader:t,options:n,config:Vi()})}async*getEntriesGenerator(t={}){const n=this;let{reader:r}=n;const{config:i}=n;if(await ze(r),(r.size===fe||!r.readUint8Array)&&(Array.isArray(r)?r=new sf(r):r=new hn(await new Response(r.readable).blob()),await ze(r)),r.size=r.size)throw new Error(si);let _=0,v=await Ie(r,l,o,D),b=Te(v);if(o){const k=s.offset-o;if(_e(b,_)!=gi&&l!=k){const S=l;l=k,c=l-S,v=await Ie(r,l,o,D),b=Te(v)}}if(l<0||l>=r.size)throw new Error(si);const g=tt(n,t,"filenameEncoding"),y=tt(n,t,"commentEncoding");for(let k=0;kS.getData(ht,Wt,Ht),_=we;const{onprogress:Dt}=t;if(Dt)try{await Dt(k+1,h,new xr(S))}catch{}yield Wt}const x=tt(n,t,"extractPrependedData"),E=tt(n,t,"extractAppendedData");return x&&(n.prependedData=m>0?await Ie(r,0,m):new Uint8Array),n.comment=d?await Ie(r,f+sn,d):new Uint8Array,E&&(n.appendedData=u>>8&255:p>>>24&255),signature:p,compressed:f!=0,encrypted:b,useWebWorkers:tt(i,r,"useWebWorkers"),useCompressionStream:tt(i,r,"useCompressionStream"),transferStreams:tt(i,r,"transferStreams")},config:d,streamOptions:{signal:S,size:E,onstart:A,onprogress:P,onend:F}};return k.size+=(await Do({readable:x,writable:k},B)).size,tt(i,r,"preventClose")||await k.close(),t.getData?t.getData():k}}function $o(e,t,n){const r=e.rawBitFlag=ve(t,n+2),i=(r&yi)==yi,s=_e(t,n+6);Object.assign(e,{encrypted:i,version:ve(t,n),bitFlag:{level:(r&rd)>>1,dataDescriptor:(r&vi)==vi,languageEncodingFlag:(r&bi)==bi},rawLastModDate:s,lastModDate:Of(s),filenameLength:ve(t,n+22),extraFieldLength:ve(t,n+24)})}async function Ko(e,t,n,r){const{rawExtraField:i}=t,s=t.extraField=new Map,a=Te(new Uint8Array(i));let o=0;try{for(;ot[i]==s);for(let i=0,s=0;i{if(e.data.length>=a+4){const f=_e(n,a);t[o]=e[o]=new Date(f*1e3);const d=s[l];e[d]=f}a+=4})}async function Af(e,t,n,r,i){const s=new Uint8Array(4),a=Te(s);Rf(a,0,t);const o=r+i;return await l(r)||await l(Math.min(o,n));async function l(f){const d=n-f,u=await Ie(e,d,f);for(let p=u.length-r;p>=0;p--)if(u[p]==s[0]&&u[p+1]==s[1]&&u[p+2]==s[2]&&u[p+3]==s[3])return{offset:d+p,buffer:u.slice(p,p+r).buffer}}}function tt(e,t,n){return t[n]===fe?e.options[n]:t[n]}function Of(e){const t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function ai(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function cn(e,t){return e.getUint8(t)}function ve(e,t){return e.getUint16(t,!0)}function _e(e,t){return e.getUint32(t,!0)}function lr(e,t){return Number(e.getBigUint64(t,!0))}function Rf(e,t,n){e.setUint32(t,n,!0)}function Te(e){return new DataView(e.buffer)}const Mf="File already exists",If="Zip file comment exceeds 64KB",Ff="File entry comment exceeds 64KB",Lf="File entry name exceeds 64KB",Aa="Version exceeds 65535",Cf="The strength must equal 1, 2, or 3",Nf="Extra field type exceeds 65535",Uf="Extra field data exceeds 64KB",ts="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Oa=new Uint8Array([7,0,2,0,65,69,3,0,0]),Xo=28;let oi=0;const Ra=[];class Pf{constructor(t,n={}){t.writable===fe&&typeof t.next==eo&&(t=new ba(t)),t instanceof WritableStream&&(t={writable:t}),t.writable.size===fe&&(t.writable.size=0);const r=t instanceof ba;r||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0}),Object.assign(this,{writer:t,addSplitZipSignature:r,options:n,config:Vi(),files:new Map,filenames:new Set,offset:t.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set})}async add(t="",n,r={}){const i=this,{pendingAddFileCalls:s,config:a}=i;oiRa.push(l));let o;try{if(t=t.trim(),i.filenames.has(t))throw new Error(Mf);return i.filenames.add(t),o=Yf(i,t,n,r),s.add(o),await o}catch(l){throw i.filenames.delete(t),l}finally{s.delete(o);const l=Ra.shift();l?l():oi--}}async close(t=new Uint8Array,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:s}=i;for(;r.size;)await Promise.all(Array.from(r));return await qf(this,t,n),!i.preventClose&&!n.preventClose&&await s.close(),i.getData?i.getData():s}}async function Yf(e,t,n,r){t=t.trim(),r.directory&&!t.endsWith(or)?t+=or:r.directory=t.endsWith(or);const i=Si(t);if(ee(i)>ke)throw new Error(Lf);const s=r.comment||"",a=Si(s);if(ee(a)>ke)throw new Error(Ff);const o=e.options.version||r.version||0;if(o>ke)throw new Error(Aa);const l=e.options.versionMadeBy||r.versionMadeBy||20;if(l>ke)throw new Error(Aa);const f=xe(e,r,Ji)||new Date,d=xe(e,r,Qi),u=xe(e,r,es),p=xe(e,r,"password"),w=xe(e,r,"encryptionStrength")||3,D=xe(e,r,"zipCrypto");if(p!==fe&&w!==fe&&(w<1||w>3))throw new Error(Cf);let h=new Uint8Array;const{extraField:c}=r;if(c){let he=0,V=0;c.forEach(Z=>he+=4+ee(Z)),h=new Uint8Array(he),c.forEach((Z,Se)=>{if(Se>ke)throw new Error(Nf);if(ee(Z)>ke)throw new Error(Uf);be(h,new Uint16Array([Se]),V),be(h,new Uint16Array([ee(Z)]),V+2),be(h,Z,V+4),V+=4+ee(Z)})}let m=xe(e,r,"extendedTimestamp");m===fe&&(m=!0);let _=0,v=0,b=xe(e,r,"keepOrder");b===fe&&(b=!0);let g=0,y=xe(e,r,qo);y===fe&&(y=!0);const x=xe(e,r,Go)||0,E=xe(e,r,Zo)||0;let k=xe(e,r,zo);n&&(n instanceof ReadableStream&&(n={readable:n}),await ze(n),n.size===fe?(r.dataDescriptor=!0,(k||k===fe)&&(k=!0,_=pe)):(g=n.size,_=$f(g)));const{diskOffset:S}=e.writer;if(e.offset+e.pendingEntriesSize-S>=pe||g>=pe||_>=pe){if(k===!1||!b)throw new Error(ts);k=!0}k=k||!1;const A=xe(e,r,"level"),P=xe(e,r,"useWebWorkers"),F=xe(e,r,"bufferedWrite");let B=xe(e,r,"dataDescriptor"),N=xe(e,r,"dataDescriptorSignature");const Y=xe(e,r,"signal"),j=xe(e,r,"useCompressionStream");B===fe&&(B=!0),B&&N===fe&&(N=!1),r=Object.assign({},r,{rawFilename:i,rawComment:a,version:o,versionMadeBy:l,lastModDate:f,lastAccessDate:d,creationDate:u,rawExtraField:h,zip64:k,password:p,level:A,useWebWorkers:P,encryptionStrength:w,extendedTimestamp:m,zipCrypto:D,bufferedWrite:F,keepOrder:b,dataDescriptor:B,dataDescriptorSignature:N,signal:Y,msDosCompatible:y,internalFileAttribute:x,externalFileAttribute:E,useCompressionStream:j});const q=jf(r),we=Bf(r);v=ee(q.localHeaderArray,we.dataDescriptorArray)+_,e.pendingEntriesSize+=v;let W;try{W=await Wf(e,t,n,{headerInfo:q,dataDescriptorInfo:we},r)}finally{e.pendingEntriesSize-=v}return Object.assign(W,{name:t,comment:s,extraField:c}),new xr(W)}async function Wf(e,t,n,r,i){const{files:s,writer:a}=e,{keepOrder:o,dataDescriptor:l,signal:f}=i,d=Array.from(s.values()).pop();let u={},p,w,D,h,c,m;s.set(t,u);try{let b;o&&(b=d&&d.lock,_()),i.bufferedWrite||e.lockWriter||!l?(m=new zt,m.writable.size=0,p=!0,await ze(a)):(m=a,e.lockWriter=Promise.resolve(),w=()=>delete e.lockWriter),await ze(m);const{writable:g,diskNumber:y}=a;let{diskOffset:x}=a;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const E=new Uint8Array(4),k=He(E);Q(k,0,ji),await Nt(g,E),e.offset+=4}if(p||await b,c=!0,u.diskNumberStart=y,u=await Hf(n,m,u,r,e.config,i),c=!1,s.set(t,u),u.filename=t,p){await m.writable.close();let E=await m.getData();await b,await v(),h=!0,l||(E=await Gf(u,E,g,i)),u.diskNumberStart=a.diskNumber,x=a.diskOffset,await E.stream().pipeTo(g,{preventClose:!0,signal:f}),g.size+=E.size,h=!1}if(u.offset=e.offset-x,u.zip64)Zf(u);else if(u.offset>=pe)throw new Error(ts);return e.offset+=u.length,u}catch(b){throw(p&&h||!p&&c)&&(e.hasCorruptedEntries=!0,b&&(b.corruptedEntry=!0),p?e.offset+=m.writable.size:e.offset=m.writable.size),s.delete(t),b}finally{D&&D(),w&&w()}function _(){u.lock=new Promise(b=>D=b)}async function v(){const{lockWriter:b}=e;if(b)return await b.then(()=>delete e.lockWriter),v();e.lockWriter=new Promise(g=>w=g)}}async function Hf(e,t,{diskNumberStart:n,lock:r},i,s,a){const{headerInfo:o,dataDescriptorInfo:l}=i,{localHeaderArray:f,headerArray:d,lastModDate:u,rawLastModDate:p,encrypted:w,compressed:D,version:h,compressionMethod:c,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:v}=o,{dataDescriptorArray:b}=l,{rawFilename:g,lastAccessDate:y,creationDate:x,password:E,level:k,zip64:S,zipCrypto:A,dataDescriptor:P,directory:F,versionMadeBy:B,rawComment:N,rawExtraField:Y,useWebWorkers:j,onstart:q,onprogress:we,onend:W,signal:he,encryptionStrength:V,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,useCompressionStream:Wt}=a,Dt={lock:r,versionMadeBy:B,zip64:S,directory:Boolean(F),filenameUTF8:!0,rawFilename:g,commentUTF8:!0,rawComment:N,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:v,rawExtraField:Y,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,diskNumberStart:n};let ht=0,Ht=0,wn;const{writable:Ve}=t;if(e){e.chunkSize=no(s),await Nt(Ve,f);const gn=e.readable,Ee=gn.size=e.size,Pe={options:{codecType:So,level:k,password:E,encryptionStrength:V,zipCrypto:w&&A,passwordVerification:w&&A&&p>>8&255,signed:!0,compressed:D,encrypted:w,useWebWorkers:j,useCompressionStream:Wt,transferStreams:!1},config:s,streamOptions:{signal:he,size:Ee,onstart:q,onprogress:we,onend:W}},Xt=await Do({readable:gn,writable:Ve},Pe);Ve.size+=Xt.size,wn=Xt.signature,Ht=e.size=gn.size,ht=Xt.size}else await Nt(Ve,f);const Tt=S?new Uint8Array(Xo+4):new Uint8Array;return e&&Vf({signature:wn,rawExtraFieldZip64:Tt,compressedSize:ht,uncompressedSize:Ht,headerInfo:o,dataDescriptorInfo:l},a),P&&await Nt(Ve,b),Object.assign(Dt,{compressedSize:ht,lastModDate:u,rawLastModDate:p,creationDate:x,lastAccessDate:y,encrypted:w,length:ee(f,b)+ht,compressionMethod:c,version:h,headerArray:d,signature:wn,rawExtraFieldZip64:Tt}),Dt}function jf(e){const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,password:s,level:a,zip64:o,zipCrypto:l,dataDescriptor:f,directory:d,rawExtraField:u,encryptionStrength:p,extendedTimestamp:w}=e,D=a!==0&&!d,h=Boolean(s&&ee(s));let c;if(h&&!l){c=new Uint8Array(ee(Oa)+2);const N=He(c);re(N,0,Xa),be(c,Oa,2),yr(N,8,p)}else c=new Uint8Array;let m,_;if(w){_=new Uint8Array(9+(r?4:0)+(i?4:0));const N=He(_);re(N,0,Bi),re(N,2,ee(_)-4);const Y=1+(r?2:0)+(i?4:0);yr(N,4,Y),Q(N,5,Math.floor(n.getTime()/1e3)),r&&Q(N,9,Math.floor(r.getTime()/1e3)),i&&Q(N,13,Math.floor(i.getTime()/1e3));try{m=new Uint8Array(36);const j=He(m),q=li(n);re(j,0,Ja),re(j,2,32),re(j,8,Qa),re(j,10,24),Ue(j,12,q),Ue(j,20,li(r)||q),Ue(j,28,li(i)||q)}catch{m=new Uint8Array}}else m=_=new Uint8Array;let v=bi;f&&(v=v|vi);let b=Ga;D&&(b=wi);let g=e.version||id;o&&(g=g>ia?g:ia),h&&(v=v|yi,l||(g=g>sa?g:sa,b=Za,D&&(c[9]=wi)));const y=new Uint8Array(26),x=He(y);re(x,0,g),re(x,2,v),re(x,4,b);const E=new Uint32Array(1),k=He(E);let S;naa?S=aa:S=n,re(k,0,(S.getHours()<<6|S.getMinutes())<<5|S.getSeconds()/2),re(k,2,(S.getFullYear()-1980<<4|S.getMonth()+1)<<5|S.getDate());const A=E[0];Q(x,6,A),re(x,22,ee(t));const P=ee(c,_,m,u);re(x,24,P);const F=new Uint8Array(30+ee(t)+P),B=He(F);return Q(B,0,qa),be(F,y,4),be(F,t,30),be(F,c,30+ee(t)),be(F,_,30+ee(t,c)),be(F,m,30+ee(t,c,_)),be(F,u,30+ee(t,c,_,m)),{localHeaderArray:F,headerArray:y,headerView:x,lastModDate:n,rawLastModDate:A,encrypted:h,compressed:D,version:g,compressionMethod:b,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:m,rawExtraFieldAES:c}}function Bf(e){const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i=new Uint8Array,s,a=0;return n&&(i=new Uint8Array(t?r?24:20:r?16:12),s=He(i),r&&(a=4,Q(s,0,Qc))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}}function Vf(e,t){const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:s,headerInfo:a,dataDescriptorInfo:o}=e,{headerView:l,encrypted:f}=a,{dataDescriptorView:d,dataDescriptorOffset:u}=o,{zip64:p,zipCrypto:w,dataDescriptor:D}=t;if((!f||w)&&n!==fe&&(Q(l,10,n),D&&Q(d,u,n)),p){const h=He(r);re(h,0,Ka),re(h,2,Xo),Q(l,14,pe),Ue(h,12,BigInt(i)),Q(l,18,pe),Ue(h,4,BigInt(s)),D&&(Ue(d,u+4,BigInt(i)),Ue(d,u+12,BigInt(s)))}else Q(l,14,i),Q(l,18,s),D&&(Q(d,u+4,i),Q(d,u+8,s))}async function Gf(e,t,n,{zipCrypto:r}){const i=await zf(t,0,26),s=new DataView(i);return(!e.encrypted||r)&&Q(s,14,e.signature),e.zip64?(Q(s,18,pe),Q(s,22,pe)):(Q(s,18,e.compressedSize),Q(s,22,e.uncompressedSize)),await Nt(n,new Uint8Array(i)),t.slice(i.byteLength)}function Zf(e){const{rawExtraFieldZip64:t,offset:n,diskNumberStart:r}=e,i=He(t);Ue(i,20,BigInt(n)),Q(i,28,r)}async function qf(e,t,n){const{files:r,writer:i}=e;let s=0,a=0;const{diskOffset:o,writable:l}=i;let{diskNumber:f}=i,d=e.offset-o,u=r.size;for(const[,{rawFilename:b,rawExtraFieldZip64:g,rawExtraFieldAES:y,rawExtraField:x,rawComment:E,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:S}]of r)a+=46+ee(b,E,g,y,k,S,x);let p=n.zip64||e.options.zip64||!1;if(d>=pe||a>=pe||u>=ke){if(n.zip64===!1||e.options.zip64===!1)throw new Error(ts);p=!0}const w=new Uint8Array(a),D=He(w);for(const[b,g]of Array.from(r.values()).entries()){const{offset:y,rawFilename:x,rawExtraFieldZip64:E,rawExtraFieldAES:k,rawExtraFieldNTFS:S,rawExtraField:A,rawComment:P,versionMadeBy:F,headerArray:B,directory:N,zip64:Y,msDosCompatible:j,internalFileAttribute:q,externalFileAttribute:we,extendedTimestamp:W,lastModDate:he,diskNumberStart:V}=g;let Z;if(W){Z=new Uint8Array(9);const ue=He(Z);re(ue,0,Bi),re(ue,2,ee(Z)-4),yr(ue,4,1),Q(ue,5,Math.floor(he.getTime()/1e3))}else Z=new Uint8Array;const Se=ee(E,k,Z,S,A);if(Q(D,s,gi),re(D,s+4,F),be(w,B,s+6),re(D,s+30,Se),re(D,s+32,ee(P)),re(D,s+34,Y?ke:V),re(D,s+36,q),we?Q(D,s+38,we):N&&j&&yr(D,s+38,ki),Q(D,s+42,Y?pe:y),be(w,x,s+46),be(w,E,s+46+ee(x)),be(w,k,s+46+ee(x,E)),be(w,Z,s+46+ee(x,E,k)),be(w,S,s+46+ee(x,E,k,Z)),be(w,A,s+46+ee(x,E,k,Z,S)),be(w,P,s+46+ee(x)+Se),s+=46+ee(x,P)+Se,n.onprogress)try{await n.onprogress(b+1,r.size,new xr(g))}catch{}}await ze(i),await Nt(l,w);const h=new Uint8Array(p?ed:sn),c=He(h);let m=i.diskNumber;const{availableSize:_}=i;_n&&(t+=n.length)),t}class Jo{constructor(t,n,r,i){const s=this;if(t.root&&i&&i.getChildByName(n))throw new Error("Entry filename already exists");r||(r={}),Object.assign(s,{fs:t,name:n,data:r.data,id:t.entries.length,parent:i,children:[],uncompressedSize:0}),t.entries.push(s),i&&s.parent.children.push(s)}moveTo(t){const n=this;n.fs.move(n,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){const n=this;let r=n.name,i=n.parent;for(;i&&i!=t;)r=(i.name?i.name+"/":"")+r,i=i.parent;return r}isDescendantOf(t){let n=this.parent;for(;n&&n.id!=t.id;)n=n.parent;return Boolean(n)}}class Qo extends Jo{constructor(t,n,r,i){super(t,n,r,i);const s=this;s.Reader=r.Reader,s.Writer=r.Writer,r.getData&&(s.getData=r.getData)}async getData(t,n={}){const r=this;if(!t||t.constructor==r.Writer&&r.data)return r.data;{const i=r.reader=new r.Reader(r.data,n);await Promise.all([ze(i),ze(t,r.data.uncompressedSize)]);const s=i.readable;return s.size=r.uncompressedSize=i.size,await s.pipeTo(t.writable),t.getData?t.getData():t.writable}}getText(t,n){return this.getData(new Ti(t),n)}getBlob(t,n){return this.getData(new zt(t),n)}getData64URI(t,n){return this.getData(new wr(t),n)}getUint8Array(t){return this.getData(new gr,t)}getWritable(t=new WritableStream,n){return this.getData({writable:t},n)}replaceBlob(t){Object.assign(this,{data:t,Reader:hn,Writer:zt,reader:null})}replaceText(t){Object.assign(this,{data:t,Reader:Ro,Writer:Ti,reader:null})}replaceData64URI(t){Object.assign(this,{data:t,Reader:Di,Writer:wr,reader:null})}replaceUint8Array(t){Object.assign(this,{data:t,Reader:Ri,Writer:gr,reader:null})}replaceReadable(t){Object.assign(this,{data:null,Reader:function(){return{readable:t}},Writer:null,reader:null})}}class Hn extends Jo{constructor(t,n,r,i){super(t,n,r,i),this.directory=!0}addDirectory(t){return mt(this,t,null,!0)}addText(t,n){return mt(this,t,{data:n,Reader:Ro,Writer:Ti})}addBlob(t,n){return mt(this,t,{data:n,Reader:hn,Writer:zt})}addData64URI(t,n){return mt(this,t,{data:n,Reader:Di,Writer:wr})}addUint8Array(t,n){return mt(this,t,{data:n,Reader:Ri,Writer:gr})}addHttpContent(t,n,r={}){return mt(this,t,{data:n,Reader:class extends va{constructor(i){super(i,r)}}})}addReadable(t,n){return mt(this,t,{Reader:function(){return{readable:n}}})}addFileSystemEntry(t){return tu(this,t)}addData(t,n){return mt(this,t,n)}async importBlob(t,n={}){await this.importZip(new hn(t),n)}async importData64URI(t,n={}){await this.importZip(new Di(t),n)}async importUint8Array(t,n={}){await this.importZip(new Ri(t),n)}async importHttpContent(t,n={}){await this.importZip(new va(t,n),n)}async importReadable(t,n={}){await this.importZip({readable:t},n)}exportBlob(t={}){return this.exportZip(new zt("application/zip"),t)}exportData64URI(t={}){return this.exportZip(new wr("application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new gr,t)}async exportWritable(t=new WritableStream,n={}){return await this.exportZip({writable:t},n),t}async importZip(t,n){await ze(t),(await new bf(t,n).getEntries()).forEach(s=>{let a=this;const o=s.filename.split("/"),l=o.pop();o.forEach(f=>a=a.getChildByName(f)||new Hn(this.fs,f,null,a)),s.directory||mt(a,l,{data:s,Reader:Qf(Object.assign({},n))})})}async exportZip(t,n){const r=this;await Promise.all([el(r),ze(t)]);const i=new Pf(t,n);return await eu(i,r,Jf([r],"uncompressedSize"),n),await i.close(),t.getData?t.getData():t.writable}getChildByName(t){const n=this.children;for(let r=0;r{n.id==e.id&&t.splice(r,1)})}async function eu(e,t,n,r){const i=t,s=new Map;await a(e,t);async function a(o,l){await f();async function f(){if(r.bufferedWrite)await Promise.all(l.children.map(d));else for(const u of l.children)await d(u)}async function d(u){const p=r.relativePath?u.getRelativeName(i):u.getFullname();await o.add(p,u.reader,Object.assign({directory:u.directory},Object.assign({},r,{onprogress:async w=>{if(r.onprogress){s.set(p,w);try{await r.onprogress(Array.from(s.values()).reduce((D,h)=>D+h),n)}catch{}}}}))),await a(o,u)}}}async function tu(e,t){if(t.isDirectory){const i=e.addDirectory(t.name);return await n(i,t),i}else return new Promise((i,s)=>t.file(a=>i(e.addBlob(t.name,a)),s));async function n(i,s){const a=await r(s);for(const o of a)o.isDirectory?await n(i.addDirectory(o.name),o):await new Promise((l,f)=>{o.file(d=>{const u=i.addBlob(o.name,d);u.uncompressedSize=d.size,l(u)},f)})}function r(i){return new Promise((s,a)=>{let o=[];i.isDirectory&&l(i.createReader()),i.isFile&&s(o);function l(f){f.readEntries(d=>{d.length?(o=o.concat(d),l(f)):s(o)},a)}})}}function en(e){e.entries=[],e.root=new Hn(e)}function mt(e,t,n,r){if(e.directory)return r?new Hn(e.fs,t,n,e):new Qo(e.fs,t,n,e);throw new Error("Parent entry is not a directory")}let tl;try{tl=import.meta.url}catch{}Gi({baseURL:tl});Zd(Gi);Gi({Deflate:Mc,Inflate:Jc});function Ir(e){return e.slice(e.lastIndexOf(Fr)+1)}const Fr="/";class nu{constructor(t){Zn(this,"zipFS");Zn(this,"chunks",[]);Zn(this,"chunkIndex",0);this.zipBlob=t}async initReadingVault(){this.zipFS=new Xf.FS,await this.zipFS.importBlob(this.zipBlob)}readDirectory(t){return this.zipFS.find(t).children.map(r=>({isDirectory:()=>!!r.directory,getName:()=>r.getFullname()}))}readFile(t){return this.zipFS.find(t).getText("utf-8")}exists(t){return!!this.zipFS.find(t)}resolve(t){return t}resolveInDir(t,n){return t+Fr+n}removeFile(t){}renameFile(t,n){}appendToFile(t,n){this.chunks.push(n)}appendToPostProcessingFile(t,n){this.chunks[this.chunkIndex]=n,this.chunkIndex++}initReadingResultFile(t){}chunkIter(){const t=this.chunks;let n=0;return{[Symbol.asyncIterator](){return{async next(){if(n{if(s.forEach((o,l)=>s[l]+=a),r==="seenOne"&&a!=="["&&(r="normal"),r==="seenOneOut"&&a!=="]"&&(r="normal"),a==="["&&(i+=1,r==="seenOne"?(s.push(""),r="normal"):r==="normal"&&(r="seenOne")),a==="]"&&i>0){if(i-=1,r==="seenOneOut"){const o=s.pop();o&&(!t||s.length===0)&&n.push(o.slice(0,-2)),r="normal"}else r==="normal"&&(r="seenOneOut");i===0&&(r="normal")}}),n}function Ia(e){return Ir(e)!==e}class ci extends Map{fullRetrieveAndUpdate(t,n,r){const i=Array.from(this.keys());let s=i.find(a=>a.path===n);return s||(s=i.find(a=>a.name===t)),s||(s={path:n,name:t},this.set(s,r())),s.name=t,s.path=n,this.get(s)}partialRetrieveAndUpdate(t,n){const r=Array.from(this.keys()),i=Ia(t);let s;return i?s=r.find(a=>a.path===t):s=r.find(a=>a.name===t),s||(i?s={path:t}:s={name:t},this.set(s,n())),this.get(s)}findMatchingFile(t){const n=Array.from(this.keys()),r=Ia(t);let i;return r?i=n.find(s=>s.path===t):i=n.find(s=>s.name===t),i}}function Lr(e){e.totalNodes++,e.leafNodes++}function nl(e){e.leafNodes--,e.topLevelNodes++}function su(e,t,n=ru){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},fileSystemAdapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new ci,headingTracker:new ci,dummyHeadingLinkTracker:new Map,blockLinkTracker:new ci,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:"YYYY-MM-DD"}}function bt(e){return Lr(e.summary),e.idGenerator()}function au(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.partialRetrieveAndUpdate(n,()=>new Map);let s=i.get(r);return s||(s={uid:bt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function ou(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.fullRetrieveAndUpdate(r,t,()=>new Map);let a=s.get(i);return a||(a={uid:bt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function lu(e){const t=[];for(const n of e.values())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function cu(e){let t;return[e.split(` +var uc=Object.defineProperty;var hc=(e,t,n)=>t in e?uc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var jt=(e,t,n)=>(hc(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const Fn=15,mi=30,pi=19,mc=29,ur=256,Hi=ur+1+mc,Ms=2*Hi+1,bn=256,pc=7,Is=16,Fs=17,Ls=18,$r=8*2,hr=-1,_c=1,qn=2,wc=0,rn=0,Cs=1,gc=3,Le=4,Qe=0,Ya=1,zn=2,et=-2,xc=-3,Qt=-5;function Tr(e){return Or(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function Or(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?Or(n):n),[])}const Ns=[0,1,2,3].concat(...Tr([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function se(){const e=this;function t(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,f=e.stat_desc.max_length;let d,u,p,w,D,h,c=0;for(w=0;w<=Fn;w++)i.bl_count[w]=0;for(s[i.heap[i.heap_max]*2+1]=0,d=i.heap_max+1;df&&(w=f,c++),s[u*2+1]=w,!(u>e.max_code)&&(i.bl_count[w]++,D=0,u>=l&&(D=o[u-l]),h=s[u*2],i.opt_len+=h*(w+D),a&&(i.static_len+=h*(a[u*2+1]+D)));if(c!==0){do{for(w=f-1;i.bl_count[w]===0;)w--;i.bl_count[w]--,i.bl_count[w+1]+=2,i.bl_count[f]--,c-=2}while(c>0);for(w=f;w!==0;w--)for(u=i.bl_count[w];u!==0;)p=i.heap[--d],!(p>e.max_code)&&(s[p*2+1]!=w&&(i.opt_len+=(w-s[p*2+1])*s[p*2],s[p*2+1]=w),u--)}}function n(i,s){let a=0;do a|=i&1,i>>>=1,a<<=1;while(--s>0);return a>>>1}function r(i,s,a){const o=[];let l=0,f,d,u;for(f=1;f<=Fn;f++)o[f]=l=l+a[f-1]<<1;for(d=0;d<=s;d++)u=i[d*2+1],u!==0&&(i[d*2]=n(o[u]++,u))}e.build_tree=function(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.elems;let l,f,d=-1,u;for(i.heap_len=0,i.heap_max=Ms,l=0;l=1;l--)i.pqdownheap(s,l);u=o;do l=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(s,1),f=i.heap[1],i.heap[--i.heap_max]=l,i.heap[--i.heap_max]=f,s[u*2]=s[l*2]+s[f*2],i.depth[u]=Math.max(i.depth[l],i.depth[f])+1,s[l*2+1]=s[f*2+1]=u,i.heap[1]=u++,i.pqdownheap(s,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],t(i),r(s,e.max_code,i.bl_count)}}se._length_code=[0,1,2,3,4,5,6,7].concat(...Tr([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));se.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];se.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];se.d_code=function(e){return e<256?Ns[e]:Ns[256+(e>>>7)]};se.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];se.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];se.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];se.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function De(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}const yc=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],bc=Tr([[144,8],[112,9],[24,7],[8,8]]);De.static_ltree=Or(yc.map((e,t)=>[e,bc[t]]));const vc=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],kc=Tr([[30,5]]);De.static_dtree=Or(vc.map((e,t)=>[e,kc[t]]));De.static_l_desc=new De(De.static_ltree,se.extra_lbits,ur+1,Hi,Fn);De.static_d_desc=new De(De.static_dtree,se.extra_dbits,0,mi,Fn);De.static_bl_desc=new De(null,se.extra_blbits,0,pi,pc);const Sc=9,Ec=8;function at(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const Wa=0,sr=1,Zt=2,Je=[new at(0,0,0,0,Wa),new at(4,4,8,4,sr),new at(4,5,16,8,sr),new at(4,6,32,32,sr),new at(4,4,16,16,Zt),new at(8,16,32,32,Zt),new at(8,16,128,128,Zt),new at(8,32,128,256,Zt),new at(32,128,258,1024,Zt),new at(32,258,258,4096,Zt)],$n=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ge=0,Kn=1,vn=2,Xn=3,Dc=32,Kr=42,Jn=113,kn=666,Xr=8,Tc=0,Jr=1,Oc=2,ce=3,ar=258,Ye=ar+ce+1;function Ps(e,t,n,r){const i=e[t*2],s=e[n*2];return i=3&&j[se.bl_order[T]*2+1]===0;T--);return e.opt_len+=3*(T+1)+5+5+4,T}function Ve(T){e.pending_buf[e.pending++]=T}function Tt(T){Ve(T&255),Ve(T>>>8&255)}function xn(T){Ve(T>>8&255),Ve(T&255&255)}function Ee(T,R){let A;const I=R;ge>$r-I?(A=T,ue|=A<>>$r-ge,ge+=I-$r):(ue|=T<=8&&(Ve(ue&255),ue>>>=8,ge-=8)}function sc(){Ee(Jr<<1,3),Ue(bn,De.static_ltree),Ss(),1+Se+10-ge<9&&(Ee(Jr<<1,3),Ue(bn,De.static_ltree),Ss()),Se=7}function yn(T,R){let A,I,P;if(e.dist_buf[V]=T,e.lc_buf[V]=R&255,V++,T===0?N[R*2]++:(Z++,T--,N[(se._length_code[R]+ur+1)*2]++,Y[se.d_code(T)*2]++),(V&8191)===0&&O>2){for(A=V*8,I=g-m,P=0;P>>=3,Z8?Tt(ue):ge>0&&Ve(ue&255),ue=0,ge=0}function ac(T,R,A){Ds(),Se=8,A&&(Tt(R),Tt(~R)),e.pending_buf.set(l.subarray(T,T+R),e.pending),e.pending+=R}function Ts(T,R,A){Ee((Tc<<1)+(A?1:0),3),ac(T,R,!0)}function oc(T,R,A){let I,P,G=0;O>0?(q.build_tree(e),we.build_tree(e),G=gn(),I=e.opt_len+3+7>>>3,P=e.static_len+3+7>>>3,P<=I&&(I=P)):I=P=R+5,R+4<=I&&T!=-1?Ts(T,R,A):P==I?(Ee((Jr<<1)+(A?1:0),3),Es(De.static_ltree,De.static_dtree)):(Ee((Oc<<1)+(A?1:0),3),ic(q.max_code+1,we.max_code+1,G+1),Es(N,Y)),Dt(),A&&Ds()}function Ot(T){oc(m>=0?m:-1,g-m,T),m=g,t.flush_pending()}function qr(){let T,R,A,I;do{if(I=f-x-g,I===0&&g===0&&x===0)I=s;else if(I==-1)I--;else if(g>=s+s-Ye){l.set(l.subarray(s,s+s),0),y-=s,g-=s,m-=s,T=w,A=T;do R=u[--A]&65535,u[A]=R>=s?R-s:0;while(--T!==0);T=s,A=T;do R=d[--A]&65535,d[A]=R>=s?R-s:0;while(--T!==0);I+=s}if(t.avail_in===0)return;T=t.read_buf(l,g+x,I),x+=T,x>=ce&&(p=l[g]&255,p=(p<r-5&&(R=r-5);;){if(x<=1){if(qr(),x===0&&T==rn)return Ge;if(x===0)break}if(g+=x,x=0,A=m+R,(g===0||g>=A)&&(x=g-A,g=A,Ot(!1),t.avail_out===0)||g-m>=s-Ye&&(Ot(!1),t.avail_out===0))return Ge}return Ot(T==Le),t.avail_out===0?T==Le?vn:Ge:T==Le?Xn:Kn}function Os(T){let R=k,A=g,I,P,G=E;const K=g>s-Ye?g-(s-Ye):0;let Me=B;const Xe=o,zr=g+ar;let As=l[A+G-1],Rs=l[A+G];E>=F&&(R>>=2),Me>x&&(Me=x);do if(I=T,!(l[I+G]!=Rs||l[I+G-1]!=As||l[I]!=l[A]||l[++I]!=l[A+1])){A+=2,I++;do;while(l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&AG){if(y=T,G=P,P>=Me)break;As=l[A+G-1],Rs=l[A+G]}}while((T=d[T&Xe]&65535)>K&&--R!==0);return G<=x?G:x}function cc(T){let R=0,A;for(;;){if(x=ce&&(p=(p<=ce)if(A=yn(g-y,_-ce),x-=_,_<=S&&x>=ce){_--;do g++,p=(p<=ce&&(p=(p<4096)&&(_=ce-1)),E>=ce&&_<=E){I=g+x-ce,A=yn(g-1-b,E-ce),x-=E-1,E-=2;do++g<=I&&(p=(p<Sc||I!=Xr||A<9||A>15||R<0||R>9||G<0||G>qn?et:(T.dstate=e,a=A,s=1<9||A<0||A>qn?et:(Je[O].func!=Je[R].func&&T.total_in!==0&&(I=T.deflate(Cs)),O!=R&&(O=R,S=Je[O].max_lazy,F=Je[O].good_length,B=Je[O].nice_length,k=Je[O].max_chain),U=A,I)},e.deflateSetDictionary=function(T,R,A){let I=A,P,G=0;if(!R||n!=Kr)return et;if(Is-Ye&&(I=s-Ye,G=A-I),l.set(R.subarray(G,G+I),0),g=I,m=I,p=l[0]&255,p=(p<Le||R<0)return et;if(!T.next_out||!T.next_in&&T.avail_in!==0||n==kn&&R!=Le)return T.msg=$n[zn-et],et;if(T.avail_out===0)return T.msg=$n[zn-Qt],Qt;if(t=T,G=i,i=R,n==Kr&&(I=Xr+(a-8<<4)<<8,P=(O-1&255)>>1,P>3&&(P=3),I|=P<<6,g!==0&&(I|=Dc),I+=31-I%31,n=Jn,xn(I)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,Qe}else if(t.avail_in===0&&R<=G&&R!=Le)return t.msg=$n[zn-Qt],Qt;if(n==kn&&t.avail_in!==0)return T.msg=$n[zn-Qt],Qt;if(t.avail_in!==0||x!==0||R!=rn&&n!=kn){switch(K=-1,Je[O].func){case Wa:K=lc(R);break;case sr:K=cc(R);break;case Zt:K=dc(R);break}if((K==vn||K==Xn)&&(n=kn),K==Ge||K==vn)return t.avail_out===0&&(i=-1),Qe;if(K==Kn){if(R==Cs)sc();else if(Ts(0,0,!1),R==gc)for(A=0;An&&(i=n),i===0?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Rc(e){const t=this,n=new Ha,r=Mc(e&&e.chunkSize?e.chunkSize:64*1024),i=rn,s=new Uint8Array(r);let a=e?e.level:hr;typeof a>"u"&&(a=hr),n.deflateInit(a),n.next_out=s,t.append=function(o,l){let f,d,u=0,p=0,w=0;const D=[];if(!!o.length){n.next_in_index=0,n.next_in=o,n.avail_in=o.length;do{if(n.next_out_index=0,n.avail_out=r,f=n.deflate(i),f!=Qe)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?D.push(new Uint8Array(s)):D.push(s.slice(0,n.next_out_index))),w+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=u&&(l(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return D.length>1?(d=new Uint8Array(w),D.forEach(function(h){d.set(h,p),p+=h.length})):d=D[0]||new Uint8Array,d}},t.flush=function(){let o,l,f=0,d=0;const u=[];do{if(n.next_out_index=0,n.avail_out=r,o=n.deflate(Le),o!=Ya&&o!=Qe)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&u.push(s.slice(0,n.next_out_index)),d+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),l=new Uint8Array(d),u.forEach(function(p){l.set(p,f),f+=p.length}),l}}function Mc(e){return e+5*(Math.floor(e/16383)+1)}const Ic=15,J=0,xt=1,Fc=2,Ne=-2,ae=-3,Us=-4,yt=-5,We=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ja=1440,Lc=0,Cc=4,Nc=9,Pc=5,Uc=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Yc=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Wc=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Hc=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],jc=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Bc=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],At=15;function _i(){const e=this;let t,n,r,i,s,a;function o(f,d,u,p,w,D,h,c,m,_,b){let v,g,y,x,E,k,S,O,U,F,B,N,Y,j,q;F=0,E=u;do r[f[d+F]]++,F++,E--;while(E!==0);if(r[0]==u)return h[0]=-1,c[0]=0,J;for(O=c[0],k=1;k<=At&&r[k]===0;k++);for(S=k,OE&&(O=E),c[0]=O,j=1<N+O;){if(x++,N+=O,q=y-N,q=q>O?O:q,(g=1<<(k=S-N))>v+1&&(g-=v+1,Y=S,kja)return ae;s[x]=B=_[0],_[0]+=q,x!==0?(a[x]=E,i[0]=k,i[1]=O,k=E>>>N-O,i[2]=B-s[x-1]-k,m.set(i,(s[x-1]+k)*3)):h[0]=B}for(i[1]=S-N,F>=u?i[0]=128+64:b[F]>>N;k>>=1)E^=k;for(E^=k,U=(1<257?(_==ae?m.msg="oversubscribed distance tree":_==yt?(m.msg="incomplete distance tree",_=ae):_!=Us&&(m.msg="empty distance tree with lengths",_=ae),_):J)}}_i.inflate_trees_fixed=function(e,t,n,r){return e[0]=Nc,t[0]=Pc,n[0]=Uc,r[0]=Yc,J};const Qn=0,Ys=1,Ws=2,Hs=3,js=4,Bs=5,Vs=6,Qr=7,Gs=8,er=9;function Vc(){const e=this;let t,n=0,r,i=0,s=0,a=0,o=0,l=0,f=0,d=0,u,p=0,w,D=0;function h(c,m,_,b,v,g,y,x){let E,k,S,O,U,F,B,N,Y,j,q,we,W,he,V,Z;B=x.next_in_index,N=x.avail_in,U=y.bitb,F=y.bitk,Y=y.write,j=Y>=k[Z+1],F-=k[Z+1],y.win[Y++]=k[Z+2],j--;continue}do{if(U>>=k[Z+1],F-=k[Z+1],(O&16)!==0){for(O&=15,W=k[Z+2]+(U&We[O]),U>>=O,F-=O;F<15;)N--,U|=(x.read_byte(B++)&255)<>=k[Z+1],F-=k[Z+1],(O&16)!==0){for(O&=15;F>=O,F-=O,j-=W,Y>=he)V=Y-he,Y-V>0&&2>Y-V?(y.win[Y++]=y.win[V++],y.win[Y++]=y.win[V++],W-=2):(y.win.set(y.win.subarray(V,V+2),Y),Y+=2,V+=2,W-=2);else{V=Y-he;do V+=y.end;while(V<0);if(O=y.end-V,W>O){if(W-=O,Y-V>0&&O>Y-V)do y.win[Y++]=y.win[V++];while(--O!==0);else y.win.set(y.win.subarray(V,V+O),Y),Y+=O,V+=O,O=0;V=0}}if(Y-V>0&&W>Y-V)do y.win[Y++]=y.win[V++];while(--W!==0);else y.win.set(y.win.subarray(V,V+W),Y),Y+=W,V+=W,W=0;break}else if((O&64)===0)E+=k[Z+2],E+=U&We[O],Z=(S+E)*3,O=k[Z];else return x.msg="invalid distance code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae;while(!0);break}if((O&64)===0){if(E+=k[Z+2],E+=U&We[O],Z=(S+E)*3,(O=k[Z])===0){U>>=k[Z+1],F-=k[Z+1],y.win[Y++]=k[Z+2],j--;break}}else return(O&32)!==0?(W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,xt):(x.msg="invalid literal/length code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae)}while(!0)}while(j>=258&&N>=10);return W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,J}e.init=function(c,m,_,b,v,g){t=Qn,f=c,d=m,u=_,p=b,w=v,D=g,r=null},e.proc=function(c,m,_){let b,v,g,y=0,x=0,E=0,k,S,O,U;for(E=m.next_in_index,k=m.avail_in,y=c.bitb,x=c.bitk,S=c.write,O=S=258&&k>=10&&(c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,_=h(f,d,u,p,w,D,c,m),E=m.next_in_index,k=m.avail_in,y=c.bitb,x=c.bitk,S=c.write,O=S>>=r[v+1],x-=r[v+1],g=r[v],g===0){a=r[v+2],t=Vs;break}if((g&16)!==0){o=g&15,n=r[v+2],t=Ws;break}if((g&64)===0){s=g,i=v/3+r[v+2];break}if((g&32)!==0){t=Qr;break}return t=er,m.msg="invalid literal/length code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,c.inflate_flush(m,_);case Ws:for(b=o;x>=b,x-=b,s=d,r=w,i=D,t=Hs;case Hs:for(b=s;x>=r[v+1],x-=r[v+1],g=r[v],(g&16)!==0){o=g&15,l=r[v+2],t=js;break}if((g&64)===0){s=g,i=v/3+r[v+2];break}return t=er,m.msg="invalid distance code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,c.inflate_flush(m,_);case js:for(b=o;x>=b,x-=b,t=Bs;case Bs:for(U=S-l;U<0;)U+=c.end;for(;n!==0;){if(O===0&&(S==c.end&&c.read!==0&&(S=0,O=S7&&(x-=8,k++,E--),c.write=S,_=c.inflate_flush(m,_),S=c.write,O=Sh.avail_out&&(m=h.avail_out),m!==0&&c==yt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m,b==n.end&&(b=0,n.write==n.end&&(n.write=0),m=n.write-b,m>h.avail_out&&(m=h.avail_out),m!==0&&c==yt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m),h.next_out_index=_,n.read=b,c},n.proc=function(h,c){let m,_,b,v,g,y,x,E;for(v=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y>>1){case 0:_>>>=3,b-=3,m=b&7,_>>>=m,b-=m,r=ei;break;case 1:k=[],S=[],O=[[]],U=[[]],_i.inflate_trees_fixed(k,S,O,U),d.init(k[0],S[0],O[0],0,U[0],0),_>>>=3,b-=3,r=tr;break;case 2:_>>>=3,b-=3,r=zs;break;case 3:return _>>>=3,b-=3,r=Bt,h.msg="invalid block type",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c)}break;case ei:for(;b<32;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(v++)&255)<>>16&65535)!=(_&65535))return r=Bt,h.msg="invalid stored block lengths",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);i=_&65535,_=b=0,r=i!==0?qs:u!==0?nr:en;break;case qs:if(g===0||x===0&&(y==n.end&&n.read!==0&&(y=0,x=yg&&(m=g),m>x&&(m=x),n.win.set(h.read_buf(v,m),y),v+=m,g-=m,y+=m,x-=m,(i-=m)!==0)break;r=u!==0?nr:en;break;case zs:for(;b<14;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(v++)&255)<29||(m>>5&31)>29)return r=Bt,h.msg="too many length or distance symbols",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);if(m=258+(m&31)+(m>>5&31),!o||o.length>>=14,b-=14,a=0,r=$s;case $s:for(;a<4+(s>>>10);){for(;b<3;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(v++)&255)<>>=3,b-=3}for(;a<19;)o[Zs[a++]]=0;if(l[0]=7,m=D.inflate_trees_bits(o,l,f,p,h),m!=J)return c=m,c==ae&&(o=null,r=Bt),n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);a=0,r=Ks;case Ks:for(;m=s,!(a>=258+(m&31)+(m>>5&31));){let j,q;for(m=l[0];b>>=m,b-=m,o[a++]=q;else{for(E=q==18?7:q-14,j=q==18?11:3;b>>=m,b-=m,j+=_&We[E],_>>>=E,b-=E,E=a,m=s,E+j>258+(m&31)+(m>>5&31)||q==16&&E<1)return o=null,r=Bt,h.msg="invalid bit length repeat",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);q=q==16?o[E-1]:0;do o[E++]=q;while(--j!==0);a=E}}if(f[0]=-1,F=[],B=[],N=[],Y=[],F[0]=9,B[0]=6,m=s,m=D.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),o,F,B,N,Y,p,h),m!=J)return m==ae&&(o=null,r=Bt),c=m,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);d.init(F[0],B[0],p,N[0],p,Y[0]),r=tr;case tr:if(n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,(c=d.proc(n,h,c))!=xt)return n.inflate_flush(h,c);if(c=J,d.free(h),v=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y15?(e.inflateEnd(n),Ne):(e.wbits=r,n.istate.blocks=new Gc(n,1<>4)+8>a.wbits){a.mode=Rt,n.msg="invalid win size",a.marker=5;break}a.mode=Js;case Js:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,s=n.read_byte(n.next_in_index++)&255,((a.method<<8)+s)%31!==0){a.mode=Rt,n.msg="incorrect header check",a.marker=5;break}if((s&Zc)===0){a.mode=Sn;break}a.mode=Qs;case Qs:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,a.mode=ea;case ea:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,a.mode=ta;case ta:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,a.mode=na;case na:return n.avail_in===0?i:(i=r,n.avail_in--,n.total_in++,a.need+=n.read_byte(n.next_in_index++)&255,a.mode=ti,Fc);case ti:return a.mode=Rt,n.msg="need dictionary",a.marker=0,Ne;case Sn:if(i=a.blocks.proc(n,i),i==ae){a.mode=Rt,a.marker=0;break}if(i==J&&(i=r),i!=xt)return i;i=r,a.blocks.reset(n,a.was),a.mode=ra;case ra:return n.avail_in=0,xt;case Rt:return ae;default:return Ne}},e.inflateSetDictionary=function(n,r,i){let s=0,a=i;if(!n||!n.istate||n.istate.mode!=ti)return Ne;const o=n.istate;return a>=1<0&&n.next_in_index!=p&&(l(n.next_in_index),p=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return f.length>1?(u=new Uint8Array(D),f.forEach(function(h){u.set(h,w),w+=h.length})):u=f[0]||new Uint8Array,u}},t.flush=function(){n.inflateEnd()}}const pe=4294967295,ke=65535,wi=8,Va=0,Ga=99,Za=67324752,ji=134695760,Jc=ji,gi=33639248,qa=101010256,xi=101075792,za=117853008,an=22,An=20,Rn=56,Qc=an+An+Rn,$a=1,Ka=39169,Xa=10,Ja=1,Bi=21589,ed=28789,td=25461,yi=1,nd=6,bi=8,vi=2048,ki=16,rd=20,ia=45,sa=51,or="/",aa=new Date(2107,11,31),oa=new Date(1980,0,1),fe=void 0,mr="undefined",Qa="function";class la{constructor(t){return class extends TransformStream{constructor(n,r){const i=new t(r);super({transform(s,a){a.enqueue(i.append(s))},flush(s){const a=i.flush();a&&s.enqueue(a)}})}}}}const id=64;let eo=2;try{typeof navigator!=mr&&navigator.hardwareConcurrency&&(eo=navigator.hardwareConcurrency)}catch{}const sd={chunkSize:512*1024,maxWorkers:eo,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:fe,CompressionStreamNative:typeof CompressionStream!=mr&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=mr&&DecompressionStream},Ft=Object.assign({},sd);function Vi(){return Ft}function to(e){return Math.max(e.chunkSize,id)}function Gi(e){const{baseURL:t,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:i,useCompressionStream:s,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:f,DecompressionStream:d,workerScripts:u}=e;if(Mt("baseURL",t),Mt("chunkSize",n),Mt("maxWorkers",r),Mt("terminateWorkerTimeout",i),Mt("useCompressionStream",s),Mt("useWebWorkers",a),o&&(Ft.CompressionStream=new la(o)),l&&(Ft.DecompressionStream=new la(l)),Mt("CompressionStream",f),Mt("DecompressionStream",d),u!==fe){const{deflate:p,inflate:w}=u;if((p||w)&&(Ft.workerScripts||(Ft.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");Ft.workerScripts.deflate=p}if(w){if(!Array.isArray(w))throw new Error("workerScripts.inflate must be an array");Ft.workerScripts.inflate=w}}}function Mt(e,t){t!==fe&&(Ft[e]=t)}const En={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin",cap:["cap","pcap"],"cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",javascript:"js",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":"odm","vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-debian-package":["deb","udeb"],"x-director":["dcr","dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-koan":["skp","skd","skt","skm"],"x-kpresenter":["kpr","kpt"],"x-kword":["kwd","kwt"],"x-latex":"latex","x-lha":"lha","x-lyx":"lyx","x-lzh":"lzh","x-lzx":"lzx","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-ms-wmd":"wmd","x-ms-wmz":"wmz","x-msdos-program":["com","exe","bat","dll"],"x-msi":"msi","x-netcdf":["nc","cdf"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":"rpm","x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tcl":"tcl","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-troff":["t","tr","roff"],"x-troff-man":"man","x-troff-me":"me","x-troff-ms":"ms","x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix",json:"json","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":"mathml",mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","x-msdownload":["exe","dll","com","bat","msi"],"x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tads":"gam","x-tex":"tex","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-compressed":"tgz","x-gzip":"gz","x-perfmon":["pma","pmc","pml","pmr","pmw"],"x-pkcs7-mime":["p7c","p7m"],"ynd.ms-pkipko":"pko"},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":["aif","aiff","aifc"],"x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2","x-wav":"wav",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":["mmd","mmod"],"x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":["sd","sdf"],"x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","mpc","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":["val","aso"],"x-pdb":["pdb","ent"],"x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-photoshop":"psd","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",pipeg:"jfif"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":["x3d","x3dz"],"x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:["tm","ts"],"tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{avif:".avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","vrml","wrl","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const t in En)if(En.hasOwnProperty(t)){for(const n in En[t])if(En[t].hasOwnProperty(n)){const r=En[t][n];if(typeof r=="string")e[r]=t+"/"+n;else for(let i=0;i>>1^3988292384:t=t>>>1;no[e]=t}class pr{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let r=0,i=t.length|0;r>>8^no[(n^t[r])&255];this.crc=n}get(){return~this.crc}}class ro extends TransformStream{constructor(){const t=new pr;super({transform(n){t.append(n)},flush(n){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t.get()),n.enqueue(r)}})}}function Si(e){if(typeof TextEncoder>"u"){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n0&&t&&(e[n-1]=Fe.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let a=0;a>>t),n=e[a]<<32-t;const i=e.length?e[e.length-1]:0,s=Fe.getPartial(i);return r.push(Fe.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},_r={bytes:{fromBits(e){const n=Fe.bitLength(e)/8,r=new Uint8Array(n);let i;for(let s=0;s>>24,i<<=8;return r},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let o=t.blockSize+r-(t.blockSize+r&t.blockSize-1);o<=i;o+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=Fe.concat(t,[Fe.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r},_S(e,t){return t<>>32-e},_block(e){const t=this,n=t._h,r=Array(80);for(let f=0;f<16;f++)r[f]=e[f];let i=n[0],s=n[1],a=n[2],o=n[3],l=n[4];for(let f=0;f<=79;f++){f>=16&&(r[f]=t._S(1,r[f-3]^r[f-8]^r[f-14]^r[f-16]));const d=t._S(5,i)+t._f(f,s,a,o)+l+r[f]+t._key[Math.floor(f/20)]|0;l=o,o=a,a=t._S(30,s),s=i,i=d}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+l|0}};const io={};io.aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,o,l=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;s<4*i+28;s++){let f=a[s-1];(s%i===0||i===8&&s%i===4)&&(f=n[f>>>24]<<24^n[f>>16&255]<<16^n[f>>8&255]<<8^n[f&255],s%i===0&&(f=f<<8^f>>>24^l<<24,l=l<<1^(l>>7)*283)),a[s]=a[s-i]^f}for(let f=0;s;f++,s--){const d=a[f&3?s:s-4];s<=4||f<4?o[f]=d:o[f]=r[0][n[d>>>24]]^r[1][n[d>>16&255]]^r[2][n[d>>8&255]]^r[3][n[d&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,o,l,f;for(let d=0;d<256;d++)s[(i[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let u=a^a<<1^a<<2^a<<3^a<<4;u=u>>8^u&255^99,n[d]=u,r[u]=d,f=i[l=i[o=i[d]]];let p=f*16843009^l*65537^o*257^d*16843008,w=i[u]*257^u*16843008;for(let D=0;D<4;D++)e[D][d]=w=w<<24^w>>>8,t[D][u]=p=p<<24^p>>>8}for(let d=0;d<5;d++)e[d]=e[d].slice(0),t[d]=t[d].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],l=s[2],f=s[3],d=s[4];let u=e[0]^n[0],p=e[t?3:1]^n[1],w=e[2]^n[2],D=e[t?1:3]^n[3],h=4,c,m,_;for(let b=0;b>>24]^o[p>>16&255]^l[w>>8&255]^f[D&255]^n[h],m=a[p>>>24]^o[w>>16&255]^l[D>>8&255]^f[u&255]^n[h+1],_=a[w>>>24]^o[D>>16&255]^l[u>>8&255]^f[p&255]^n[h+2],D=a[D>>>24]^o[u>>16&255]^l[p>>8&255]^f[w&255]^n[h+3],h+=4,u=c,p=m,w=_;for(let b=0;b<4;b++)i[t?3&-b:b]=d[u>>>24]<<24^d[p>>16&255]<<16^d[w>>8&255]<<8^d[D&255]^n[h++],c=u,u=p,p=w,w=D,D=c;return i}};const ad={getRandomValues(e){const t=new Uint32Array(e.buffer),n=r=>{let i=987654321;const s=4294967295;return function(){return i=36969*(i&65535)+(i>>16)&s,r=18e3*(r&65535)+(r>>16)&s,(((i<<16)+r&s)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r>24&255)===255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=Fe.bitLength(t);for(let s=0;s>5)+1<<2;let s,a,o,l,f;const d=new ArrayBuffer(i),u=new DataView(d);let p=0;const w=Fe;for(t=_r.bytes.toBits(t),f=1;p<(i||1);f++){for(s=a=e.encrypt(w.concat(t,[f])),o=1;oi&&(e=n.hash(e));for(let s=0;sthis.resolveReady=i),password:t,signed:n,strength:r-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;o?(await bd(a,l,o,qe(i,0,Ln[l]+2)),i=qe(i,Ln[l]+2),f()):await d;const u=new Uint8Array(i.length-It-(i.length-It)%on);s.enqueue(po(a,i,u,0,It,!0))},async flush(i){const{signed:s,ctr:a,hmac:o,pending:l,ready:f}=this;await f;const d=qe(l,0,l.length-It),u=qe(l,l.length-It);let p=new Uint8Array;if(d.length){const w=Nn(lt,d);o.update(w);const D=a.update(w);p=Cn(lt,D)}if(s){const w=qe(Cn(lt,o.digest()),0,It);for(let D=0;Dthis.resolveReady=i),password:t,strength:n-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;let u=new Uint8Array;o?(u=await vd(a,l,o),f()):await d;const p=new Uint8Array(u.length+i.length-i.length%on);p.set(u,0),s.enqueue(po(a,i,p,u.length,0))},async flush(i){const{ctr:s,hmac:a,pending:o,ready:l}=this;await l;let f=new Uint8Array;if(o.length){const d=s.update(Nn(lt,o));a.update(d),f=Cn(lt,d)}r.signature=Cn(lt,a.digest()).slice(0,It),i.enqueue(qi(f,r.signature))}}),r=this}}function po(e,t,n,r,i,s){const{ctr:a,hmac:o,pending:l}=e,f=t.length-i;l.length&&(t=qi(l,t),n=Ed(n,f-f%on));let d;for(d=0;d<=f-on;d+=on){const u=Nn(lt,qe(t,d,d+on));s&&o.update(u);const p=a.update(u);s||o.update(p),n.set(Cn(lt,p),d+r)}return e.pending=qe(t,d),n}async function bd(e,t,n,r){const i=await _o(e,t,n,qe(r,0,Ln[t])),s=qe(r,Ln[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new Error(ao)}async function vd(e,t,n){const r=lo(new Uint8Array(Ln[t])),i=await _o(e,t,n,r);return qi(r,i)}async function _o(e,t,n,r){e.password=null;const i=Si(n),s=await kd(ld,i,fd,!1,ud),a=await Sd(Object.assign({salt:r},fo),s,8*(Dn[t]*2+2)),o=new Uint8Array(a),l=Nn(lt,qe(o,0,Dn[t])),f=Nn(lt,qe(o,Dn[t],Dn[t]*2)),d=qe(o,Dn[t]*2);return Object.assign(e,{keys:{key:l,authentication:f,passwordVerification:d},ctr:new wd(new _d(l),Array.from(hd)),hmac:new gd(f)}),d}function kd(e,t,n,r,i){return md?Hn.importKey(e,t,n,r,i):Wn.importKey(t)}async function Sd(e,t,n){return pd?await Hn.deriveBits(e,t,n):Wn.pbkdf2(t,e.salt,fo.iterations,n)}function qi(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Ed(e,t){if(t&&t>e.length){const n=e;e=new Uint8Array(t),e.set(n,0)}return e}function qe(e,t,n){return e.subarray(t,n)}function Cn(e,t){return e.fromBits(t)}function Nn(e,t){return e.toBits(t)}const cn=12;class Dd extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),wo(this,t)},transform(r,i){const s=this;if(s.password){const a=ca(s,r.subarray(0,cn));if(s.password=null,a[cn-1]!=s.passwordVerification)throw new Error(ao);r=r.subarray(cn)}i.enqueue(ca(s,r))}})}}class Td extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),wo(this,t)},transform(r,i){const s=this;let a,o;if(s.password){s.password=null;const l=lo(new Uint8Array(cn));l[cn-1]=s.passwordVerification,a=new Uint8Array(r.length+l.length),a.set(da(s,l),0),o=cn}else a=new Uint8Array(r.length),o=0;a.set(da(s,r),o),i.enqueue(a)}})}}function ca(e,t){const n=new Uint8Array(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function go(e){const t=e.keys[2]|2;return xo(Math.imul(t,t^1)>>>8)}function xo(e){return e&255}function fa(e){return e&4294967295}const ua="deflate-raw";class Od extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:r,CompressionStreamNative:i}){super({});const{compressed:s,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:f,level:d}=t,u=this;let p,w,D=yo(super.readable);(!a||l)&&f&&([D,p]=D.tee(),p=ct(p,new ro)),s&&(D=vo(D,o,{level:d,chunkSize:n},i,r)),a&&(l?D=ct(D,new Td(t)):(w=new yd(t),D=ct(D,w))),bo(u,D,async()=>{let h;a&&!l&&(h=w.signature),(!a||l)&&f&&(h=await p.getReader().read(),h=new DataView(h.value.buffer).getUint32(0)),u.signature=h})}}class Ad extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:r,DecompressionStreamNative:i}){super({});const{zipCrypto:s,encrypted:a,signed:o,signature:l,compressed:f,useCompressionStream:d}=t;let u,p,w=yo(super.readable);a&&(s?w=ct(w,new Dd(t)):(p=new xd(t),w=ct(w,p))),f&&(w=vo(w,d,{chunkSize:n},i,r)),(!a||s)&&o&&([w,u]=w.tee(),u=ct(u,new ro)),bo(this,w,async()=>{if((!a||s)&&o){const D=await u.getReader().read(),h=new DataView(D.value.buffer);if(l!=h.getUint32(0,!1))throw new Error(oo)}})}}function yo(e){return ct(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function bo(e,t,n){t=ct(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function vo(e,t,n,r,i){try{const s=t&&r?r:i;e=ct(e,new s(ua,n))}catch(s){if(t)e=ct(e,new i(ua,n));else throw s}return e}function ct(e,t){return e.pipeThrough(t)}const Rd="message",Md="start",Id="pull",ha="data",Fd="ack",Ld="close",ko="deflate",So="inflate";class Cd extends TransformStream{constructor(t,n){super({});const r=this,{codecType:i}=t;let s;i.startsWith(ko)?s=Od:i.startsWith(So)&&(s=Ad);let a=0;const o=new s(t,n),l=super.readable,f=new TransformStream({transform(d,u){d&&d.length&&(a+=d.length,u.enqueue(d))},flush(){const{signature:d}=o;Object.assign(r,{signature:d,size:a})}});Object.defineProperty(r,"readable",{get(){return l.pipeThrough(o).pipeThrough(f)}})}}const Nd=typeof Worker!=mr;class ni{constructor(t,{readable:n,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:f},d){const{signal:u}=a;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new Pd(n,a,s),{signal:u}),writable:r,options:Object.assign({},i),scripts:f,transferStreams:l,terminate(){const{worker:p,busy:w}=t;p&&!w&&(p.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,d(t)}}),(o&&Nd?Yd:Ud)(t,s)}}class Pd extends TransformStream{constructor(t,{onstart:n,onprogress:r,size:i,onend:s},{chunkSize:a}){let o=0;super({start(){n&&ri(n,i)},async transform(l,f){o+=l.length,r&&await ri(r,o,i),f.enqueue(l)},flush(){t.size=o,s&&ri(s,o)}},{highWaterMark:1,size:()=>a})}}async function ri(e,...t){try{await e(...t)}catch{}}function Ud(e,t){return{run:()=>Wd(e,t)}}function Yd(e,{baseURL:t,chunkSize:n}){return e.interface||Object.assign(e,{worker:Bd(e.scripts[0],t,e),interface:{run:()=>Hd(e,{chunkSize:n})}}),e.interface}async function Wd({options:e,readable:t,writable:n,onTaskFinished:r},i){const s=new Cd(e,i);try{await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,size:o}=s;return{signature:a,size:o}}finally{r()}}async function Hd(e,t){let n,r;const i=new Promise((p,w)=>{n=p,r=w});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});const{readable:s,options:a,scripts:o}=e,{writable:l,closed:f}=jd(e.writable);Ei({type:Md,scripts:o.slice(1),options:a,config:t,readable:s,writable:l},e)||Object.assign(e,{reader:s.getReader(),writer:l.getWriter()});const u=await i;try{await l.close()}catch{}return await f,u}function jd(e){const t=e.getWriter();let n;const r=new Promise(s=>n=s);return{writable:new WritableStream({async write(s){await t.ready,await t.write(s)},close(){t.releaseLock(),n()},abort(s){return t.abort(s)}}),closed:r}}let ma=!0,pa=!0;function Bd(e,t,n){const r={type:"module"};let i,s;typeof e==Qa&&(e=e());try{i=new URL(e,t)}catch{i=e}if(ma)try{s=new Worker(i)}catch{ma=!1,s=new Worker(i,r)}else s=new Worker(i,r);return s.addEventListener(Rd,a=>Vd(a,n)),s}function Ei(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:s,readable:a,writable:o}=e;const l=[];if(s){const{buffer:f,length:d}=s;d!=f.byteLength&&(s=new Uint8Array(s)),e.value=s.buffer,l.push(e.value)}if(i&&pa?(a&&l.push(a),o&&l.push(o)):e.readable=e.writable=null,l.length)try{return t.postMessage(e,l),!0}catch{pa=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(s){throw n&&n.releaseLock(),r(),s}}async function Vd({data:e},t){const{type:n,value:r,messageId:i,result:s,error:a}=e,{reader:o,writer:l,resolveResult:f,rejectResult:d,onTaskFinished:u}=t;try{if(a){const{message:w,stack:D,code:h,name:c}=a,m=new Error(w);Object.assign(m,{stack:D,code:h,name:c}),p(m)}else{if(n==Id){const{value:w,done:D}=await o.read();Ei({type:ha,value:w,done:D,messageId:i},t)}n==ha&&(await l.ready,await l.write(new Uint8Array(r)),Ei({type:Fd,messageId:i},t)),n==Ld&&p(null,s)}}catch(w){p(w)}function p(w,D){w?d(w):f(D),l&&l.releaseLock(),u()}}let Vt=[];const ii=[];let _a=0;async function Eo(e,t){const{options:n,config:r}=t,{transferStreams:i,useWebWorkers:s,useCompressionStream:a,codecType:o,compressed:l,signed:f,encrypted:d}=n,{workerScripts:u,maxWorkers:p,terminateWorkerTimeout:w}=r;t.transferStreams=i||i===fe;const D=!l&&!f&&!d&&!t.transferStreams;t.useWebWorkers=!D&&(s||s===fe&&r.useWebWorkers),t.scripts=t.useWebWorkers&&u?u[o]:[],n.useCompressionStream=a||a===fe&&r.useCompressionStream;let h;const c=Vt.find(_=>!_.busy);if(c)wa(c),h=new ni(c,e,t,m);else if(Vt.lengthii.push({resolve:_,stream:e,workerOptions:t}));return h.run();function m(_){if(ii.length){const[{resolve:b,stream:v,workerOptions:g}]=ii.splice(0,1);b(new ni(_,v,g,m))}else _.worker?(wa(_),Number.isFinite(w)&&w>=0&&(_.terminateTimeout=setTimeout(()=>{Vt=Vt.filter(b=>b!=_),_.terminate()},w))):Vt=Vt.filter(b=>b!=_)}}function wa(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function Gd(e){const t=()=>URL.createObjectURL(new Blob([`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:"PBKDF2"},B=t.assign({hash:{name:"HMAC"}},R),E=t.assign({iterations:1e3,hash:{name:"SHA-1"}},R),M=["deriveBits"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&"function"==typeof T.importKey,L=N&&W&&"function"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s("Invalid password")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s("Invalid signature")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey("raw",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s("Invalid password");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s("Invalid signature")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)("deflate-raw",n))}catch(r){if(!t)throw r;e=pe(e,new s("deflate-raw",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=le:s.startsWith("inflate")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:"pull",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:"data",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:"close",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&ke(e),"data"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe="oversubscribed dynamic bit lengths tree":-5!=a&&0!==r[0]||(f.Oe="incomplete dynamic bit lengths tree",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe="oversubscribed literal/length tree":-4!=h&&(w.Oe="incomplete literal/length tree",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe="oversubscribed distance tree":-5==h?(w.Oe="incomplete distance tree",h=-3):-4!=h&&(w.Oe="empty distance tree with lengths",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe="invalid distance code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe="invalid literal/length code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe="invalid literal/length code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe="invalid distance code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe="invalid block type",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe="invalid stored block lengths",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe="too many length or distance symbols",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe="invalid bit length repeat",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe="need dictionary",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye}; +`],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}const Do="HTTP error ",Rr="HTTP Range not supported",Zd="Writer iterator completed too soon",qd="text/plain",zd="Content-Length",$d="Content-Range",Kd="Accept-Ranges",Xd="Range",Jd="Content-Type",Qd="HEAD",$i="GET",To="bytes",ef=64*1024,Ki="writable";class Mr{constructor(){this.size=0}init(){this.initialized=!0}}class Yt extends Mr{get readable(){const t=this,{chunkSize:n=ef}=t,r=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:s=0,size:a,diskNumberStart:o}=r,{chunkOffset:l}=this;i.enqueue(await Ie(t,s+l,Math.min(n,a-l),o)),l+n>a?i.close():this.chunkOffset+=n}});return r}}class Oo extends Mr{constructor(){super();const t=this,n=new WritableStream({write(r){return t.writeUint8Array(r)}});Object.defineProperty(t,Ki,{get(){return n}})}writeUint8Array(){}}class Di extends Yt{constructor(t){super();let n=t.length;for(;t.charAt(n-1)=="=";)n--;const r=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:r,size:Math.floor((n-r)*.75)})}readUint8Array(t,n){const{dataStart:r,dataURI:i}=this,s=new Uint8Array(n),a=Math.floor(t/3)*4,o=atob(i.substring(a+r,Math.ceil((t+n)/3)*4+r)),l=t-Math.floor(a/4)*3;for(let f=l;f2?n.data+=btoa(i):n.pending=i}getData(){return this.data+btoa(this.pending)}}class mn extends Yt{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){const r=this;return new Uint8Array(await r.blob.slice(t,t+n).arrayBuffer())}}class $t extends Mr{constructor(t){super();const n=this,r=new TransformStream,i=[];t&&i.push([Jd,t]),Object.defineProperty(n,Ki,{get(){return r.writable}}),n.blob=new Response(r.readable,{headers:i}).blob()}getData(){return this.blob}}class Ao extends mn{constructor(t){super(new Blob([t],{type:qd}))}}class Ti extends $t{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:n}=this,r=await super.getData();if(r.text&&n)return r.text();{const i=new FileReader;return new Promise((s,a)=>{Object.assign(i,{onload:({target:o})=>s(o.result),onerror:()=>a(i.error)}),i.readAsText(r,t)})}}}class tf extends Yt{constructor(t,n){super(),Ro(this,t,n)}async init(){super.init(),await Mo(this,Oi,ga)}readUint8Array(t,n){return Io(this,t,n,Oi,ga)}}class nf extends Yt{constructor(t,n){super(),Ro(this,t,n)}async init(){super.init(),await Mo(this,Ai,xa)}readUint8Array(t,n){return Io(this,t,n,Ai,xa)}}function Ro(e,t,n){const{preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s}=n;n=Object.assign({},n),delete n.preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.useXHR,Object.assign(e,{url:t,options:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s})}async function Mo(e,t,n){const{url:r,useRangeHeader:i,forceRangeRequests:s}=e;if(sf(r)&&(i||s)){const{headers:a}=await t($i,e,Fo(e));if(!s&&a.get(Kd)!=To)throw new Error(Rr);{let o;const l=a.get($d);if(l){const f=l.trim().split(/\s*\/\s*/);if(f.length){const d=f[1];d&&d!="*"&&(o=Number(d))}}o===fe?await ya(e,t,n):e.size=o}}else await ya(e,t,n)}async function Io(e,t,n,r,i){const{data:s,useRangeHeader:a,forceRangeRequests:o,options:l}=e;if(a||o){const f=await r($i,e,Fo(e,t,n));if(f.status!=206)throw new Error(Rr);return new Uint8Array(await f.arrayBuffer())}else return s||await i(e,l),new Uint8Array(s.subarray(t,t+n))}function Fo(e,t=0,n=1){return Object.assign({},Xi(e),{[Xd]:To+"="+t+"-"+(t+n-1)})}function Xi({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function ga(e){await Lo(e,Oi)}async function xa(e){await Lo(e,Ai)}async function Lo(e,t){const n=await t($i,e,Xi(e));e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function ya(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t(Qd,e,Xi(e))).headers.get(zd);i?e.size=Number(i):await n(e,e.options)}}async function Oi(e,{options:t,url:n},r){const i=await fetch(n,Object.assign({},t,{method:e,headers:r}));if(i.status<400)return i;throw i.status==416?new Error(Rr):new Error(Do+(i.statusText||i.status))}function Ai(e,{url:t},n){return new Promise((r,i)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",()=>{if(s.status<400){const a=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(o=>{const l=o.trim().split(/\s*:\s*/);l[0]=l[0].trim().replace(/^[a-z]|-[a-z]/g,f=>f.toUpperCase()),a.push(l)}),r({status:s.status,arrayBuffer:()=>s.response,headers:new Map(a)})}else i(s.status==416?new Error(Rr):new Error(Do+(s.statusText||s.status)))},!1),s.addEventListener("error",a=>i(a.detail.error),!1),s.open(e,t),n)for(const a of Object.entries(n))s.setRequestHeader(a[0],a[1]);s.responseType="arraybuffer",s.send()})}class ba extends Yt{constructor(t,n={}){super(),Object.assign(this,{url:t,reader:n.useXHR?new nf(t,n):new tf(t,n)})}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(t,n){return this.reader.readUint8Array(t,n)}}class Ri extends Yt{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,n){return this.array.slice(t,t+n)}}class gr extends Oo{init(t=0){super.init(),Object.assign(this,{offset:0,array:new Uint8Array(t)})}writeUint8Array(t){const n=this;if(n.offset+t.length>n.array.length){const r=n.array;n.array=new Uint8Array(r.length+t.length),n.array.set(r)}n.array.set(t,n.offset),n.offset+=t.length}getData(){return this.array}}class rf extends Yt{constructor(t){super(),this.readers=t}async init(){super.init();const t=this,{readers:n}=t;t.lastDiskNumber=0,await Promise.all(n.map(async r=>{await r.init(),t.size+=r.size}))}async readUint8Array(t,n,r=0){const i=this,{readers:s}=this;let a,o=r;o==-1&&(o=s.length-1);let l=t;for(;l>=s[o].size;)l-=s[o].size,o++;const f=s[o],d=f.size;if(l+n<=d)a=await Ie(f,l,n);else{const u=d-l;a=new Uint8Array(n),a.set(await Ie(f,l,u)),a.set(await i.readUint8Array(t+u,n-u,r),u)}return i.lastDiskNumber=Math.max(o,i.lastDiskNumber),a}}class va extends Mr{constructor(t,n=4294967296){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,availableSize:n});let i,s,a;const o=new WritableStream({async write(d){if(a)if(i.size+d.length>=n){const u=n-i.size;await l(d.slice(0,u)),await f(),r.diskOffset+=i.size,r.diskNumber++,a=null,await this.write(d.slice(u))}else d.length&&await l(d),r.availableSize=n-i.size;else{const{value:u,done:p}=await t.next();if(p&&!u)throw new Error(Zd);i=u,i.size=0,s=u.writable,a=s.getWriter(),await this.write(d)}},async close(){await a.ready,await f()}});Object.defineProperty(r,Ki,{get(){return o}});async function l(d){await a.ready,await a.write(d),i.size+=d.length,r.size+=d.length}async function f(){s.size=i.size,await a.close()}}}function sf(e){const{baseURL:t}=Vi(),{protocol:n}=new URL(e,t);return n=="http:"||n=="https:"}async function ze(e,t){e.init&&!e.initialized&&await e.init(t)}function Ie(e,t,n,r){return e.readUint8Array(t,n,r)}const Co="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),af=Co.length==256;function of(e){if(af){let t="";for(let n=0;nthis[n]=t[n])}}const si="File format is not recognized",ff="End of central directory not found",uf="End of Zip64 central directory not found",hf="End of Zip64 central directory locator not found",mf="Central directory header not found",pf="Local file header not found",_f="Zip64 extra field not found",wf="File contains encrypted entry",gf="Encryption method not supported",ka="Compression method not supported",Sa="Split zip file",Ea="utf-8",Da="cp437",xf=[[Wo,pe],[Ho,pe],[jo,pe],[Ii,ke]],yf={[ke]:{getValue:_e,bytes:4},[pe]:{getValue:lr,bytes:8}};class bf{constructor(t,n={}){t instanceof ReadableStream&&(t={readable:t}),Object.assign(this,{reader:t,options:n,config:Vi()})}async*getEntriesGenerator(t={}){const n=this;let{reader:r}=n;const{config:i}=n;if(await ze(r),(r.size===fe||!r.readUint8Array)&&(Array.isArray(r)?r=new rf(r):r=new mn(await new Response(r.readable).blob()),await ze(r)),r.size=r.size)throw new Error(si);let _=0,b=await Ie(r,l,o,D),v=Te(b);if(o){const k=s.offset-o;if(_e(v,_)!=gi&&l!=k){const S=l;l=k,c=l-S,b=await Ie(r,l,o,D),v=Te(b)}}if(l<0||l>=r.size)throw new Error(si);const g=tt(n,t,"filenameEncoding"),y=tt(n,t,"commentEncoding");for(let k=0;kS.getData(ht,Wt,Ht),_=we;const{onprogress:Dt}=t;if(Dt)try{await Dt(k+1,h,new xr(S))}catch{}yield Wt}const x=tt(n,t,"extractPrependedData"),E=tt(n,t,"extractAppendedData");return x&&(n.prependedData=m>0?await Ie(r,0,m):new Uint8Array),n.comment=d?await Ie(r,f+an,d):new Uint8Array,E&&(n.appendedData=u>>8&255:p>>>24&255),signature:p,compressed:f!=0,encrypted:v,useWebWorkers:tt(i,r,"useWebWorkers"),useCompressionStream:tt(i,r,"useCompressionStream"),transferStreams:tt(i,r,"transferStreams")},config:d,streamOptions:{signal:S,size:E,onstart:O,onprogress:U,onend:F}};return k.size+=(await Eo({readable:x,writable:k},B)).size,tt(i,r,"preventClose")||await k.close(),t.getData?t.getData():k}}function zo(e,t,n){const r=e.rawBitFlag=be(t,n+2),i=(r&yi)==yi,s=_e(t,n+6);Object.assign(e,{encrypted:i,version:be(t,n),bitFlag:{level:(r&nd)>>1,dataDescriptor:(r&bi)==bi,languageEncodingFlag:(r&vi)==vi},rawLastModDate:s,lastModDate:Of(s),filenameLength:be(t,n+22),extraFieldLength:be(t,n+24)})}async function $o(e,t,n,r){const{rawExtraField:i}=t,s=t.extraField=new Map,a=Te(new Uint8Array(i));let o=0;try{for(;ot[i]==s);for(let i=0,s=0;i{if(e.data.length>=a+4){const f=_e(n,a);t[o]=e[o]=new Date(f*1e3);const d=s[l];e[d]=f}a+=4})}async function Tf(e,t,n,r,i){const s=new Uint8Array(4),a=Te(s);Af(a,0,t);const o=r+i;return await l(r)||await l(Math.min(o,n));async function l(f){const d=n-f,u=await Ie(e,d,f);for(let p=u.length-r;p>=0;p--)if(u[p]==s[0]&&u[p+1]==s[1]&&u[p+2]==s[2]&&u[p+3]==s[3])return{offset:d+p,buffer:u.slice(p,p+r).buffer}}}function tt(e,t,n){return t[n]===fe?e.options[n]:t[n]}function Of(e){const t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function ai(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function dn(e,t){return e.getUint8(t)}function be(e,t){return e.getUint16(t,!0)}function _e(e,t){return e.getUint32(t,!0)}function lr(e,t){return Number(e.getBigUint64(t,!0))}function Af(e,t,n){e.setUint32(t,n,!0)}function Te(e){return new DataView(e.buffer)}const Rf="File already exists",Mf="Zip file comment exceeds 64KB",If="File entry comment exceeds 64KB",Ff="File entry name exceeds 64KB",Oa="Version exceeds 65535",Lf="The strength must equal 1, 2, or 3",Cf="Extra field type exceeds 65535",Nf="Extra field data exceeds 64KB",ts="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Aa=new Uint8Array([7,0,2,0,65,69,3,0,0]),Ko=28;let oi=0;const Ra=[];class Pf{constructor(t,n={}){t.writable===fe&&typeof t.next==Qa&&(t=new va(t)),t instanceof WritableStream&&(t={writable:t}),t.writable.size===fe&&(t.writable.size=0);const r=t instanceof va;r||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0}),Object.assign(this,{writer:t,addSplitZipSignature:r,options:n,config:Vi(),files:new Map,filenames:new Set,offset:t.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set})}async add(t="",n,r={}){const i=this,{pendingAddFileCalls:s,config:a}=i;oiRa.push(l));let o;try{if(t=t.trim(),i.filenames.has(t))throw new Error(Rf);return i.filenames.add(t),o=Uf(i,t,n,r),s.add(o),await o}catch(l){throw i.filenames.delete(t),l}finally{s.delete(o);const l=Ra.shift();l?l():oi--}}async close(t=new Uint8Array,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:s}=i;for(;r.size;)await Promise.all(Array.from(r));return await Zf(this,t,n),!i.preventClose&&!n.preventClose&&await s.close(),i.getData?i.getData():s}}async function Uf(e,t,n,r){t=t.trim(),r.directory&&!t.endsWith(or)?t+=or:r.directory=t.endsWith(or);const i=Si(t);if(ee(i)>ke)throw new Error(Ff);const s=r.comment||"",a=Si(s);if(ee(a)>ke)throw new Error(If);const o=e.options.version||r.version||0;if(o>ke)throw new Error(Oa);const l=e.options.versionMadeBy||r.versionMadeBy||20;if(l>ke)throw new Error(Oa);const f=xe(e,r,Ji)||new Date,d=xe(e,r,Qi),u=xe(e,r,es),p=xe(e,r,"password"),w=xe(e,r,"encryptionStrength")||3,D=xe(e,r,"zipCrypto");if(p!==fe&&w!==fe&&(w<1||w>3))throw new Error(Lf);let h=new Uint8Array;const{extraField:c}=r;if(c){let he=0,V=0;c.forEach(Z=>he+=4+ee(Z)),h=new Uint8Array(he),c.forEach((Z,Se)=>{if(Se>ke)throw new Error(Cf);if(ee(Z)>ke)throw new Error(Nf);ve(h,new Uint16Array([Se]),V),ve(h,new Uint16Array([ee(Z)]),V+2),ve(h,Z,V+4),V+=4+ee(Z)})}let m=xe(e,r,"extendedTimestamp");m===fe&&(m=!0);let _=0,b=0,v=xe(e,r,"keepOrder");v===fe&&(v=!0);let g=0,y=xe(e,r,Zo);y===fe&&(y=!0);const x=xe(e,r,Vo)||0,E=xe(e,r,Go)||0;let k=xe(e,r,qo);n&&(n instanceof ReadableStream&&(n={readable:n}),await ze(n),n.size===fe?(r.dataDescriptor=!0,(k||k===fe)&&(k=!0,_=pe)):(g=n.size,_=zf(g)));const{diskOffset:S}=e.writer;if(e.offset+e.pendingEntriesSize-S>=pe||g>=pe||_>=pe){if(k===!1||!v)throw new Error(ts);k=!0}k=k||!1;const O=xe(e,r,"level"),U=xe(e,r,"useWebWorkers"),F=xe(e,r,"bufferedWrite");let B=xe(e,r,"dataDescriptor"),N=xe(e,r,"dataDescriptorSignature");const Y=xe(e,r,"signal"),j=xe(e,r,"useCompressionStream");B===fe&&(B=!0),B&&N===fe&&(N=!1),r=Object.assign({},r,{rawFilename:i,rawComment:a,version:o,versionMadeBy:l,lastModDate:f,lastAccessDate:d,creationDate:u,rawExtraField:h,zip64:k,password:p,level:O,useWebWorkers:U,encryptionStrength:w,extendedTimestamp:m,zipCrypto:D,bufferedWrite:F,keepOrder:v,dataDescriptor:B,dataDescriptorSignature:N,signal:Y,msDosCompatible:y,internalFileAttribute:x,externalFileAttribute:E,useCompressionStream:j});const q=Hf(r),we=jf(r);b=ee(q.localHeaderArray,we.dataDescriptorArray)+_,e.pendingEntriesSize+=b;let W;try{W=await Yf(e,t,n,{headerInfo:q,dataDescriptorInfo:we},r)}finally{e.pendingEntriesSize-=b}return Object.assign(W,{name:t,comment:s,extraField:c}),new xr(W)}async function Yf(e,t,n,r,i){const{files:s,writer:a}=e,{keepOrder:o,dataDescriptor:l,signal:f}=i,d=Array.from(s.values()).pop();let u={},p,w,D,h,c,m;s.set(t,u);try{let v;o&&(v=d&&d.lock,_()),i.bufferedWrite||e.lockWriter||!l?(m=new $t,m.writable.size=0,p=!0,await ze(a)):(m=a,e.lockWriter=Promise.resolve(),w=()=>delete e.lockWriter),await ze(m);const{writable:g,diskNumber:y}=a;let{diskOffset:x}=a;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const E=new Uint8Array(4),k=He(E);Q(k,0,ji),await Nt(g,E),e.offset+=4}if(p||await v,c=!0,u.diskNumberStart=y,u=await Wf(n,m,u,r,e.config,i),c=!1,s.set(t,u),u.filename=t,p){await m.writable.close();let E=await m.getData();await v,await b(),h=!0,l||(E=await Vf(u,E,g,i)),u.diskNumberStart=a.diskNumber,x=a.diskOffset,await E.stream().pipeTo(g,{preventClose:!0,signal:f}),g.size+=E.size,h=!1}if(u.offset=e.offset-x,u.zip64)Gf(u);else if(u.offset>=pe)throw new Error(ts);return e.offset+=u.length,u}catch(v){throw(p&&h||!p&&c)&&(e.hasCorruptedEntries=!0,v&&(v.corruptedEntry=!0),p?e.offset+=m.writable.size:e.offset=m.writable.size),s.delete(t),v}finally{D&&D(),w&&w()}function _(){u.lock=new Promise(v=>D=v)}async function b(){const{lockWriter:v}=e;if(v)return await v.then(()=>delete e.lockWriter),b();e.lockWriter=new Promise(g=>w=g)}}async function Wf(e,t,{diskNumberStart:n,lock:r},i,s,a){const{headerInfo:o,dataDescriptorInfo:l}=i,{localHeaderArray:f,headerArray:d,lastModDate:u,rawLastModDate:p,encrypted:w,compressed:D,version:h,compressionMethod:c,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b}=o,{dataDescriptorArray:v}=l,{rawFilename:g,lastAccessDate:y,creationDate:x,password:E,level:k,zip64:S,zipCrypto:O,dataDescriptor:U,directory:F,versionMadeBy:B,rawComment:N,rawExtraField:Y,useWebWorkers:j,onstart:q,onprogress:we,onend:W,signal:he,encryptionStrength:V,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,useCompressionStream:Wt}=a,Dt={lock:r,versionMadeBy:B,zip64:S,directory:Boolean(F),filenameUTF8:!0,rawFilename:g,commentUTF8:!0,rawComment:N,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b,rawExtraField:Y,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,diskNumberStart:n};let ht=0,Ht=0,gn;const{writable:Ve}=t;if(e){e.chunkSize=to(s),await Nt(Ve,f);const xn=e.readable,Ee=xn.size=e.size,Ue={options:{codecType:ko,level:k,password:E,encryptionStrength:V,zipCrypto:w&&O,passwordVerification:w&&O&&p>>8&255,signed:!0,compressed:D,encrypted:w,useWebWorkers:j,useCompressionStream:Wt,transferStreams:!1},config:s,streamOptions:{signal:he,size:Ee,onstart:q,onprogress:we,onend:W}},Jt=await Eo({readable:xn,writable:Ve},Ue);Ve.size+=Jt.size,gn=Jt.signature,Ht=e.size=xn.size,ht=Jt.size}else await Nt(Ve,f);const Tt=S?new Uint8Array(Ko+4):new Uint8Array;return e&&Bf({signature:gn,rawExtraFieldZip64:Tt,compressedSize:ht,uncompressedSize:Ht,headerInfo:o,dataDescriptorInfo:l},a),U&&await Nt(Ve,v),Object.assign(Dt,{compressedSize:ht,lastModDate:u,rawLastModDate:p,creationDate:x,lastAccessDate:y,encrypted:w,length:ee(f,v)+ht,compressionMethod:c,version:h,headerArray:d,signature:gn,rawExtraFieldZip64:Tt}),Dt}function Hf(e){const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,password:s,level:a,zip64:o,zipCrypto:l,dataDescriptor:f,directory:d,rawExtraField:u,encryptionStrength:p,extendedTimestamp:w}=e,D=a!==0&&!d,h=Boolean(s&&ee(s));let c;if(h&&!l){c=new Uint8Array(ee(Aa)+2);const N=He(c);re(N,0,Ka),ve(c,Aa,2),yr(N,8,p)}else c=new Uint8Array;let m,_;if(w){_=new Uint8Array(9+(r?4:0)+(i?4:0));const N=He(_);re(N,0,Bi),re(N,2,ee(_)-4);const Y=1+(r?2:0)+(i?4:0);yr(N,4,Y),Q(N,5,Math.floor(n.getTime()/1e3)),r&&Q(N,9,Math.floor(r.getTime()/1e3)),i&&Q(N,13,Math.floor(i.getTime()/1e3));try{m=new Uint8Array(36);const j=He(m),q=li(n);re(j,0,Xa),re(j,2,32),re(j,8,Ja),re(j,10,24),Pe(j,12,q),Pe(j,20,li(r)||q),Pe(j,28,li(i)||q)}catch{m=new Uint8Array}}else m=_=new Uint8Array;let b=vi;f&&(b=b|bi);let v=Va;D&&(v=wi);let g=e.version||rd;o&&(g=g>ia?g:ia),h&&(b=b|yi,l||(g=g>sa?g:sa,v=Ga,D&&(c[9]=wi)));const y=new Uint8Array(26),x=He(y);re(x,0,g),re(x,2,b),re(x,4,v);const E=new Uint32Array(1),k=He(E);let S;naa?S=aa:S=n,re(k,0,(S.getHours()<<6|S.getMinutes())<<5|S.getSeconds()/2),re(k,2,(S.getFullYear()-1980<<4|S.getMonth()+1)<<5|S.getDate());const O=E[0];Q(x,6,O),re(x,22,ee(t));const U=ee(c,_,m,u);re(x,24,U);const F=new Uint8Array(30+ee(t)+U),B=He(F);return Q(B,0,Za),ve(F,y,4),ve(F,t,30),ve(F,c,30+ee(t)),ve(F,_,30+ee(t,c)),ve(F,m,30+ee(t,c,_)),ve(F,u,30+ee(t,c,_,m)),{localHeaderArray:F,headerArray:y,headerView:x,lastModDate:n,rawLastModDate:O,encrypted:h,compressed:D,version:g,compressionMethod:v,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:m,rawExtraFieldAES:c}}function jf(e){const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i=new Uint8Array,s,a=0;return n&&(i=new Uint8Array(t?r?24:20:r?16:12),s=He(i),r&&(a=4,Q(s,0,Jc))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}}function Bf(e,t){const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:s,headerInfo:a,dataDescriptorInfo:o}=e,{headerView:l,encrypted:f}=a,{dataDescriptorView:d,dataDescriptorOffset:u}=o,{zip64:p,zipCrypto:w,dataDescriptor:D}=t;if((!f||w)&&n!==fe&&(Q(l,10,n),D&&Q(d,u,n)),p){const h=He(r);re(h,0,$a),re(h,2,Ko),Q(l,14,pe),Pe(h,12,BigInt(i)),Q(l,18,pe),Pe(h,4,BigInt(s)),D&&(Pe(d,u+4,BigInt(i)),Pe(d,u+12,BigInt(s)))}else Q(l,14,i),Q(l,18,s),D&&(Q(d,u+4,i),Q(d,u+8,s))}async function Vf(e,t,n,{zipCrypto:r}){const i=await qf(t,0,26),s=new DataView(i);return(!e.encrypted||r)&&Q(s,14,e.signature),e.zip64?(Q(s,18,pe),Q(s,22,pe)):(Q(s,18,e.compressedSize),Q(s,22,e.uncompressedSize)),await Nt(n,new Uint8Array(i)),t.slice(i.byteLength)}function Gf(e){const{rawExtraFieldZip64:t,offset:n,diskNumberStart:r}=e,i=He(t);Pe(i,20,BigInt(n)),Q(i,28,r)}async function Zf(e,t,n){const{files:r,writer:i}=e;let s=0,a=0;const{diskOffset:o,writable:l}=i;let{diskNumber:f}=i,d=e.offset-o,u=r.size;for(const[,{rawFilename:v,rawExtraFieldZip64:g,rawExtraFieldAES:y,rawExtraField:x,rawComment:E,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:S}]of r)a+=46+ee(v,E,g,y,k,S,x);let p=n.zip64||e.options.zip64||!1;if(d>=pe||a>=pe||u>=ke){if(n.zip64===!1||e.options.zip64===!1)throw new Error(ts);p=!0}const w=new Uint8Array(a),D=He(w);for(const[v,g]of Array.from(r.values()).entries()){const{offset:y,rawFilename:x,rawExtraFieldZip64:E,rawExtraFieldAES:k,rawExtraFieldNTFS:S,rawExtraField:O,rawComment:U,versionMadeBy:F,headerArray:B,directory:N,zip64:Y,msDosCompatible:j,internalFileAttribute:q,externalFileAttribute:we,extendedTimestamp:W,lastModDate:he,diskNumberStart:V}=g;let Z;if(W){Z=new Uint8Array(9);const ue=He(Z);re(ue,0,Bi),re(ue,2,ee(Z)-4),yr(ue,4,1),Q(ue,5,Math.floor(he.getTime()/1e3))}else Z=new Uint8Array;const Se=ee(E,k,Z,S,O);if(Q(D,s,gi),re(D,s+4,F),ve(w,B,s+6),re(D,s+30,Se),re(D,s+32,ee(U)),re(D,s+34,Y?ke:V),re(D,s+36,q),we?Q(D,s+38,we):N&&j&&yr(D,s+38,ki),Q(D,s+42,Y?pe:y),ve(w,x,s+46),ve(w,E,s+46+ee(x)),ve(w,k,s+46+ee(x,E)),ve(w,Z,s+46+ee(x,E,k)),ve(w,S,s+46+ee(x,E,k,Z)),ve(w,O,s+46+ee(x,E,k,Z,S)),ve(w,U,s+46+ee(x)+Se),s+=46+ee(x,U)+Se,n.onprogress)try{await n.onprogress(v+1,r.size,new xr(g))}catch{}}await ze(i),await Nt(l,w);const h=new Uint8Array(p?Qc:an),c=He(h);let m=i.diskNumber;const{availableSize:_}=i;_n&&(t+=n.length)),t}class Xo{constructor(t,n,r,i){const s=this;if(t.root&&i&&i.getChildByName(n))throw new Error("Entry filename already exists");r||(r={}),Object.assign(s,{fs:t,name:n,data:r.data,id:t.entries.length,parent:i,children:[],uncompressedSize:0}),t.entries.push(s),i&&s.parent.children.push(s)}moveTo(t){const n=this;n.fs.move(n,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){const n=this;let r=n.name,i=n.parent;for(;i&&i!=t;)r=(i.name?i.name+"/":"")+r,i=i.parent;return r}isDescendantOf(t){let n=this.parent;for(;n&&n.id!=t.id;)n=n.parent;return Boolean(n)}}class Jo extends Xo{constructor(t,n,r,i){super(t,n,r,i);const s=this;s.Reader=r.Reader,s.Writer=r.Writer,r.getData&&(s.getData=r.getData)}async getData(t,n={}){const r=this;if(!t||t.constructor==r.Writer&&r.data)return r.data;{const i=r.reader=new r.Reader(r.data,n);await Promise.all([ze(i),ze(t,r.data.uncompressedSize)]);const s=i.readable;return s.size=r.uncompressedSize=i.size,await s.pipeTo(t.writable),t.getData?t.getData():t.writable}}getText(t,n){return this.getData(new Ti(t),n)}getBlob(t,n){return this.getData(new $t(t),n)}getData64URI(t,n){return this.getData(new wr(t),n)}getUint8Array(t){return this.getData(new gr,t)}getWritable(t=new WritableStream,n){return this.getData({writable:t},n)}replaceBlob(t){Object.assign(this,{data:t,Reader:mn,Writer:$t,reader:null})}replaceText(t){Object.assign(this,{data:t,Reader:Ao,Writer:Ti,reader:null})}replaceData64URI(t){Object.assign(this,{data:t,Reader:Di,Writer:wr,reader:null})}replaceUint8Array(t){Object.assign(this,{data:t,Reader:Ri,Writer:gr,reader:null})}replaceReadable(t){Object.assign(this,{data:null,Reader:function(){return{readable:t}},Writer:null,reader:null})}}class jn extends Xo{constructor(t,n,r,i){super(t,n,r,i),this.directory=!0}addDirectory(t){return mt(this,t,null,!0)}addText(t,n){return mt(this,t,{data:n,Reader:Ao,Writer:Ti})}addBlob(t,n){return mt(this,t,{data:n,Reader:mn,Writer:$t})}addData64URI(t,n){return mt(this,t,{data:n,Reader:Di,Writer:wr})}addUint8Array(t,n){return mt(this,t,{data:n,Reader:Ri,Writer:gr})}addHttpContent(t,n,r={}){return mt(this,t,{data:n,Reader:class extends ba{constructor(i){super(i,r)}}})}addReadable(t,n){return mt(this,t,{Reader:function(){return{readable:n}}})}addFileSystemEntry(t){return eu(this,t)}addData(t,n){return mt(this,t,n)}async importBlob(t,n={}){await this.importZip(new mn(t),n)}async importData64URI(t,n={}){await this.importZip(new Di(t),n)}async importUint8Array(t,n={}){await this.importZip(new Ri(t),n)}async importHttpContent(t,n={}){await this.importZip(new ba(t,n),n)}async importReadable(t,n={}){await this.importZip({readable:t},n)}exportBlob(t={}){return this.exportZip(new $t("application/zip"),t)}exportData64URI(t={}){return this.exportZip(new wr("application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new gr,t)}async exportWritable(t=new WritableStream,n={}){return await this.exportZip({writable:t},n),t}async importZip(t,n){await ze(t),(await new bf(t,n).getEntries()).forEach(s=>{let a=this;const o=s.filename.split("/"),l=o.pop();o.forEach(f=>a=a.getChildByName(f)||new jn(this.fs,f,null,a)),s.directory||mt(a,l,{data:s,Reader:Jf(Object.assign({},n))})})}async exportZip(t,n){const r=this;await Promise.all([Qo(r),ze(t)]);const i=new Pf(t,n);return await Qf(i,r,Xf([r],"uncompressedSize"),n),await i.close(),t.getData?t.getData():t.writable}getChildByName(t){const n=this.children;for(let r=0;r{n.id==e.id&&t.splice(r,1)})}async function Qf(e,t,n,r){const i=t,s=new Map;await a(e,t);async function a(o,l){await f();async function f(){if(r.bufferedWrite)await Promise.all(l.children.map(d));else for(const u of l.children)await d(u)}async function d(u){const p=r.relativePath?u.getRelativeName(i):u.getFullname();await o.add(p,u.reader,Object.assign({directory:u.directory},Object.assign({},r,{onprogress:async w=>{if(r.onprogress){s.set(p,w);try{await r.onprogress(Array.from(s.values()).reduce((D,h)=>D+h),n)}catch{}}}}))),await a(o,u)}}}async function eu(e,t){if(t.isDirectory){const i=e.addDirectory(t.name);return await n(i,t),i}else return new Promise((i,s)=>t.file(a=>i(e.addBlob(t.name,a)),s));async function n(i,s){const a=await r(s);for(const o of a)o.isDirectory?await n(i.addDirectory(o.name),o):await new Promise((l,f)=>{o.file(d=>{const u=i.addBlob(o.name,d);u.uncompressedSize=d.size,l(u)},f)})}function r(i){return new Promise((s,a)=>{let o=[];i.isDirectory&&l(i.createReader()),i.isFile&&s(o);function l(f){f.readEntries(d=>{d.length?(o=o.concat(d),l(f)):s(o)},a)}})}}function tn(e){e.entries=[],e.root=new jn(e)}function mt(e,t,n,r){if(e.directory)return r?new jn(e.fs,t,n,e):new Jo(e.fs,t,n,e);throw new Error("Parent entry is not a directory")}let el;try{el=import.meta.url}catch{}Gi({baseURL:el});Gd(Gi);Gi({Deflate:Rc,Inflate:Xc});function Ir(e){return e.slice(e.lastIndexOf(Fr)+1)}const Fr="/";async function tu(e,t,n){const r=e.vaultPath+"/.obsidian/"+t+".json";let i;return e.adapter.exists(r)&&(i=JSON.parse(await e.adapter.readFile(r))),n(i)}class nu{constructor(t){jt(this,"zipFS");jt(this,"chunks",[]);jt(this,"chunkIndex",0);this.zipBlob=t}async initReadingVault(){this.zipFS=new Kf.FS,await this.zipFS.importBlob(this.zipBlob)}readDirectory(t){return this.zipFS.find(t).children.map(r=>({isDirectory:()=>!!r.directory,getName:()=>r.getFullname()}))}readFile(t){return this.zipFS.find(t).getText("utf-8")}exists(t){return!!this.zipFS.find(t)}resolve(t){return t}resolveInDir(t,n){return t+Fr+n}removeFile(t){}renameFile(t,n){}flushResultsFromInitialProcessing(t){}appendToResultFile(t,n){this.chunks.push(n)}appendToPostProcessingFile(t,n){this.chunks[this.chunkIndex]=n,this.chunkIndex++}initPostProcessingResultFile(t){}chunkIter(){const t=this.chunks;let n=0;return{[Symbol.asyncIterator](){return{async next(){if(n{if(s.forEach((o,l)=>s[l]+=a),r==="seenOne"&&a!=="["&&(r="normal"),r==="seenOneOut"&&a!=="]"&&(r="normal"),a==="["&&(i+=1,r==="seenOne"?(s.push(""),r="normal"):r==="normal"&&(r="seenOne")),a==="]"&&i>0){if(i-=1,r==="seenOneOut"){const o=s.pop();o&&(!t||s.length===0)&&n.push(o.slice(0,-2)),r="normal"}else r==="normal"&&(r="seenOneOut");i===0&&(r="normal")}}),n}function su(e){return Ir(e)!==e}class ci{constructor(){jt(this,"nameWasCalledAsFile",[]);jt(this,"pathMap",new Map);jt(this,"nameMap",new Map)}accessAsFile(t,n,r){const i=this.pathMap.get(n);if(i)return this.nameMap.get(t)||this.nameMap.set(t,i),i;const s=this.nameMap.get(t);if(s&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,s),this.nameWasCalledAsFile.push(t),s;const a=r();return this.pathMap.set(n,a),this.nameMap.get(t)||this.nameMap.set(t,a),this.nameWasCalledAsFile.push(t),a}accessAsLink(t,n){const r=this.findData(t);if(r)return r;const i=su(t),s=n();return i?this.pathMap.set(t,s):this.nameMap.set(t,s),s}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Lr(e){e.totalNodes++,e.leafNodes++}function tl(e){e.leafNodes--,e.topLevelNodes++}function au(e,t,n=ru,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new ci,headingTracker:new ci,dummyHeadingLinkTracker:new Map,blockLinkTracker:new ci,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function vt(e){return Lr(e.summary),e.idGenerator()}function ou(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map);let s=i.get(r);return s||(s={uid:vt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function lu(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map);let a=s.get(i);return a||(a={uid:vt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function cu(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function du(e){let t;return[e.split(` `).map(r=>{const i=r.split(" "),s=i[i.length-1];if(s.startsWith("^"))return t=s,i.slice(0,-1).join(" ")}).join(` -`),t]}function rl(e,t,n,r,i,s){const a=[t],o=[e];for(const l of n){const f=i(l);du(f,l,a,o,r),s==null||s(f,l)}}function du(e,t,n,r,i){var o;fu(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(o=a.children)!=null?o:[],a.children.push(e)),n.push(t),r.push(e)}function fu(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function il(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=il(n.children,r);if(i)return i}}return null}function uu(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function hu(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const o=t.findMatchingFile(s),l=o?t.get(o):null;if(l){const f={uid:"DUMMY",content:"",level:-1},d={uid:"DUMMY",content:""};rl(d,f,l,(p,w)=>p.level({uid:p.uid,content:p.content,children:void 0}));const u=(i=d.children)!=null?i:[];for(const p of a){const w=il(u,p.link);w?r.push({old:p.uid,new:w.uid}):n.push(p)}}else n.push(...a)}return[r,n]}async function mu(e,t){const[n,r]=hu(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Lr(t.summary)});const i=e+"_TEMP";t.fileSystemAdapter.initReadingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.fileSystemAdapter.chunkIter()){let o=a;s.forEach(l=>{o=o.replace(l.old,l.new)}),t.fileSystemAdapter.appendToPostProcessingFile(i,o)}t.fileSystemAdapter.endPostProcessingFile(),t.fileSystemAdapter.removeFile(e),t.fileSystemAdapter.renameFile(i,e)}var sl=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(sl||{});function pu(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function _u(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function wu(e,t){const n=pu(e);switch(_u(n)){case 0:return gu(n[0],t);case 2:return au(n,t);case 1:return uu(n,t);default:throw"Invalid link type detected: "+n}}function gu(e,t){return t.defaultLinkTracker.partialRetrieveAndUpdate(e,()=>(Lr(t.summary),{uid:t.idGenerator(),obsidianLink:e,type:1})).uid}function xu(e,t,n,r){const[i,s]=cu(n);return s?[ou([e,s],t,r),i]:[bt(r),n]}function yu(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.fullRetrieveAndUpdate(r,t,()=>(Lr(n.summary),{uid:n.idGenerator(),obsidianLink:r,type:0}));return i.type=0,i.uid}function vu(e){const t=[];for(const n of e.values())n.type===sl.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function bu(e){return[...e.invalidLinks,...vu(e.defaultLinkTracker),...lu(e.blockLinkTracker)]}function ku(e,t,n){const r=bu(n).sort((a,o)=>a.link.localeCompare(o.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:bt(n),name:i,createdAt:t,editedAt:t,type:"node"};return nl(n.summary),s.children=r,s}function al(e){return e===" "||e===" "}function mn(e,t,n=0){return al(e[t])?mn(e,t+1,n+1):n}function Su(e,t){let n=t,r=e[t];for(;al(r);)n--,r=e[n];return n+1}function $t(e,t,n=0){const r=e[t+n];return ns(r)?t+n:$t(e,t,n+1)}function ol(e,t){const n=e[t-1];return ns(n)}function ns(e){return e===void 0||e===` -`}function ll(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function rs(e,t){let n=!0;const r=t+mn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ll(e,r));const a=Su(e,r-1)-1,o=e[a];return ns(o)&&n?{type:Pt.BULLET,level:r-a-1}:null}function Eu(e,t,n){let r=t+n.level;if(ll(e,r))return r;r+=1+1;const i=mn(e,r);return r+i}function Du(e,t,n){let r=$t(e,t+n.level+1+1),i=e[r];for(;;){const s=mn(e,r+1);if(s==n.level+2&&!rs(e,r+1+s))r=$t(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Tu(e,t){return e+t.level}function Au(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=mn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function cl(e,t){if(!ol(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=$t(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],o=e[i+2];for(;[s,a,o].every(d=>d!==void 0)&&[s,a,o].join("")!=="```";)i++,s=e[i],a=e[i+1],o=e[i+2];if([s,a,o].some(d=>d===void 0))return null;const l=$t(e,i+3);return e.slice(i+3,l).trim()!==""?null:{type:Pt.CODEBLOCK,level:l-t+(e[l]===` -`?1:0),codeLanguage:r!==""?r:void 0}}return null}function dl(e,t){if(!ol(e,t))return null;const n=Ou(e,t);return n>0&&e[t+n]===" "?{type:Pt.HEADING,level:n}:null}function Ou(e,t){let n=t,r=0;for(;e[n]==="#";)n++,r++;return r}function Ru(e,t,n){const r=t+n.level+1,i=mn(e,r);return r+i}function Mu(e,t,n){return $t(e,t+n.level+1)}function Iu(e,t){let n=$t(e,t),r=e[n],i=r;for(n++,r=e[n];;){if(r===void 0)return[n];if(r===` +`),t]}function nl(e,t,n,r,i,s){const a=[t],o=[e];for(const l of n){const f=i(l);fu(f,l,a,o,r),s==null||s(f,l)}}function fu(e,t,n,r,i){var o;uu(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(o=a.children)!=null?o:[],a.children.push(e)),n.push(t),r.push(e)}function uu(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function rl(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=rl(n.children,r);if(i)return i}}return null}function hu(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function mu(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const o=t.findData(s);if(o){const l={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};nl(f,l,o,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=rl(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function pu(e,t){const[n,r]=mu(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Lr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let o=a;s.forEach(l=>{o=o.replace(l.old,l.new)}),await t.adapter.appendToPostProcessingFile(i,o)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var il=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(il||{});function _u(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function wu(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function gu(e,t){const n=_u(e);switch(wu(n)){case 0:return xu(n[0],t);case 2:return ou(n,t);case 1:return hu(n,t);default:throw"Invalid link type detected: "+n}}function xu(e,t){return t.defaultLinkTracker.accessAsLink(e,()=>(Lr(t.summary),{uid:t.idGenerator(),obsidianLink:e,type:1})).uid}function yu(e,t,n,r){const[i,s]=du(n);return s?[lu([e,s],t,r),i]:[vt(r),n]}function bu(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,()=>(Lr(n.summary),{uid:n.idGenerator(),obsidianLink:r,type:0}));return i.type=0,i.uid}function vu(e){const t=[];for(const n of e.getData())n.type===il.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function ku(e){return[...e.invalidLinks,...vu(e.defaultLinkTracker),...cu(e.blockLinkTracker)]}function Su(e,t,n){const r=ku(n).sort((a,o)=>a.link.localeCompare(o.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:vt(n),name:i,createdAt:t,editedAt:t,type:"node"};return tl(n.summary),s.children=r,s}function sl(e){return e===" "||e===" "}function pn(e,t,n=0){return sl(e[t])?pn(e,t+1,n+1):n}function Eu(e,t){let n=t,r=e[t];for(;sl(r);)n--,r=e[n];return n+1}function Kt(e,t,n=0){const r=e[t+n];return ns(r)?t+n:Kt(e,t,n+1)}function al(e,t){const n=e[t-1];return ns(n)}function ns(e){return e===void 0||e===` +`}function ol(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function rs(e,t){let n=!0;const r=t+pn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ol(e,r));const a=Eu(e,r-1)-1,o=e[a];return ns(o)&&n?{type:Ut.BULLET,level:r-a-1}:null}function Du(e,t,n){let r=t+n.level;if(ol(e,r))return r;r+=1+1;const i=pn(e,r);return r+i}function Tu(e,t,n){let r=Kt(e,t+n.level+1+1),i=e[r];for(;;){const s=pn(e,r+1);if(s==n.level+2&&!rs(e,r+1+s))r=Kt(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Ou(e,t){return e+t.level}function Au(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=pn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function ll(e,t){if(!al(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=Kt(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],o=e[i+2];for(;[s,a,o].every(d=>d!==void 0)&&[s,a,o].join("")!=="```";)i++,s=e[i],a=e[i+1],o=e[i+2];if([s,a,o].some(d=>d===void 0))return null;const l=Kt(e,i+3);return e.slice(i+3,l).trim()!==""?null:{type:Ut.CODEBLOCK,level:l-t+(e[l]===` +`?1:0),codeLanguage:r!==""?r:void 0}}return null}function cl(e,t){if(!al(e,t))return null;const n=Ru(e,t);return n>0&&e[t+n]===" "?{type:Ut.HEADING,level:n}:null}function Ru(e,t){let n=t,r=0;for(;e[n]==="#";)n++,r++;return r}function Mu(e,t,n){const r=t+n.level+1,i=pn(e,r);return r+i}function Iu(e,t,n){return Kt(e,t+n.level+1)}function Fu(e,t){let n=Kt(e,t),r=e[n],i=r;for(n++,r=e[n];;){if(r===void 0)return[n];if(r===` `&&i===` -`)return[n-1];{const s=Fu(e,n);if(s)return[n-1,s]}i=r,n++,r=e[n]}}function Fu(e,t){let n=dl(e,t);return n||(n=rs(e,t),n)||(n=cl(e,t),n)?n:null}var Pt=(e=>(e.ROOT="Root",e.HEADING="Heading",e.BULLET="Bullet Node",e.PARAGRAPH="Paragraph",e.CODEBLOCK="Code Block",e))(Pt||{});function Lu(e,t=0){const n=[];for(let r=t;rju(i,t,n,r))))}function ju(e,t,n,r){let i=e;r&&(i=Hu(e));let s=t.get(i);return s===void 0&&(s=n(),t.set(i,s)),s}function Bu(e){return Array.from(e.entries()).map(t=>({name:t[0],uid:t[1]}))}function Vu(e){if(e.startsWith("[ ] "))return"todo";if(e.startsWith("[x] ")||e.startsWith("[X] "))return"done"}function Gu(e,t){if(t.type===Pt.BULLET){const n=Vu(e);if(n)return[e.slice(4),n]}return null}function Zu(e){const t=[];let n=Fi(e,0);for(;n!==null;){let r;Array.isArray(n)?(t.push(n),r=n[2]):r=n,n=Fi(e,r)}return t}function Fi(e,t){let n,r="",i="";for(let s=t;s{const o=a[0],l=a[1];if(i.every(f=>o.trim()!==f.name||l.trim()!==f.mediaUrl)){const f=a[3],d=bt(n);e.name=e.name.replaceAll(f,"[["+d+"]]"),i.push({uid:d,name:o.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:l.trim()})}}),e.children=[...(s=e.children)!=null?s:[],...i]}function $u(e,t,n){return{uid:bt(n),name:Au(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function Ku(e,t,n,r,i){var p;if(n.type===Pt.CODEBLOCK)return $u(n,r,i);const[s,a]=xu(e,t,n.content,i),o={uid:s,name:a,createdAt:r,editedAt:r,type:"node"},[l,f]=(p=Gu(a,n))!=null?p:[a,void 0];o.name=l,o.todoState=f,o.name=o.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=Wu(o.name);if(d){const w=d[d.length-1];o.name.endsWith(w)&&(o.name=o.name.slice(0,-w.length)),o.supertags=fl(d,i.superTagTracker,i.idGenerator,!0)}const u=iu(o.name,!0).filter(w=>w.trim()!=="").map(w=>{const D=w.split("|"),h=D[0],c=D[1],m=wu(h,i),_=c!==void 0&&c.trim()!==""?"["+c.trim()+"]([["+m+"]])":"[["+m+"]]";return[w,m,_]});if(u.length>0){const w=new Set;o.refs||(o.refs=[]);for(const[D,h,c]of u)w.add(h),o.name=o.name.replaceAll("[["+D+"]]",c);o.refs.push(...Array.from(w.values()))}return zu(o,r,i),o}function Xu(e){if(e.startsWith(`--- +`)return[n-1];{const s=Lu(e,n);if(s)return[n-1,s]}i=r,n++,r=e[n]}}function Lu(e,t){let n=cl(e,t);return n||(n=rs(e,t),n)||(n=ll(e,t),n)?n:null}var Ut=(e=>(e.ROOT="Root",e.HEADING="Heading",e.BULLET="Bullet Node",e.PARAGRAPH="Paragraph",e.CODEBLOCK="Code Block",e))(Ut||{});function Cu(e,t=0){const n=[];for(let r=t;rBu(i,t,n,r))))}function Bu(e,t,n,r){let i=e;r&&(i=ju(e));let s=t.get(i);return s===void 0&&(s=n(),t.set(i,s)),s}function Vu(e){return Array.from(e.entries()).map(t=>({name:t[0],uid:t[1]}))}function Gu(e){if(e.startsWith("[ ] "))return"todo";if(e.startsWith("[x] ")||e.startsWith("[X] "))return"done"}function Zu(e,t){if(t.type===Ut.BULLET){const n=Gu(e);if(n)return[e.slice(4),n]}return null}function qu(e){const t=[];let n=Fi(e,0);for(;n!==null;){let r;Array.isArray(n)?(t.push(n),r=n[2]):r=n,n=Fi(e,r)}return t}function Fi(e,t){let n,r="",i="";for(let s=t;s{const o=a[0],l=a[1];if(i.every(f=>o.trim()!==f.name||l.trim()!==f.mediaUrl)){const f=a[3],d=vt(n);e.name=e.name.replaceAll(f,"[["+d+"]]"),i.push({uid:d,name:o.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:l.trim()})}}),e.children=[...(s=e.children)!=null?s:[],...i]}function Ku(e,t,n){return{uid:vt(n),name:Au(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function Xu(e,t,n,r,i){var p;if(n.type===Ut.CODEBLOCK)return Ku(n,r,i);const[s,a]=yu(e,t,n.content,i),o={uid:s,name:a,createdAt:r,editedAt:r,type:"node"},[l,f]=(p=Zu(a,n))!=null?p:[a,void 0];o.name=l,o.todoState=f,o.name=o.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=Hu(o.name);if(d){const w=d[d.length-1];o.name.endsWith(w)&&(o.name=o.name.slice(0,-w.length)),o.supertags=dl(d,i.superTagTracker,i.idGenerator,!0)}const u=iu(o.name,!0).filter(w=>w.trim()!=="").map(w=>{const D=w.split("|"),h=D[0],c=D[1],m=gu(h,i),_=c!==void 0&&c.trim()!==""?"["+c.trim()+"]([["+m+"]])":"[["+m+"]]";return[w,m,_]});if(u.length>0){const w=new Set;o.refs||(o.refs=[]);for(const[D,h,c]of u)w.add(h),o.name=o.name.replaceAll("[["+D+"]]",c);o.refs.push(...Array.from(w.values()))}return $u(o,r,i),o}function Ju(e){if(e.startsWith(`--- `)){const t=e.indexOf(` --- -`);if(t!==-1)return[Ju(e.slice(4,t)),t+5]}return null}function Ju(e){const t=e.split(` +`);if(t!==-1)return[Qu(e.slice(4,t)),t+5]}return null}function Qu(e){const t=e.split(` `).map(r=>r.trim()).filter(r=>r!==""),n=[];for(let r=0;ra.trim()).filter(a=>a!=="");if(!(s[0]==="publish"||s[0]==="cssclass"||s[0]==="aliases"))if(s.length===2)if(s[1].startsWith("[")&&s[1].endsWith("]")){const a=s[1].slice(1,-1).split(",").map(o=>o.trim()).filter(o=>o!=="");n.push({key:s[0],values:a})}else n.push({key:s[0],values:[s[1]]});else{const a={key:s[0],values:[]};let o=1,l=t[r+o];for(;l!==void 0&&l.startsWith("- ");)a.values.push(l.slice(2)),o++,l=t[r+o];r+=o-1,n.push(a)}}return n}//! moment.js //! version : 2.29.4 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com -var hl;function L(){return hl.apply(null,arguments)}function Qu(e){hl=e}function rt(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function qt(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function te(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function is(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(te(e,t))return!1;return!0}function Ce(e){return e===void 0}function kt(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function jn(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function ml(e,t){var n=[],r,i=e.length;for(r=0;r>>0,r;for(r=0;r0)for(n=0;n>>0,r;for(r=0;r0)for(n=0;n=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var ls=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,fi={},dn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(dn[e]=i),t&&(dn[t[0]]=function(){return dt(i.apply(this,arguments),t[1],t[2])}),n&&(dn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function i0(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function s0(e){var t=e.match(ls),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var a0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function o0(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(ls).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var l0="Invalid date";function c0(){return this._invalidDate}var d0="%d",f0=/\d{1,2}/;function u0(e){return this._ordinal.replace("%d",e)}var h0={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function m0(e,t,n,r){var i=this._relativeTime[n];return ut(i)?i(e,t,n,r):i.replace(/%d/i,e)}function p0(e,t){var n=this._relativeTime[e>0?"future":"past"];return ut(n)?n(t):n.replace(/%s/i,t)}var Rn={};function Oe(e,t){var n=e.toLowerCase();Rn[n]=Rn[n+"s"]=Rn[t]=e}function Ke(e){return typeof e=="string"?Rn[e]||Rn[e.toLowerCase()]:void 0}function cs(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var gl={};function Re(e,t){gl[e]=t}function _0(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:gl[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Nr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function pn(e,t){return function(n){return n!=null?(xl(this,e,n),L.updateOffset(this,t),this):vr(this,e)}}function vr(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function xl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Nr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),jr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function w0(e){return e=Ke(e),ut(this[e])?this[e]():this}function g0(e,t){if(typeof e=="object"){e=cs(e);var n=_0(e),r,i=n.length;for(r=0;r68?1900:2e3)};var Ol=pn("FullYear",!0);function U0(){return Nr(this.year())}function P0(e,t,n,r,i,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function Nn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Nn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Rl(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),o=1+7*(t-1)+s+a,l,f;return o<=0?(l=e-1,f=Mn(l)+o):o>Mn(e)?(l=e+1,f=o-Mn(e)):(l=e,f=o),{year:l,dayOfYear:f}}function Un(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+vt(a,t,n)):i>vt(e.year(),t,n)?(s=i-vt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function vt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(Mn(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Oe("week","w");Oe("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Gn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function Y0(e){return Un(e,this._week.dow,this._week.doy).week}var W0={dow:0,doy:6};function H0(){return this._week.dow}function j0(){return this._week.doy}function B0(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function V0(e){var t=Un(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Oe("day","d");Oe("weekday","e");Oe("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Gn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Gn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function G0(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Z0(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function us(e,t){return e.slice(t,7).concat(e.slice(0,t))}var q0="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ml="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),z0="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),$0=Vn,K0=Vn,X0=Vn;function J0(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?us(n,this._week.dow):e?n[e.day()]:n}function Q0(e){return e===!0?us(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function eh(e){return e===!0?us(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function th(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ft([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function nh(e,t,n){var r,i,s;if(this._weekdaysParseExact)return th.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ft([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function rh(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=G0(e,this.localeData()),this.add(e-t,"d")):t}function ih(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function sh(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Z0(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function ah(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=$0),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function oh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=K0),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function lh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=X0),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function hs(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,o,l,f;for(s=0;s<7;s++)a=ft([2e3,1]).day(s),o=je(this.weekdaysMin(a,"")),l=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(o),n.push(l),r.push(f),i.push(o),i.push(l),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ms(){return this.hours()%12||12}function ch(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,ms);H("k",["kk",2],0,ch);H("hmm",0,0,function(){return""+ms.apply(this)+dt(this.minutes(),2)});H("hmmss",0,0,function(){return""+ms.apply(this)+dt(this.minutes(),2)+dt(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+dt(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+dt(this.minutes(),2)+dt(this.seconds(),2)});function Il(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Il("a",!0);Il("A",!1);Oe("hour","h");Re("hour",13);function Fl(e,t){return t._meridiemParse}C("a",Fl);C("A",Fl);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",bl);C("hmmss",kl);C("Hmm",bl);C("Hmmss",kl);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[gt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[gt]=$(e.substr(i))});function dh(e){return(e+"").toLowerCase().charAt(0)==="p"}var fh=/[ap]\.?m?\.?/i,uh=pn("Hours",!0);function hh(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Ll={calendar:n0,longDateFormat:a0,invalidDate:l0,ordinal:d0,dayOfMonthOrdinalParse:f0,relativeTime:h0,months:T0,monthsShort:Sl,week:W0,weekdays:q0,weekdaysMin:z0,weekdaysShort:Ml,meridiemParse:fh},de={},Dn={},Pn;function mh(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=Br(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&mh(s,r)>=n-1)break;n--}t++}return Pn}function _h(e){return e.match("^[^/\\\\]*$")!=null}function Br(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&_h(e))try{t=Pn._abbr,n=require,n("./locale/"+e),Ut(t)}catch{de[e]=null}return de[e]}function Ut(e,t){var n;return e&&(Ce(t)?n=St(e):n=ps(e,t),n?Pn=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Pn._abbr}function ps(e,t){if(t!==null){var n,r=Ll;if(t.abbr=e,de[e]!=null)_l("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=Br(t.parentLocale),n!=null)r=n._config;else return Dn[t.parentLocale]||(Dn[t.parentLocale]=[]),Dn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new os(Ci(r,t)),Dn[e]&&Dn[e].forEach(function(i){ps(i.name,i.config)}),Ut(e),de[e]}else return delete de[e],null}function wh(e,t){if(t!=null){var n,r,i=Ll;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Ci(de[e]._config,t)):(r=Br(e),r!=null&&(i=r._config),t=Ci(i,t),r==null&&(t.abbr=e),n=new os(t),n.parentLocale=de[e],de[e]=n),Ut(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Ut()&&Ut(e)):de[e]!=null&&delete de[e]);return de[e]}function St(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Pn;if(!rt(e)){if(t=Br(e),t)return t;e=[e]}return ph(e)}function gh(){return Ni(de)}function _s(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[wt]<0||n[wt]>11?wt:n[ot]<1||n[ot]>jr(n[Ae],n[wt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[gt]!==0||n[Zt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[gt]<0||n[gt]>59?gt:n[Zt]<0||n[Zt]>999?Zt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=S0),z(e)._overflowWeekday&&t===-1&&(t=E0),z(e).overflow=t),e}var xh=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yh=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vh=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ui=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],bh=/^\/?Date\((-?\d+)/i,kh=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Sh={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Cl(e){var t,n,r=e._i,i=xh.exec(r)||yh.exec(r),s,a,o,l,f=ir.length,d=ui.length;if(i){for(z(e).iso=!0,t=0,n=f;tMn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Nn(a,0,e._dayOfYear),e._a[wt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[gt]===0&&e._a[Zt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Nn:P0).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function Ih(e){var t,n,r,i,s,a,o,l,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=rn(t.GG,e._a[Ae],Un(oe(),1,4).year),r=rn(t.W,1),i=rn(t.E,1),(i<1||i>7)&&(l=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Un(oe(),s,a),n=rn(t.gg,e._a[Ae],f.year),r=rn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>vt(n,s,a)?z(e)._overflowWeeks=!0:l!=null?z(e)._overflowWeekday=!0:(o=Rl(n,r,i,s,a),e._a[Ae]=o.year,e._dayOfYear=o.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function gs(e){if(e._f===L.ISO_8601){Cl(e);return}if(e._f===L.RFC_2822){Nl(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,o=t.length,l=0,f,d;for(i=wl(e._f,e._locale).match(ls)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),l+=r.length),dn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),k0(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=o-l,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=Fh(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Ae]=e._locale.erasConvertYear(f,e._a[Ae])),ws(e),_s(e)}function Fh(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Lh(e){var t,n,r,i,s,a,o=!1,l=e._f.length;if(l===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Cr()});function Yl(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function t1(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return as(e,this),e=Ul(e),e._a?(t=e._isUTC?ft(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&Zh(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function n1(){return this.isValid()?!this._isUTC:!1}function r1(){return this.isValid()?this._isUTC:!1}function Hl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var i1=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,s1=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:kt(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=i1.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[gt])*i,ms:$(Pi(r[Zt]*1e3))*i}):(r=s1.exec(e))?(i=r[1]==="-"?-1:1,n={y:Vt(r[2],i),M:Vt(r[3],i),w:Vt(r[4],i),d:Vt(r[5],i),h:Vt(r[6],i),m:Vt(r[7],i),s:Vt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=a1(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Vr(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Vr.prototype;st.invalid=Gh;function Vt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ua(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function a1(e,t){var n;return e.isValid()&&t.isValid()?(t=ys(t,e),e.isBefore(t)?n=Ua(e,t):(n=Ua(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function jl(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(_l(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),Bl(this,i,e),this}}function Bl(e,t,n,r){var i=t._milliseconds,s=Pi(t._days),a=Pi(t._months);!e.isValid()||(r=r==null?!0:r,a&&Dl(e,vr(e,"Month")+a*n),s&&xl(e,"Date",vr(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var o1=jl(1,"add"),l1=jl(-1,"subtract");function Vl(e){return typeof e=="string"||e instanceof String}function c1(e){return it(e)||jn(e)||Vl(e)||kt(e)||f1(e)||d1(e)||e===null||e===void 0}function d1(e){var t=qt(e)&&!is(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ut(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function E1(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function D1(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function T1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function A1(e){return this.from(oe(),e)}function O1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function R1(e){return this.to(oe(),e)}function Gl(e){var t;return e===void 0?this._locale._abbr:(t=St(e),t!=null&&(this._locale=t),this)}var Zl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function ql(){return this._locale}var Sr=1e3,fn=60*Sr,Er=60*fn,zl=(365*400+97)*24*Er;function un(e,t){return(e%t+t)%t}function $l(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-zl:new Date(e,t,n).valueOf()}function Kl(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-zl:Date.UTC(e,t,n)}function M1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Kl:$l,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=un(t+(this._isUTC?0:this.utcOffset()*fn),Er);break;case"minute":t=this._d.valueOf(),t-=un(t,fn);break;case"second":t=this._d.valueOf(),t-=un(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function I1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Kl:$l,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-un(t+(this._isUTC?0:this.utcOffset()*fn),Er)-1;break;case"minute":t=this._d.valueOf(),t+=fn-un(t,fn)-1;break;case"second":t=this._d.valueOf(),t+=Sr-un(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function F1(){return this._d.valueOf()-(this._offset||0)*6e4}function L1(){return Math.floor(this.valueOf()/1e3)}function C1(){return new Date(this.valueOf())}function N1(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function U1(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function P1(){return this.isValid()?this.toISOString():null}function Y1(){return ss(this)}function W1(){return Lt({},z(this))}function H1(){return z(this).overflow}function j1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",vs);C("NN",vs);C("NNN",vs);C("NNNN",Q1);C("NNNNN",em);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",_n);C("yy",_n);C("yyy",_n);C("yyyy",_n);C("yo",tm);ie(["y","yy","yyy","yyyy"],Ae);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ae]=n._locale.eraYearOrdinalParse(e,i):t[Ae]=parseInt(e,10)});function B1(e,t){var n,r,i,s=this._eras||St("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function G1(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function Z1(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),lm.call(this,e,t,n,r,i))}function lm(e,t,n,r,i){var s=Rl(e,t,n,r,i),a=Nn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Oe("quarter","Q");Re("quarter",7);C("Q",yl);ie("Q",function(e,t){t[wt]=($(e)-1)*3});function cm(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Oe("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var Jl=pn("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Oe("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Pr);C("DDDD",vl);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function dm(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Oe("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var fm=pn("Minutes",!1);H("s",["ss",2],0,"second");Oe("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],gt);var um=pn("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Oe("millisecond","ms");Re("millisecond",16);C("S",Pr,yl);C("SS",Pr,Be);C("SSS",Pr,vl);var Ct,Ql;for(Ct="SSSS";Ct.length<=9;Ct+="S")C(Ct,_n);function hm(e,t){t[Zt]=$(("0."+e)*1e3)}for(Ct="S";Ct.length<=9;Ct+="S")ie(Ct,hm);Ql=pn("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function mm(){return this._isUTC?"UTC":""}function pm(){return this._isUTC?"Coordinated Universal Time":""}var M=Bn.prototype;M.add=o1;M.calendar=m1;M.clone=p1;M.diff=b1;M.endOf=I1;M.format=D1;M.from=T1;M.fromNow=A1;M.to=O1;M.toNow=R1;M.get=w0;M.invalidAt=H1;M.isAfter=_1;M.isBefore=w1;M.isBetween=g1;M.isSame=x1;M.isSameOrAfter=y1;M.isSameOrBefore=v1;M.isValid=Y1;M.lang=Zl;M.locale=Gl;M.localeData=ql;M.max=Yh;M.min=Ph;M.parsingFlags=W1;M.set=g0;M.startOf=M1;M.subtract=l1;M.toArray=N1;M.toObject=U1;M.toDate=C1;M.toISOString=S1;M.inspect=E1;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=P1;M.toString=k1;M.unix=L1;M.valueOf=F1;M.creationData=j1;M.eraName=Z1;M.eraNarrow=q1;M.eraAbbr=z1;M.eraYear=$1;M.year=Ol;M.isLeapYear=U0;M.weekYear=nm;M.isoWeekYear=rm;M.quarter=M.quarters=cm;M.month=Tl;M.daysInMonth=L0;M.week=M.weeks=B0;M.isoWeek=M.isoWeeks=V0;M.weeksInYear=am;M.weeksInWeekYear=om;M.isoWeeksInYear=im;M.isoWeeksInISOWeekYear=sm;M.date=Jl;M.day=M.days=rh;M.weekday=ih;M.isoWeekday=sh;M.dayOfYear=dm;M.hour=M.hours=uh;M.minute=M.minutes=fm;M.second=M.seconds=um;M.millisecond=M.milliseconds=Ql;M.utcOffset=zh;M.utc=Kh;M.local=Xh;M.parseZone=Jh;M.hasAlignedHourOffset=Qh;M.isDST=e1;M.isLocal=n1;M.isUtcOffset=r1;M.isUtc=Hl;M.isUTC=Hl;M.zoneAbbr=mm;M.zoneName=pm;M.dates=$e("dates accessor is deprecated. Use date instead.",Jl);M.months=$e("months accessor is deprecated. Use month instead",Tl);M.years=$e("years accessor is deprecated. Use year instead",Ol);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",$h);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",t1);function _m(e){return oe(e*1e3)}function wm(){return oe.apply(null,arguments).parseZone()}function ec(e){return e}var ne=os.prototype;ne.calendar=r0;ne.longDateFormat=o0;ne.invalidDate=c0;ne.ordinal=u0;ne.preparse=ec;ne.postformat=ec;ne.relativeTime=m0;ne.pastFuture=p0;ne.set=t0;ne.eras=B1;ne.erasParse=V1;ne.erasConvertYear=G1;ne.erasAbbrRegex=X1;ne.erasNameRegex=K1;ne.erasNarrowRegex=J1;ne.months=R0;ne.monthsShort=M0;ne.monthsParse=F0;ne.monthsRegex=N0;ne.monthsShortRegex=C0;ne.week=Y0;ne.firstDayOfYear=j0;ne.firstDayOfWeek=H0;ne.weekdays=J0;ne.weekdaysMin=eh;ne.weekdaysShort=Q0;ne.weekdaysParse=nh;ne.weekdaysRegex=ah;ne.weekdaysShortRegex=oh;ne.weekdaysMinRegex=lh;ne.isPM=dh;ne.meridiem=hh;function Dr(e,t,n,r){var i=St(),s=ft().set(r,t);return i[n](s,e)}function tc(e,t,n){if(kt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function ks(e,t,n,r){typeof e=="boolean"?(kt(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,kt(t)&&(n=t,t=void 0),t=t||"");var i=St(),s=e?i._week.dow:0,a,o=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)o[a]=Dr(t,(a+s)%7,r,"day");return o}function gm(e,t){return tc(e,t,"months")}function xm(e,t){return tc(e,t,"monthsShort")}function ym(e,t,n){return ks(e,t,n,"weekdays")}function vm(e,t,n){return ks(e,t,n,"weekdaysShort")}function bm(e,t,n){return ks(e,t,n,"weekdaysMin")}Ut("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Ut);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",St);var pt=Math.abs;function km(){var e=this._data;return this._milliseconds=pt(this._milliseconds),this._days=pt(this._days),this._months=pt(this._months),e.milliseconds=pt(e.milliseconds),e.seconds=pt(e.seconds),e.minutes=pt(e.minutes),e.hours=pt(e.hours),e.months=pt(e.months),e.years=pt(e.years),this}function nc(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Sm(e,t){return nc(this,e,t,1)}function Em(e,t){return nc(this,e,t,-1)}function Pa(e){return e<0?Math.floor(e):Math.ceil(e)}function Dm(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,o,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Pa(Wi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),l=Ze(rc(t)),n+=l,t-=Pa(Wi(l)),o=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=o,this}function rc(e){return e*4800/146097}function Wi(e){return e*146097/4800}function Tm(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+rc(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Wi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Am(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Et(e){return function(){return this.as(e)}}var Om=Et("ms"),Rm=Et("s"),Mm=Et("m"),Im=Et("h"),Fm=Et("d"),Lm=Et("w"),Cm=Et("M"),Nm=Et("Q"),Um=Et("y");function Pm(){return st(this)}function Ym(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Kt(e){return function(){return this.isValid()?this._data[e]:NaN}}var Wm=Kt("milliseconds"),Hm=Kt("seconds"),jm=Kt("minutes"),Bm=Kt("hours"),Vm=Kt("days"),Gm=Kt("months"),Zm=Kt("years");function qm(){return Ze(this.days()/7)}var _t=Math.round,on={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function zm(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function $m(e,t,n,r){var i=st(e).abs(),s=_t(i.as("s")),a=_t(i.as("m")),o=_t(i.as("h")),l=_t(i.as("d")),f=_t(i.as("M")),d=_t(i.as("w")),u=_t(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,zm.apply(null,p)}function Km(e){return e===void 0?_t:typeof e=="function"?(_t=e,!0):!1}function Xm(e,t){return on[e]===void 0?!1:t===void 0?on[e]:(on[e]=t,e==="s"&&(on.ss=t-1),!0)}function Jm(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=on,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},on,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=$m(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var hi=Math.abs;function tn(e){return(e>0)-(e<0)||+e}function Zr(){if(!this.isValid())return this.localeData().invalidDate();var e=hi(this._milliseconds)/1e3,t=hi(this._days),n=hi(this._months),r,i,s,a,o=this.asSeconds(),l,f,d,u;return o?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",f=tn(this._months)!==tn(o)?"-":"",d=tn(this._days)!==tn(o)?"-":"",u=tn(this._milliseconds)!==tn(o)?"-":"",l+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Vr.prototype;X.isValid=Vh;X.abs=km;X.add=Sm;X.subtract=Em;X.as=Tm;X.asMilliseconds=Om;X.asSeconds=Rm;X.asMinutes=Mm;X.asHours=Im;X.asDays=Fm;X.asWeeks=Lm;X.asMonths=Cm;X.asQuarters=Nm;X.asYears=Um;X.valueOf=Am;X._bubble=Dm;X.clone=Pm;X.get=Ym;X.milliseconds=Wm;X.seconds=Hm;X.minutes=jm;X.hours=Bm;X.days=Vm;X.weeks=qm;X.months=Gm;X.years=Zm;X.humanize=Jm;X.toISOString=Zr;X.toString=Zr;X.toJSON=Zr;X.locale=Gl;X.localeData=ql;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zr);X.lang=Zl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Wr);C("X",y0);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js -L.version="2.29.4";Qu(oe);L.fn=M;L.min=Wh;L.max=Hh;L.now=jh;L.utc=ft;L.unix=_m;L.months=gm;L.isDate=jn;L.locale=Ut;L.invalid=Cr;L.duration=st;L.isMoment=it;L.weekdays=ym;L.parseZone=wm;L.localeData=St;L.isDuration=dr;L.monthsShort=xm;L.weekdaysMin=bm;L.defineLocale=ps;L.updateLocale=wh;L.locales=gh;L.weekdaysShort=vm;L.normalizeUnits=Ke;L.relativeTimeRounding=Km;L.relativeTimeThreshold=Xm;L.calendarFormat=h1;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Qm(e,t,n){let r;return e.values&&e.values.length>0&&(r=e.values.map(i=>({uid:bt(n),name:i,type:"node",createdAt:t,editedAt:t}))),ep(e.key,n.attributes),n.summary.fields++,{uid:bt(n),name:e.key,type:"field",createdAt:t,editedAt:t,children:r}}function ep(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function tp(e,t,n,r,i=Date.now()){var p;const[s,a]=(p=Xu(n))!=null?p:[[],0];let o=Lu(n,a),l=e;const f=o[0]&&o[0].content.match(/^title::(.+)$/);f&&(l=f[1],o=o.slice(1)),o[0]&&o[0].content.replace(/^#+/,"").trim()===l.trim()&&(o=o.slice(1));const d=[],u=np(l,t,i,r,s);return rl(u,{type:Pt.ROOT,level:-1},o,Pu,w=>Ku(e,t,w,i,r),(w,D)=>{D.type===Pt.HEADING&&d.push({...D,uid:w.uid})}),r.headingTracker.set({name:l,path:t},d),u}function np(e,t,n,r,i){let s;const a=[];i.forEach(d=>{d.key==="tags"?s=fl(d.values,r.superTagTracker,r.idGenerator):a.push(Qm(d,n,r))});let o=yu(e,t,r),l="node";const f=rp(e,r.dailyNoteFormat);return f.length>0&&(o=f,l="date",e=f,r.summary.calendarNodes++),{uid:o,name:e,createdAt:n,editedAt:n,type:l,supertags:s,children:a.length>0?a:void 0}}function rp(e,t){const n=L(e,t,!0);return n.isValid()?n.format("MM-DD-YYYY"):""}function Ya(e,t){return e===t.length-1?"LAST":"NOT_LAST"}function ip(e,t){return e.fileSystemAdapter.readDirectory(t).filter(n=>{const r=t+Fr+n.getName();return n.isDirectory()&&!r.endsWith(".github")&&!r.endsWith(".obsidian")||!n.isDirectory()&&r.endsWith(".md")})}async function ic(e,t,n,r,i,s="LAST"){n(t);const a=ip(e,t);for(let o=0;o{const i=Ir(r),s=bt(n);n.fileSystemAdapter.appendToFile(e,`{ +`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var La={};function pl(e,t){L.deprecationHandler!=null&&L.deprecationHandler(e,t),La[e]||(ml(t),La[e]=!0)}L.suppressDeprecationWarnings=!1;L.deprecationHandler=null;function ut(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function n0(e){var t,n;for(n in e)te(e,n)&&(t=e[n],ut(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Ci(e,t){var n=Lt({},e),r;for(r in t)te(t,r)&&(zt(e[r])&&zt(t[r])?(n[r]={},Lt(n[r],e[r]),Lt(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)te(e,r)&&!te(t,r)&&zt(e[r])&&(n[r]=Lt({},n[r]));return n}function os(e){e!=null&&this.set(e)}var Ni;Object.keys?Ni=Object.keys:Ni=function(e){var t,n=[];for(t in e)te(e,t)&&n.push(t);return n};var r0={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function i0(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return ut(r)?r.call(t,n):r}function dt(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var ls=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,fi={},fn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(fn[e]=i),t&&(fn[t[0]]=function(){return dt(i.apply(this,arguments),t[1],t[2])}),n&&(fn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function s0(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function a0(e){var t=e.match(ls),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var o0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function l0(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(ls).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var c0="Invalid date";function d0(){return this._invalidDate}var f0="%d",u0=/\d{1,2}/;function h0(e){return this._ordinal.replace("%d",e)}var m0={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function p0(e,t,n,r){var i=this._relativeTime[n];return ut(i)?i(e,t,n,r):i.replace(/%d/i,e)}function _0(e,t){var n=this._relativeTime[e>0?"future":"past"];return ut(n)?n(t):n.replace(/%s/i,t)}var Mn={};function Ae(e,t){var n=e.toLowerCase();Mn[n]=Mn[n+"s"]=Mn[t]=e}function Ke(e){return typeof e=="string"?Mn[e]||Mn[e.toLowerCase()]:void 0}function cs(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var wl={};function Re(e,t){wl[e]=t}function w0(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:wl[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Nr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function _n(e,t){return function(n){return n!=null?(gl(this,e,n),L.updateOffset(this,t),this):br(this,e)}}function br(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function gl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Nr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),jr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function g0(e){return e=Ke(e),ut(this[e])?this[e]():this}function x0(e,t){if(typeof e=="object"){e=cs(e);var n=w0(e),r,i=n.length;for(r=0;r68?1900:2e3)};var Ol=_n("FullYear",!0);function U0(){return Nr(this.year())}function Y0(e,t,n,r,i,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function Pn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Pn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Al(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),o=1+7*(t-1)+s+a,l,f;return o<=0?(l=e-1,f=In(l)+o):o>In(e)?(l=e+1,f=o-In(e)):(l=e,f=o),{year:l,dayOfYear:f}}function Un(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+bt(a,t,n)):i>bt(e.year(),t,n)?(s=i-bt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function bt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(In(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Ae("week","w");Ae("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Zn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function W0(e){return Un(e,this._week.dow,this._week.doy).week}var H0={dow:0,doy:6};function j0(){return this._week.dow}function B0(){return this._week.doy}function V0(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function G0(e){var t=Un(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Ae("day","d");Ae("weekday","e");Ae("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Zn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Zn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function Z0(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function q0(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function us(e,t){return e.slice(t,7).concat(e.slice(0,t))}var z0="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Rl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$0="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),K0=Gn,X0=Gn,J0=Gn;function Q0(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?us(n,this._week.dow):e?n[e.day()]:n}function eh(e){return e===!0?us(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function th(e){return e===!0?us(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function nh(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ft([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function rh(e,t,n){var r,i,s;if(this._weekdaysParseExact)return nh.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ft([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function ih(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=Z0(e,this.localeData()),this.add(e-t,"d")):t}function sh(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function ah(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=q0(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function oh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=K0),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function lh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=X0),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ch(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=J0),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function hs(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,o,l,f;for(s=0;s<7;s++)a=ft([2e3,1]).day(s),o=je(this.weekdaysMin(a,"")),l=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(o),n.push(l),r.push(f),i.push(o),i.push(l),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ms(){return this.hours()%12||12}function dh(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,ms);H("k",["kk",2],0,dh);H("hmm",0,0,function(){return""+ms.apply(this)+dt(this.minutes(),2)});H("hmmss",0,0,function(){return""+ms.apply(this)+dt(this.minutes(),2)+dt(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+dt(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+dt(this.minutes(),2)+dt(this.seconds(),2)});function Ml(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Ml("a",!0);Ml("A",!1);Ae("hour","h");Re("hour",13);function Il(e,t){return t._meridiemParse}C("a",Il);C("A",Il);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",bl);C("hmmss",vl);C("Hmm",bl);C("Hmmss",vl);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[gt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[gt]=$(e.substr(i))});function fh(e){return(e+"").toLowerCase().charAt(0)==="p"}var uh=/[ap]\.?m?\.?/i,hh=_n("Hours",!0);function mh(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Fl={calendar:r0,longDateFormat:o0,invalidDate:c0,ordinal:f0,dayOfMonthOrdinalParse:u0,relativeTime:m0,months:O0,monthsShort:kl,week:H0,weekdays:z0,weekdaysMin:$0,weekdaysShort:Rl,meridiemParse:uh},de={},Tn={},Yn;function ph(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=Br(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&ph(s,r)>=n-1)break;n--}t++}return Yn}function wh(e){return e.match("^[^/\\\\]*$")!=null}function Br(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&wh(e))try{t=Yn._abbr,n=require,n("./locale/"+e),Pt(t)}catch{de[e]=null}return de[e]}function Pt(e,t){var n;return e&&(Ce(t)?n=St(e):n=ps(e,t),n?Yn=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Yn._abbr}function ps(e,t){if(t!==null){var n,r=Fl;if(t.abbr=e,de[e]!=null)pl("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=Br(t.parentLocale),n!=null)r=n._config;else return Tn[t.parentLocale]||(Tn[t.parentLocale]=[]),Tn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new os(Ci(r,t)),Tn[e]&&Tn[e].forEach(function(i){ps(i.name,i.config)}),Pt(e),de[e]}else return delete de[e],null}function gh(e,t){if(t!=null){var n,r,i=Fl;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Ci(de[e]._config,t)):(r=Br(e),r!=null&&(i=r._config),t=Ci(i,t),r==null&&(t.abbr=e),n=new os(t),n.parentLocale=de[e],de[e]=n),Pt(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Pt()&&Pt(e)):de[e]!=null&&delete de[e]);return de[e]}function St(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Yn;if(!rt(e)){if(t=Br(e),t)return t;e=[e]}return _h(e)}function xh(){return Ni(de)}function _s(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[wt]<0||n[wt]>11?wt:n[ot]<1||n[ot]>jr(n[Oe],n[wt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[gt]!==0||n[qt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[gt]<0||n[gt]>59?gt:n[qt]<0||n[qt]>999?qt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=E0),z(e)._overflowWeekday&&t===-1&&(t=D0),z(e).overflow=t),e}var yh=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,bh=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vh=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ui=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],kh=/^\/?Date\((-?\d+)/i,Sh=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Eh={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Ll(e){var t,n,r=e._i,i=yh.exec(r)||bh.exec(r),s,a,o,l,f=ir.length,d=ui.length;if(i){for(z(e).iso=!0,t=0,n=f;tIn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Pn(a,0,e._dayOfYear),e._a[wt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[gt]===0&&e._a[qt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Pn:Y0).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function Fh(e){var t,n,r,i,s,a,o,l,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=sn(t.GG,e._a[Oe],Un(oe(),1,4).year),r=sn(t.W,1),i=sn(t.E,1),(i<1||i>7)&&(l=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Un(oe(),s,a),n=sn(t.gg,e._a[Oe],f.year),r=sn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>bt(n,s,a)?z(e)._overflowWeeks=!0:l!=null?z(e)._overflowWeekday=!0:(o=Al(n,r,i,s,a),e._a[Oe]=o.year,e._dayOfYear=o.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function gs(e){if(e._f===L.ISO_8601){Ll(e);return}if(e._f===L.RFC_2822){Cl(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,o=t.length,l=0,f,d;for(i=_l(e._f,e._locale).match(ls)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),l+=r.length),fn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),S0(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=o-l,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=Lh(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Oe]=e._locale.erasConvertYear(f,e._a[Oe])),ws(e),_s(e)}function Lh(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Ch(e){var t,n,r,i,s,a,o=!1,l=e._f.length;if(l===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Cr()});function Ul(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function n1(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return as(e,this),e=Nl(e),e._a?(t=e._isUTC?ft(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&qh(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function r1(){return this.isValid()?!this._isUTC:!1}function i1(){return this.isValid()?this._isUTC:!1}function Wl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var s1=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,a1=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:kt(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=s1.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[gt])*i,ms:$(Ui(r[qt]*1e3))*i}):(r=a1.exec(e))?(i=r[1]==="-"?-1:1,n={y:Gt(r[2],i),M:Gt(r[3],i),w:Gt(r[4],i),d:Gt(r[5],i),h:Gt(r[6],i),m:Gt(r[7],i),s:Gt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=o1(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Vr(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Vr.prototype;st.invalid=Zh;function Gt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Na(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function o1(e,t){var n;return e.isValid()&&t.isValid()?(t=ys(t,e),e.isBefore(t)?n=Na(e,t):(n=Na(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Hl(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(pl(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),jl(this,i,e),this}}function jl(e,t,n,r){var i=t._milliseconds,s=Ui(t._days),a=Ui(t._months);!e.isValid()||(r=r==null?!0:r,a&&El(e,br(e,"Month")+a*n),s&&gl(e,"Date",br(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var l1=Hl(1,"add"),c1=Hl(-1,"subtract");function Bl(e){return typeof e=="string"||e instanceof String}function d1(e){return it(e)||Bn(e)||Bl(e)||kt(e)||u1(e)||f1(e)||e===null||e===void 0}function f1(e){var t=zt(e)&&!is(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ut(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function D1(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function T1(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function O1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function A1(e){return this.from(oe(),e)}function R1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function M1(e){return this.to(oe(),e)}function Vl(e){var t;return e===void 0?this._locale._abbr:(t=St(e),t!=null&&(this._locale=t),this)}var Gl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Zl(){return this._locale}var Sr=1e3,un=60*Sr,Er=60*un,ql=(365*400+97)*24*Er;function hn(e,t){return(e%t+t)%t}function zl(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-ql:new Date(e,t,n).valueOf()}function $l(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-ql:Date.UTC(e,t,n)}function I1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?$l:zl,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hn(t+(this._isUTC?0:this.utcOffset()*un),Er);break;case"minute":t=this._d.valueOf(),t-=hn(t,un);break;case"second":t=this._d.valueOf(),t-=hn(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function F1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?$l:zl,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-hn(t+(this._isUTC?0:this.utcOffset()*un),Er)-1;break;case"minute":t=this._d.valueOf(),t+=un-hn(t,un)-1;break;case"second":t=this._d.valueOf(),t+=Sr-hn(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function L1(){return this._d.valueOf()-(this._offset||0)*6e4}function C1(){return Math.floor(this.valueOf()/1e3)}function N1(){return new Date(this.valueOf())}function P1(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function U1(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Y1(){return this.isValid()?this.toISOString():null}function W1(){return ss(this)}function H1(){return Lt({},z(this))}function j1(){return z(this).overflow}function B1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",bs);C("NN",bs);C("NNN",bs);C("NNNN",em);C("NNNNN",tm);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",wn);C("yy",wn);C("yyy",wn);C("yyyy",wn);C("yo",nm);ie(["y","yy","yyy","yyyy"],Oe);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Oe]=n._locale.eraYearOrdinalParse(e,i):t[Oe]=parseInt(e,10)});function V1(e,t){var n,r,i,s=this._eras||St("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function Z1(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function q1(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),cm.call(this,e,t,n,r,i))}function cm(e,t,n,r,i){var s=Al(e,t,n,r,i),a=Pn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Ae("quarter","Q");Re("quarter",7);C("Q",xl);ie("Q",function(e,t){t[wt]=($(e)-1)*3});function dm(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Ae("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var Xl=_n("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Ae("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Ur);C("DDDD",yl);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function fm(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Ae("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var um=_n("Minutes",!1);H("s",["ss",2],0,"second");Ae("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],gt);var hm=_n("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Ae("millisecond","ms");Re("millisecond",16);C("S",Ur,xl);C("SS",Ur,Be);C("SSS",Ur,yl);var Ct,Jl;for(Ct="SSSS";Ct.length<=9;Ct+="S")C(Ct,wn);function mm(e,t){t[qt]=$(("0."+e)*1e3)}for(Ct="S";Ct.length<=9;Ct+="S")ie(Ct,mm);Jl=_n("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function pm(){return this._isUTC?"UTC":""}function _m(){return this._isUTC?"Coordinated Universal Time":""}var M=Vn.prototype;M.add=l1;M.calendar=p1;M.clone=_1;M.diff=k1;M.endOf=F1;M.format=T1;M.from=O1;M.fromNow=A1;M.to=R1;M.toNow=M1;M.get=g0;M.invalidAt=j1;M.isAfter=w1;M.isBefore=g1;M.isBetween=x1;M.isSame=y1;M.isSameOrAfter=b1;M.isSameOrBefore=v1;M.isValid=W1;M.lang=Gl;M.locale=Vl;M.localeData=Zl;M.max=Wh;M.min=Yh;M.parsingFlags=H1;M.set=x0;M.startOf=I1;M.subtract=c1;M.toArray=P1;M.toObject=U1;M.toDate=N1;M.toISOString=E1;M.inspect=D1;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=Y1;M.toString=S1;M.unix=C1;M.valueOf=L1;M.creationData=B1;M.eraName=q1;M.eraNarrow=z1;M.eraAbbr=$1;M.eraYear=K1;M.year=Ol;M.isLeapYear=U0;M.weekYear=rm;M.isoWeekYear=im;M.quarter=M.quarters=dm;M.month=Dl;M.daysInMonth=C0;M.week=M.weeks=V0;M.isoWeek=M.isoWeeks=G0;M.weeksInYear=om;M.weeksInWeekYear=lm;M.isoWeeksInYear=sm;M.isoWeeksInISOWeekYear=am;M.date=Xl;M.day=M.days=ih;M.weekday=sh;M.isoWeekday=ah;M.dayOfYear=fm;M.hour=M.hours=hh;M.minute=M.minutes=um;M.second=M.seconds=hm;M.millisecond=M.milliseconds=Jl;M.utcOffset=$h;M.utc=Xh;M.local=Jh;M.parseZone=Qh;M.hasAlignedHourOffset=e1;M.isDST=t1;M.isLocal=r1;M.isUtcOffset=i1;M.isUtc=Wl;M.isUTC=Wl;M.zoneAbbr=pm;M.zoneName=_m;M.dates=$e("dates accessor is deprecated. Use date instead.",Xl);M.months=$e("months accessor is deprecated. Use month instead",Dl);M.years=$e("years accessor is deprecated. Use year instead",Ol);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Kh);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",n1);function wm(e){return oe(e*1e3)}function gm(){return oe.apply(null,arguments).parseZone()}function Ql(e){return e}var ne=os.prototype;ne.calendar=i0;ne.longDateFormat=l0;ne.invalidDate=d0;ne.ordinal=h0;ne.preparse=Ql;ne.postformat=Ql;ne.relativeTime=p0;ne.pastFuture=_0;ne.set=n0;ne.eras=V1;ne.erasParse=G1;ne.erasConvertYear=Z1;ne.erasAbbrRegex=J1;ne.erasNameRegex=X1;ne.erasNarrowRegex=Q1;ne.months=M0;ne.monthsShort=I0;ne.monthsParse=L0;ne.monthsRegex=P0;ne.monthsShortRegex=N0;ne.week=W0;ne.firstDayOfYear=B0;ne.firstDayOfWeek=j0;ne.weekdays=Q0;ne.weekdaysMin=th;ne.weekdaysShort=eh;ne.weekdaysParse=rh;ne.weekdaysRegex=oh;ne.weekdaysShortRegex=lh;ne.weekdaysMinRegex=ch;ne.isPM=fh;ne.meridiem=mh;function Dr(e,t,n,r){var i=St(),s=ft().set(r,t);return i[n](s,e)}function ec(e,t,n){if(kt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function ks(e,t,n,r){typeof e=="boolean"?(kt(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,kt(t)&&(n=t,t=void 0),t=t||"");var i=St(),s=e?i._week.dow:0,a,o=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)o[a]=Dr(t,(a+s)%7,r,"day");return o}function xm(e,t){return ec(e,t,"months")}function ym(e,t){return ec(e,t,"monthsShort")}function bm(e,t,n){return ks(e,t,n,"weekdays")}function vm(e,t,n){return ks(e,t,n,"weekdaysShort")}function km(e,t,n){return ks(e,t,n,"weekdaysMin")}Pt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Pt);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",St);var pt=Math.abs;function Sm(){var e=this._data;return this._milliseconds=pt(this._milliseconds),this._days=pt(this._days),this._months=pt(this._months),e.milliseconds=pt(e.milliseconds),e.seconds=pt(e.seconds),e.minutes=pt(e.minutes),e.hours=pt(e.hours),e.months=pt(e.months),e.years=pt(e.years),this}function tc(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Em(e,t){return tc(this,e,t,1)}function Dm(e,t){return tc(this,e,t,-1)}function Pa(e){return e<0?Math.floor(e):Math.ceil(e)}function Tm(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,o,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Pa(Wi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),l=Ze(nc(t)),n+=l,t-=Pa(Wi(l)),o=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=o,this}function nc(e){return e*4800/146097}function Wi(e){return e*146097/4800}function Om(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+nc(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Wi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Am(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Et(e){return function(){return this.as(e)}}var Rm=Et("ms"),Mm=Et("s"),Im=Et("m"),Fm=Et("h"),Lm=Et("d"),Cm=Et("w"),Nm=Et("M"),Pm=Et("Q"),Um=Et("y");function Ym(){return st(this)}function Wm(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Xt(e){return function(){return this.isValid()?this._data[e]:NaN}}var Hm=Xt("milliseconds"),jm=Xt("seconds"),Bm=Xt("minutes"),Vm=Xt("hours"),Gm=Xt("days"),Zm=Xt("months"),qm=Xt("years");function zm(){return Ze(this.days()/7)}var _t=Math.round,ln={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function $m(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function Km(e,t,n,r){var i=st(e).abs(),s=_t(i.as("s")),a=_t(i.as("m")),o=_t(i.as("h")),l=_t(i.as("d")),f=_t(i.as("M")),d=_t(i.as("w")),u=_t(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,$m.apply(null,p)}function Xm(e){return e===void 0?_t:typeof e=="function"?(_t=e,!0):!1}function Jm(e,t){return ln[e]===void 0?!1:t===void 0?ln[e]:(ln[e]=t,e==="s"&&(ln.ss=t-1),!0)}function Qm(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ln,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ln,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=Km(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var hi=Math.abs;function nn(e){return(e>0)-(e<0)||+e}function Zr(){if(!this.isValid())return this.localeData().invalidDate();var e=hi(this._milliseconds)/1e3,t=hi(this._days),n=hi(this._months),r,i,s,a,o=this.asSeconds(),l,f,d,u;return o?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",f=nn(this._months)!==nn(o)?"-":"",d=nn(this._days)!==nn(o)?"-":"",u=nn(this._milliseconds)!==nn(o)?"-":"",l+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Vr.prototype;X.isValid=Gh;X.abs=Sm;X.add=Em;X.subtract=Dm;X.as=Om;X.asMilliseconds=Rm;X.asSeconds=Mm;X.asMinutes=Im;X.asHours=Fm;X.asDays=Lm;X.asWeeks=Cm;X.asMonths=Nm;X.asQuarters=Pm;X.asYears=Um;X.valueOf=Am;X._bubble=Tm;X.clone=Ym;X.get=Wm;X.milliseconds=Hm;X.seconds=jm;X.minutes=Bm;X.hours=Vm;X.days=Gm;X.weeks=zm;X.months=Zm;X.years=qm;X.humanize=Qm;X.toISOString=Zr;X.toString=Zr;X.toJSON=Zr;X.locale=Vl;X.localeData=Zl;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zr);X.lang=Gl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Wr);C("X",b0);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js +L.version="2.29.4";e0(oe);L.fn=M;L.min=Hh;L.max=jh;L.now=Bh;L.utc=ft;L.unix=wm;L.months=xm;L.isDate=Bn;L.locale=Pt;L.invalid=Cr;L.duration=st;L.isMoment=it;L.weekdays=bm;L.parseZone=gm;L.localeData=St;L.isDuration=dr;L.monthsShort=ym;L.weekdaysMin=km;L.defineLocale=ps;L.updateLocale=gh;L.locales=xh;L.weekdaysShort=vm;L.normalizeUnits=Ke;L.relativeTimeRounding=Xm;L.relativeTimeThreshold=Jm;L.calendarFormat=m1;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function ep(e,t,n){let r;return e.values&&e.values.length>0&&(r=e.values.map(i=>({uid:vt(n),name:i,type:"node",createdAt:t,editedAt:t}))),tp(e.key,n.attributes),n.summary.fields++,{uid:vt(n),name:e.key,type:"field",createdAt:t,editedAt:t,children:r}}function tp(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function np(e,t,n,r,i=Date.now()){var p;const[s,a]=(p=Ju(n))!=null?p:[[],0];let o=Cu(n,a),l=e;const f=o[0]&&o[0].content.match(/^title::(.+)$/);f&&(l=f[1],o=o.slice(1)),o[0]&&o[0].content.replace(/^#+/,"").trim()===l.trim()&&(o=o.slice(1));const d=[],u=rp(l,t,i,r,s);return nl(u,{type:Ut.ROOT,level:-1},o,Yu,w=>Xu(e,t,w,i,r),(w,D)=>{D.type===Ut.HEADING&&d.push({...D,uid:w.uid})}),o=null,r.headingTracker.pathMap.set(t,d),r.headingTracker.nameMap.get(e)||r.headingTracker.nameMap.set(e,d),u}function rp(e,t,n,r,i){let s;const a=[];i.forEach(d=>{d.key==="tags"?s=dl(d.values,r.superTagTracker,r.idGenerator):a.push(ep(d,n,r))});let o=bu(e,t,r),l="node";const f=ip(e,r.dailyNoteFormat);return f&&(o=f,l="date",e=f,r.summary.calendarNodes++),{uid:o,name:e,createdAt:n,editedAt:n,type:l,supertags:s,children:a.length>0?a:void 0}}function ip(e,t){const n=L(e,t,!0);return n.isValid()?n.format("MM-DD-YYYY"):null}function Ua(e,t){return e===t.length-1?"LAST":"NOT_LAST"}function sp(e,t){return e.adapter.readDirectory(t).filter(n=>{const r=t+Fr+n.getName();return n.isDirectory()&&!r.endsWith(".github")&&!r.endsWith(".obsidian")||!n.isDirectory()&&r.endsWith(".md")}).sort((n,r)=>Number(n.isDirectory())-Number(r.isDirectory()))}async function rc(e,t,n,r,i,s="LAST"){n(t);const a=sp(e,t);for(let o=0;o{const i=Ir(r),s=vt(n);n.adapter.appendToResultFile(e,`{ "uid": "${s}", "name": "${i}", "createdAt": ${t}, "editedAt": ${t}, "type": "node", "children": [ - `)}}function ap(e,t){return n=>{e.fileSystemAdapter.appendToFile(t,`] - }`),n!=="LAST"&&e.fileSystemAdapter.appendToFile(t,",")}}function op(e,t,n){return async(r,i)=>{const s=r.slice(n.vaultPath.length+1,-3),a=tp(Ir(r).replace(".md",""),s,await n.fileSystemAdapter.readFile(r),n,t);n.fileSystemAdapter.appendToFile(e,JSON.stringify(a,null,2)),i!=="LAST"&&n.fileSystemAdapter.appendToFile(e,",")}}async function lp(e,t=Date.now()){await e.fileSystemAdapter.initReadingVault(),await cp(e);const n=`${e.vaultPath}.tif.json`;try{e.fileSystemAdapter.removeFile(n)}catch{}e.fileSystemAdapter.appendToFile(n,`{ + `)}}function op(e,t){return n=>{e.adapter.appendToResultFile(t,`] + }`),n!=="LAST"&&e.adapter.appendToResultFile(t,",")}}function lp(e,t,n){return async(r,i)=>{const s=r.slice(n.vaultPath.length+1,-3),a=np(Ir(r).replace(".md",""),s,await n.adapter.readFile(r),n,t);n.adapter.appendToResultFile(e,JSON.stringify(a,null,2)),i!=="LAST"&&n.adapter.appendToResultFile(e,",")}}async function cp(e,t=Date.now()){await e.adapter.initReadingVault(),await dp(e);const n=`${e.vaultPath}.tif.json`;try{e.adapter.removeFile(n)}catch{}e.adapter.appendToResultFile(n,`{ "version": "TanaIntermediateFile V0.1", "nodes": [ -`),await ic(e,e.vaultPath,sp(n,t,e),ap(e,n),op(n,t,e)),nl(e.summary),await mu(n,e);const r=ku(Ir(e.vaultPath),t,e);r&&e.fileSystemAdapter.appendToFile(n,", "+JSON.stringify(r,null,2)),e.fileSystemAdapter.appendToFile(n,` - ]`);const i=Bu(e.superTagTracker);return i.length>0&&e.fileSystemAdapter.appendToFile(n,`, +`),await rc(e,e.vaultPath,ap(n,t,e),op(e,n),lp(n,t,e)),e.adapter.flushResultsFromInitialProcessing(n),tl(e.summary),await pu(n,e);const r=Su(Ir(e.vaultPath),t,e);r&&e.adapter.appendToResultFile(n,", "+JSON.stringify(r,null,2)),e.adapter.appendToResultFile(n,` + ]`);const i=Vu(e.superTagTracker);return i.length>0&&e.adapter.appendToResultFile(n,`, "supertags": -`+JSON.stringify(i,null,2)),e.attributes.length>0&&e.fileSystemAdapter.appendToFile(n,`, +`+JSON.stringify(i,null,2)),e.attributes.length>0&&e.adapter.appendToResultFile(n,`, "attributes": -`+JSON.stringify(e.attributes,null,2)),e.fileSystemAdapter.appendToFile(n,`, +`+JSON.stringify(e.attributes,null,2)),e.adapter.appendToResultFile(n,`, "summary": -`+JSON.stringify(e.summary,null,2)),e.fileSystemAdapter.appendToFile(n,` -}`),e.summary}async function cp(e){const t=e.vaultPath+"/.obsidian/daily-notes.json";if(e.fileSystemAdapter.exists(t)){const n=await e.fileSystemAdapter.readFile(t),r=JSON.parse(n.toString());r.format&&(e.dailyNoteFormat=r.format)}}async function dp(e,t,n,r){const i=new nu(e),s=su(t,i,r);return lp(s,n).then(a=>[a,s,i])}const fp=document.getElementById("vault-zip");fp.addEventListener("change",async e=>{let t;try{const n=e.target.files[0],r=n.name.slice(0,n.name.indexOf(".zip"));t=document.createElement("b"),t.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(t);const[i,,s]=await dp(n,r,1);document.body.removeChild(t);const a=document.createElement("b");a.innerHTML="Success!
",document.body.appendChild(a);const o=document.createElement("h2");o.innerText="Summary:",document.body.appendChild(o);const l=document.createElement("p");l.innerText=Object.entries(i).map(u=>u[0]+": "+u[1]).join(` -`),document.body.appendChild(l);const f=s.getResult(),d=document.createElement("button");d.innerText="Download TIF File",d.addEventListener("click",()=>{const u=URL.createObjectURL(new Blob([f])),p=document.createElement("a");p.style.display="none",p.href=u,p.download=r+".tif.json",document.body.appendChild(p),p.click(),URL.revokeObjectURL(u)}),document.body.appendChild(d)}catch(n){t&&document.body.removeChild(t);const r=n.stack.toString();document.body.appendChild(document.createElement("br"));const i=document.createElement("b");if(i.innerText="An Error occured.",document.body.appendChild(i),r.toLowerCase().includes("readdirectory")){document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`It probably has to do with a not properly zipped vault. +`+JSON.stringify(e.summary,null,2)),e.adapter.appendToResultFile(n,` +}`),e.adapter.flushResultsFromInitialProcessing(n),e.summary}async function dp(e){const t=await tu(e,"daily-notes",n=>n||{format:"YYYY-MM-DD"});e.dailyNoteFormat=t.format,console.log("Using daily notes format "+t.format+" for detecting calendar nodes.")}async function fp(e,t,n,r){const i=new nu(e),s=au(t,i,r);return cp(s,n).then(a=>[a,s,i])}const up=document.getElementById("vault-zip");up.addEventListener("change",async e=>{let t;try{const n=e.target.files[0],r=n.name.slice(0,n.name.indexOf(".zip"));t=document.createElement("b"),t.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(t);const[i,,s]=await fp(n,r,Date.now());document.body.removeChild(t);const a=document.createElement("b");a.innerHTML="Success!
",document.body.appendChild(a);const o=document.createElement("h2");o.innerText="Summary:",document.body.appendChild(o);const l=document.createElement("p");l.innerText=Object.entries(i).map(u=>u[0]+": "+u[1]).join(` +`),document.body.appendChild(l);const f=s.getResult(),d=document.createElement("button");d.innerText="Download TIF File",d.addEventListener("click",()=>{const u=URL.createObjectURL(new Blob([f])),p=document.createElement("a");p.style.display="none",p.href=u,p.download=r+".tif.json",document.body.appendChild(p),p.click(),URL.revokeObjectURL(u)}),document.body.appendChild(d)}catch(n){console.trace(n),t&&document.body.removeChild(t);const r=n.stack.toString();document.body.appendChild(document.createElement("br"));const i=document.createElement("b");if(i.innerText="An Error occured.",document.body.appendChild(i),r.toLowerCase().includes("readdirectory")){document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`It probably has to do with a not properly zipped vault. Please check the text at the top again.`,document.body.appendChild(a)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const s=document.createElement("b");s.innerText=`Content of Error (please post in the Slack): `+r,document.body.appendChild(s)}}); diff --git a/docs/index.html b/docs/index.html index 82d368a..605b196 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

diff --git a/src/converters/obsidian/ObsidianVaultConverter.ts b/src/converters/obsidian/ObsidianVaultConverter.ts index 838f11e..62fa589 100644 --- a/src/converters/obsidian/ObsidianVaultConverter.ts +++ b/src/converters/obsidian/ObsidianVaultConverter.ts @@ -3,27 +3,24 @@ import { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from ' import { shiftFromLeafToTop, VaultContext } from './VaultContext'; import { createSuperTagObjects } from './tanafeatures/supertags'; import { postProcessTIFFIle } from './links/headingLinks'; -import { basename } from './filesystem/CustomFileSystemAdapter'; +import { basename, readConfig } from './filesystem/CustomFileSystemAdapter'; /** * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults. * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly. */ export async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) { - await context.fileSystemAdapter.initReadingVault(); + await context.adapter.initReadingVault(); await loadDailyNotesConfig(context); const targetPath = `${context.vaultPath}.tif.json`; try { - context.fileSystemAdapter.removeFile(targetPath); + context.adapter.removeFile(targetPath); // eslint-disable-next-line no-empty } catch (e) {} - context.fileSystemAdapter.appendToResultFile( - targetPath, - '{\n "version": "TanaIntermediateFile V0.1",\n "nodes": [\n', - ); + context.adapter.appendToResultFile(targetPath, '{\n "version": "TanaIntermediateFile V0.1",\n "nodes": [\n'); await handleVault( context, @@ -32,7 +29,7 @@ export async function ObsidianVaultConverter(context: VaultContext, today: numbe addParentNodeEnd(context, targetPath), addFileNode(targetPath, today, context), ); - context.fileSystemAdapter.flushResultsFromInitialProcessing(targetPath); + context.adapter.flushResultsFromInitialProcessing(targetPath); //the vault-node needs to be counted as a top level node shiftFromLeafToTop(context.summary); @@ -45,47 +42,36 @@ export async function ObsidianVaultConverter(context: VaultContext, today: numbe const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context); if (collectedUnlinkedNodes) { //TODO: summary? - context.fileSystemAdapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2)); + context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2)); } //close vault-node children - context.fileSystemAdapter.appendToResultFile(targetPath, '\n ]'); + context.adapter.appendToResultFile(targetPath, '\n ]'); const superTags = createSuperTagObjects(context.superTagTracker); if (superTags.length > 0) { - context.fileSystemAdapter.appendToResultFile( - targetPath, - ',\n "supertags": \n' + JSON.stringify(superTags, null, 2), - ); + context.adapter.appendToResultFile(targetPath, ',\n "supertags": \n' + JSON.stringify(superTags, null, 2)); } if (context.attributes.length > 0) { - context.fileSystemAdapter.appendToResultFile( + context.adapter.appendToResultFile( targetPath, ',\n "attributes": \n' + JSON.stringify(context.attributes, null, 2), ); } - context.fileSystemAdapter.appendToResultFile( - targetPath, - ',\n "summary": \n' + JSON.stringify(context.summary, null, 2), - ); + context.adapter.appendToResultFile(targetPath, ',\n "summary": \n' + JSON.stringify(context.summary, null, 2)); //close target object - context.fileSystemAdapter.appendToResultFile(targetPath, '\n}'); - context.fileSystemAdapter.flushResultsFromInitialProcessing(targetPath); + context.adapter.appendToResultFile(targetPath, '\n}'); + context.adapter.flushResultsFromInitialProcessing(targetPath); return context.summary; } async function loadDailyNotesConfig(context: VaultContext) { - const dailyNotesConfigFile = context.vaultPath + '/.obsidian/daily-notes.json'; - - if (context.fileSystemAdapter.exists(dailyNotesConfigFile)) { - //if file does not exists, daily note config was kept default - const rawjson = await context.fileSystemAdapter.readFile(dailyNotesConfigFile); - const dailyNoteConfig = JSON.parse(rawjson.toString()); - if (dailyNoteConfig.format) { - context.dailyNoteFormat = dailyNoteConfig.format; - } - } + const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => { + return res ? res : { format: 'YYYY-MM-DD' }; + }); + context.dailyNoteFormat = config.format; + console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.'); } diff --git a/src/converters/obsidian/VaultContext.ts b/src/converters/obsidian/VaultContext.ts index 6e3a8db..575738b 100644 --- a/src/converters/obsidian/VaultContext.ts +++ b/src/converters/obsidian/VaultContext.ts @@ -28,10 +28,10 @@ export interface VaultContext { invalidLinks: { uid: string; link: string }[]; superTagTracker: SuperTagTracker; attributes: TanaIntermediateAttribute[]; - dailyNoteFormat: string; vaultPath: string; idGenerator: IdGenerator; - fileSystemAdapter: CustomFileSystemAdapter; + adapter: CustomFileSystemAdapter; + dailyNoteFormat: string; } export function incrementSummary(summary: TanaIntermediateSummary) { @@ -48,6 +48,7 @@ export function createVaultContext( vaultPath: string, fileSystemAdapter: CustomFileSystemAdapter, idGenerator: () => string = randomGenerator, + dailyNoteFormat = 'YYYY-MM-DD', ): VaultContext { if (vaultPath.endsWith(SEPARATOR)) { vaultPath = vaultPath.slice(0, -1); @@ -63,7 +64,7 @@ export function createVaultContext( fields: 0, brokenRefs: 0, }, - fileSystemAdapter, + adapter: fileSystemAdapter, idGenerator, vaultPath, defaultLinkTracker: new FileDescMap(), @@ -73,6 +74,6 @@ export function createVaultContext( invalidLinks: [], superTagTracker: new Map(), attributes: [], - dailyNoteFormat: 'YYYY-MM-DD', //Default obsidian Daily note format + dailyNoteFormat, }; } diff --git a/src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts b/src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts index 1a40a64..c1017b5 100644 --- a/src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts +++ b/src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts @@ -1,5 +1,8 @@ +import { VaultContext } from '../VaultContext'; + export interface CustomFileSystemAdapter { initReadingVault: () => Promise; + readDirectory: (dir: string) => CustomFileSystemEntry[]; readFile: (file: string) => Promise; exists: (path: string) => boolean; @@ -36,3 +39,16 @@ export function basename(str: string) { //TODO: add "join" method to adapter //in the browser I think its normalized to / but not on every os export const SEPARATOR = '/'; + +export async function readConfig( + context: VaultContext, + configSubPath: string, + checkResult: (res?: Result) => Result, +): Promise { + const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json'; + let res; + if (context.adapter.exists(configPath)) { + res = JSON.parse(await context.adapter.readFile(configPath)) as Result; + } + return checkResult(res); +} diff --git a/src/converters/obsidian/links/FileDescMap.ts b/src/converters/obsidian/links/FileDescMap.ts index a6105f5..276b0bb 100644 --- a/src/converters/obsidian/links/FileDescMap.ts +++ b/src/converters/obsidian/links/FileDescMap.ts @@ -4,57 +4,65 @@ function isPath(searchStr: string) { return basename(searchStr) !== searchStr; } -export class FileDescMap extends Map { - fullRetrieveAndUpdate(fileName: string, filePath: string, defaultData: () => Data) { - const files = Array.from(this.keys()); - let match = files.find((desc) => desc.path === filePath); - if (!match) { - match = files.find((desc) => desc.name === fileName); +//using a mix of fileName and filePath in the links might lead to random results +//usually obsidian changes the links properly +export class FileDescMap { + nameWasCalledAsFile: string[] = []; + pathMap = new Map(); + nameMap = new Map(); + + /** + * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name. + */ + accessAsFile(fileName: string, filePath: string, defaultData: () => Data) { + const pathMatch = this.pathMap.get(filePath); + if (pathMatch) { + if (!this.nameMap.get(fileName)) { + this.nameMap.set(fileName, pathMatch); + } + return pathMatch; } - if (!match) { - match = { path: filePath, name: fileName }; - this.set(match, defaultData()); + const nameMatch = this.nameMap.get(fileName); + //in this case this name-data comes from accessing it as a link first + if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) { + this.pathMap.set(filePath, nameMatch); + this.nameWasCalledAsFile.push(fileName); + return nameMatch; } - //update - match.name = fileName; - match.path = filePath; - - return this.get(match) as Data; + const data = defaultData(); + this.pathMap.set(filePath, data); + if (!this.nameMap.get(fileName)) { + this.nameMap.set(fileName, data); + } + this.nameWasCalledAsFile.push(fileName); + return data; } - partialRetrieveAndUpdate(searchStr: string, defaultData: () => Data) { - const files = Array.from(this.keys()); + accessAsLink(searchStr: string, defaultData: () => Data) { + const match = this.findData(searchStr); + if (match) { + return match; + } const isPathBool = isPath(searchStr); - let match; + const data = defaultData(); if (isPathBool) { - match = files.find((desc) => desc.path === searchStr); + this.pathMap.set(searchStr, data); } else { - match = files.find((desc) => desc.name === searchStr); - } - - if (!match) { - if (isPathBool) { - match = { path: searchStr }; - } else { - match = { name: searchStr }; - } - this.set(match, defaultData()); + this.nameMap.set(searchStr, data); } + return data; + } - return this.get(match) as Data; + findData(searchStr: string) { + return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr); } - findMatchingFile(searchStr: string) { - const files = Array.from(this.keys()); - const isPathBool = isPath(searchStr); - let match; - if (isPathBool) { - match = files.find((desc) => desc.path === searchStr); - } else { - match = files.find((desc) => desc.name === searchStr); - } - return match; + /** + * Includes all data, even if it was only accessed via link. + */ + getData() { + return new Set([...this.pathMap.values(), ...this.nameMap.values()]); } } diff --git a/src/converters/obsidian/links/blockLinks.ts b/src/converters/obsidian/links/blockLinks.ts index 7cfb512..917018e 100644 --- a/src/converters/obsidian/links/blockLinks.ts +++ b/src/converters/obsidian/links/blockLinks.ts @@ -18,7 +18,7 @@ export interface BlockUidData { export function blockLinkUidRequestForUsing(link: string[], context: VaultContext) { const fileName = link[0]; const blockObsidianUid = link[1]; - const blockUidMap = context.blockLinkTracker.partialRetrieveAndUpdate(fileName, () => { + const blockUidMap = context.blockLinkTracker.accessAsLink(fileName, () => { return new Map(); }); let blockUidData = blockUidMap.get(blockObsidianUid); @@ -37,7 +37,7 @@ export function blockLinkUidRequestForUsing(link: string[], context: VaultContex export function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) { const fileName = link[0]; const blockObsidianUid = link[1]; - const blockUidMap = context.blockLinkTracker.fullRetrieveAndUpdate(fileName, filePath, () => { + const blockUidMap = context.blockLinkTracker.accessAsFile(fileName, filePath, () => { return new Map(); }); let blockUidData = blockUidMap.get(blockObsidianUid); @@ -57,7 +57,7 @@ export function blockLinkUidRequestForDefining(link: string[], filePath: string, export function filterInvalidBlockLinks(tracker: BlockLinkTracker) { const unlinkedNodes: { uid: string; link: string }[] = []; - for (const fileBlockLinks of tracker.values()) { + for (const fileBlockLinks of tracker.getData()) { for (const blockLink of fileBlockLinks.values()) { //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid //because that means we didn't find it in "file" diff --git a/src/converters/obsidian/links/headingLinks.ts b/src/converters/obsidian/links/headingLinks.ts index 8682d1a..3807cbd 100644 --- a/src/converters/obsidian/links/headingLinks.ts +++ b/src/converters/obsidian/links/headingLinks.ts @@ -47,8 +47,8 @@ export function matchHeadingLinks( const missingHeadingLinks = []; const validHeadingLinks = []; for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) { - const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink); - const potentiallyMatchingNodes = matchingFileDesc ? tracker.get(matchingFileDesc) : null; + // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink); + const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink); if (potentiallyMatchingNodes) { //we use a dummy because the tree function needs one root node const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 }; @@ -94,19 +94,19 @@ export async function postProcessTIFFIle(filePath: string, context: VaultContext }); const tempPath = filePath + '_TEMP'; - context.fileSystemAdapter.initPostProcessingResultFile(filePath); + context.adapter.initPostProcessingResultFile(filePath); const regExes = validHeadingLinks.map((link) => ({ old: new RegExp(link.old, 'g'), new: link.new, })); - for await (const line of context.fileSystemAdapter.chunkIter()) { + for await (const line of context.adapter.chunkIter()) { let updatedLine = line; regExes.forEach((regEx) => { updatedLine = updatedLine.replace(regEx.old, regEx.new); }); - await context.fileSystemAdapter.appendToPostProcessingFile(tempPath, updatedLine); + await context.adapter.appendToPostProcessingFile(tempPath, updatedLine); } - context.fileSystemAdapter.endPostProcessingFile(tempPath); - context.fileSystemAdapter.removeFile(filePath); - context.fileSystemAdapter.renameFile(tempPath, filePath); + context.adapter.endPostProcessingFile(tempPath); + context.adapter.removeFile(filePath); + context.adapter.renameFile(tempPath, filePath); } diff --git a/src/converters/obsidian/links/internalLinks.ts b/src/converters/obsidian/links/internalLinks.ts index 4523e97..27ff6c2 100644 --- a/src/converters/obsidian/links/internalLinks.ts +++ b/src/converters/obsidian/links/internalLinks.ts @@ -44,6 +44,7 @@ export function requestUidForLink(obsidianLink: string, context: VaultContext) { const linkType = detectLinkType(cleanLink); switch (linkType) { case LinkType.DEFAULT: + //20 secs! return standardLinkUidRequest(cleanLink[0], context); case LinkType.BLOCK: return blockLinkUidRequestForUsing(cleanLink, context); @@ -55,7 +56,7 @@ export function requestUidForLink(obsidianLink: string, context: VaultContext) { } function standardLinkUidRequest(obsidianLink: string, context: VaultContext) { - const uidData = context.defaultLinkTracker.partialRetrieveAndUpdate(obsidianLink, () => { + const uidData = context.defaultLinkTracker.accessAsLink(obsidianLink, () => { incrementSummary(context.summary); const uid = context.idGenerator(); return { uid, obsidianLink, type: UidRequestType.CONTENT }; @@ -79,7 +80,7 @@ export function requestUidForContentNode(fileName: string, filePath: string, con export function requestUidForFile(fileName: string, filePath: string, context: VaultContext) { const obsidianLink = fileName.trim(); - const uidData = context.defaultLinkTracker.fullRetrieveAndUpdate(obsidianLink, filePath, () => { + const uidData = context.defaultLinkTracker.accessAsFile(obsidianLink, filePath, () => { incrementSummary(context.summary); const uid = context.idGenerator(); return { uid, obsidianLink, type: UidRequestType.FILE }; diff --git a/src/converters/obsidian/links/invalidLinks.ts b/src/converters/obsidian/links/invalidLinks.ts index 26724d0..cb1c8f4 100644 --- a/src/converters/obsidian/links/invalidLinks.ts +++ b/src/converters/obsidian/links/invalidLinks.ts @@ -6,7 +6,7 @@ import { UidRequestType } from './internalLinks'; export function filterInvalidContentLinks(tracker: UidTracker) { const unlinkedNodes: { uid: string; link: string }[] = []; - for (const node of tracker.values()) { + for (const node of tracker.getData()) { //at the end every uidData that has been only accessed from content (so inside the markdown file) //has no matching file node and is therefore unlinked //otherwise during the creation of the file node, it would have accessed the same Uid diff --git a/src/converters/obsidian/tanaconversion/fileConversion.ts b/src/converters/obsidian/tanaconversion/fileConversion.ts index fdb4b10..40c5e9d 100644 --- a/src/converters/obsidian/tanaconversion/fileConversion.ts +++ b/src/converters/obsidian/tanaconversion/fileConversion.ts @@ -57,7 +57,10 @@ export function convertObsidianFile( // eslint-disable-next-line @typescript-eslint/no-explicit-any obsidianNodes = null as any; - context.headingTracker.set({ name: displayName, path: filePath }, headingData); + context.headingTracker.pathMap.set(filePath, headingData); + if (!context.headingTracker.nameMap.get(fileName)) { + context.headingTracker.nameMap.set(fileName, headingData); + } return fileNode; } @@ -80,11 +83,13 @@ function createFileNode( } }); + //we need this uid request even if its a date node, only this way will other links to it work + //TODO: evaluate if it might not need to set dateDisplayName as uid? let nodeUid = requestUidForFile(displayName, filePath, context); let nodeType: NodeType = 'node'; const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat); - if (dateDisplayName.length > 0) { + if (dateDisplayName) { nodeUid = dateDisplayName; nodeType = 'date'; displayName = dateDisplayName; @@ -102,10 +107,10 @@ function createFileNode( }; } -function dateStringToDateUID(displayName: string, dateFormat: string): string { +function dateStringToDateUID(displayName: string, dateFormat: string) { const date = moment(displayName, dateFormat, true); if (date.isValid()) { return date.format('MM-DD-YYYY'); } - return ''; + return null; } diff --git a/src/converters/obsidian/tanaconversion/vaultConversion.ts b/src/converters/obsidian/tanaconversion/vaultConversion.ts index 54166dc..16f56f7 100644 --- a/src/converters/obsidian/tanaconversion/vaultConversion.ts +++ b/src/converters/obsidian/tanaconversion/vaultConversion.ts @@ -3,7 +3,7 @@ import { VaultContext } from '../VaultContext'; import { untrackedUidRequest } from '../links/genericLinks'; import { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter'; -enum ChildrenPosition { +export enum ChildrenPosition { NOT_LAST = 'NOT_LAST', LAST = 'LAST', } @@ -16,14 +16,24 @@ function getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) { return ChildrenPosition.NOT_LAST; } -function readFilteredDir(context: VaultContext, dir: string) { - return context.fileSystemAdapter.readDirectory(dir).filter((dirent) => { - const name = dir + SEPARATOR + dirent.getName(); - return ( - (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) || - (!dirent.isDirectory() && name.endsWith('.md')) - ); - }); +function readFilteredAndSortedDir(context: VaultContext, dir: string) { + return ( + context.adapter + .readDirectory(dir) + .filter((dirent) => { + const name = dir + SEPARATOR + dirent.getName(); + return ( + (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) || + (!dirent.isDirectory() && name.endsWith('.md')) + ); + }) + //folders at the end + //this is critically important so that the top level of files are read before any other files with the same names can be read + //E.g. + // vault/test is read before vault/folder/test + //if "test" is used as a link, we now we can safely use the first pathName that appeared + .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory())) + ); } export async function handleVault( @@ -35,7 +45,7 @@ export async function handleVault( childrenPosition: ChildrenPosition = ChildrenPosition.LAST, ) { handleDirStart(dir); - const dirents = readFilteredDir(context, dir); + const dirents = readFilteredAndSortedDir(context, dir); for (let index = 0; index < dirents.length; index++) { const dirent = dirents[index]; const res = dirent.getName(); @@ -52,7 +62,7 @@ export function addParentNodeStart(targetPath: string, today: number, context: V return (dir: string) => { const name = basename(dir); const uid = untrackedUidRequest(context); - context.fileSystemAdapter.appendToResultFile( + context.adapter.appendToResultFile( targetPath, `{ "uid": "${uid}", @@ -68,13 +78,13 @@ export function addParentNodeStart(targetPath: string, today: number, context: V export function addParentNodeEnd(context: VaultContext, targetPath: string) { return (childrenPosition: ChildrenPosition) => { - context.fileSystemAdapter.appendToResultFile( + context.adapter.appendToResultFile( targetPath, `] }`, ); if (childrenPosition !== ChildrenPosition.LAST) { - context.fileSystemAdapter.appendToResultFile(targetPath, ','); + context.adapter.appendToResultFile(targetPath, ','); } }; } @@ -87,13 +97,13 @@ export function addFileNode(targetPath: string, today: number, context: VaultCon const fileNode = convertObsidianFile( basename(file).replace('.md', ''), absoluteFilePath, - await context.fileSystemAdapter.readFile(file), + await context.adapter.readFile(file), context, today, ); - context.fileSystemAdapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2)); + context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2)); if (childrenPosition !== ChildrenPosition.LAST) { - context.fileSystemAdapter.appendToResultFile(targetPath, ','); + context.adapter.appendToResultFile(targetPath, ','); } }; } diff --git a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts index 99c87aa..b77b6e3 100644 --- a/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts +++ b/src/converters/obsidian/tests/ObsidianVaultConverter.test.ts @@ -16,6 +16,6 @@ test('obsidian vault converter', async () => { // console.log(JSON.stringify(result)); unlinkSync('./src/converters/obsidian/tests/fixtures/vault.tif.json'); const expected = JSON.parse(readFileSync('./src/converters/obsidian/tests/fixtures/full.tif.json', 'utf-8')); - expect(result).toStrictEqual(expected); expect(context.dailyNoteFormat).toBe('DD-MM-YYYY'); + expect(result).toStrictEqual(expected); }); diff --git a/src/converters/obsidian/tests/VaultContext.test.ts b/src/converters/obsidian/tests/VaultContext.test.ts index d0ba416..0276bde 100644 --- a/src/converters/obsidian/tests/VaultContext.test.ts +++ b/src/converters/obsidian/tests/VaultContext.test.ts @@ -4,7 +4,7 @@ import { getAllInvalidLinks } from '../links/invalidLinks'; import { untrackedUidRequest } from '../links/genericLinks'; import { createVaultContext } from '../VaultContext'; import { deterministicGenerator } from './testUtils'; -import { requestUidForLink, requestUidForContentNode } from '../links/internalLinks'; +import { requestUidForLink, requestUidForContentNode, requestUidForFile } from '../links/internalLinks'; import { CustomFileSystemAdapter } from '../filesystem/CustomFileSystemAdapter'; const dummyAdapter: CustomFileSystemAdapter = { resolve: (str: string) => str } as any; @@ -38,6 +38,66 @@ test('VaultContext uid test', () => { expect(requestUidForLink('link', context)).toBe('0'); }); +test('VaultContext file links: top level and mixed are unchanged', () => { + const context = createVaultContext('', dummyAdapter, deterministicGenerator()); + expect(requestUidForFile('fileName', 'fileName', context)).toBe('0'); + expect(requestUidForFile('fileName', 'filePath/fileName', context)).toBe('1'); + expect(requestUidForFile('fileName', 'filePath/fileName2', context)).toBe('2'); + + expect(requestUidForFile('fileName', 'fileName', context)).toBe('0'); + expect(requestUidForFile('fileName', 'filePath/fileName', context)).toBe('1'); + expect(requestUidForFile('fileName', 'filePath/fileName2', context)).toBe('2'); +}); + +test('VaultContext file links: top level and mixed order does matter', () => { + const context = createVaultContext('', dummyAdapter, deterministicGenerator()); + //this case should never happen, because we always read top level files first + expect(requestUidForFile('fileName', 'filePath/fileName', context)).toBe('0'); + //but if this would happen, we would misclassify this request + expect(requestUidForLink('fileName', context)).toBe('0'); + expect(requestUidForFile('fileName', 'fileName', context)).toBe('1'); + //and then correctly classify it once the top level file is read + expect(requestUidForLink('fileName', context)).toBe('1'); + expect(requestUidForFile('fileName', 'filePath/fileName2', context)).toBe('2'); + expect(requestUidForLink('fileName', context)).toBe('1'); +}); + +test('VaultContext file links: link is detected first', () => { + const context = createVaultContext('', dummyAdapter, deterministicGenerator()); + expect(requestUidForLink('fileName', context)).toBe('0'); + expect(requestUidForFile('fileName', 'fileName', context)).toBe('0'); +}); + +test('VaultContext nested file links link is detected first', () => { + const context = createVaultContext('', dummyAdapter, deterministicGenerator()); + expect(requestUidForLink('filePath/fileName', context)).toBe('0'); + expect(requestUidForFile('fileName', 'filePath/fileName', context)).toBe('0'); +}); + +test('VaultContext same filename test: files are handled first', () => { + const context = createVaultContext('', dummyAdapter, deterministicGenerator()); + expect(requestUidForFile('fileName', 'fileName', context)).toBe('0'); + expect(requestUidForFile('fileName', 'filePath/fileName', context)).toBe('1'); + expect(requestUidForLink('fileName', context)).toBe('0'); + expect(requestUidForLink('filePath/fileName', context)).toBe('1'); +}); + +test('VaultContext same filename test: files are handled after', () => { + const context = createVaultContext('', dummyAdapter, deterministicGenerator()); + expect(requestUidForLink('filePath/fileName', context)).toBe('0'); + expect(requestUidForLink('fileName', context)).toBe('1'); + expect(requestUidForFile('fileName', 'fileName', context)).toBe('1'); + expect(requestUidForFile('fileName', 'filePath/fileName', context)).toBe('0'); +}); + +test('VaultContext same filename test: files are handled mixed', () => { + const context = createVaultContext('', dummyAdapter, deterministicGenerator()); + expect(requestUidForLink('filePath/fileName', context)).toBe('0'); + expect(requestUidForFile('fileName', 'fileName', context)).toBe('1'); + expect(requestUidForLink('fileName', context)).toBe('1'); + expect(requestUidForFile('fileName', 'filePath/fileName', context)).toBe('0'); +}); + test('VaultContext uid block link test', () => { //first reading the file, then encountering the block ref const context = createVaultContext('', dummyAdapter, deterministicGenerator()); diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index 2f7eb0b..d1a814c 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -89,11 +89,11 @@ }, { "uid": "19", - "name": "[[35]]", + "name": "[[63]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["35"] + "refs": ["63"] }, { "uid": "21", @@ -128,113 +128,7 @@ ] }, { - "uid": "27", - "name": "folder", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { - "uid": "28", - "name": "folder", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [{ "uid": "22", "name": "test4", "createdAt": 1, "editedAt": 1, "type": "node" }] - }, - { - "uid": "18", - "name": "test", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "supertags": ["29", "30"], - "children": [ - { - "uid": "31", - "name": "Starting without [[5]] 2.", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "refs": ["5"] - }, - { - "uid": "32", - "name": "Heading here", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { "uid": "33", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, - { - "uid": "34", - "name": "Stuff but with\na newline.", - "createdAt": 1, - "editedAt": 1, - "type": "node" - }, - { - "uid": "35", - "name": "Heading 2", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { - "uid": "24", - "name": "Valid Heading [[41]] with duplicate but valid", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "refs": ["41"], - "children": [ - { - "uid": "37", - "name": "Node with [[13]] [[14]]", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "todoState": "done", - "refs": ["13", "14"] - }, - { - "uid": "38", - "name": "Fun with missing block ref [[39]] [[40]]", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "refs": ["39", "40"] - } - ] - }, - { - "uid": "41", - "name": "Out of Level", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "children": [ - { - "uid": "42", - "name": "Referencing a block [[24]]", - "createdAt": 1, - "editedAt": 1, - "type": "node", - "refs": ["24"] - } - ] - } - ] - } - ] - } - ] - }, - { "uid": "43", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" } - ] - }, - { - "uid": "18", + "uid": "34", "name": "test", "createdAt": 1, "editedAt": 1, @@ -242,26 +136,26 @@ "supertags": ["29", "30"], "children": [ { - "uid": "45", + "uid": "28", "name": "field0", "type": "field", "createdAt": 1, "editedAt": 1, - "children": [{ "uid": "44", "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1 }] + "children": [{ "uid": "27", "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1 }] }, { - "uid": "48", + "uid": "33", "name": "field1", "type": "field", "createdAt": 1, "editedAt": 1, "children": [ - { "uid": "46", "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1 }, - { "uid": "47", "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1 } + { "uid": "31", "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1 }, + { "uid": "32", "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1 } ] }, { - "uid": "49", + "uid": "35", "name": "Starting without [[5]].", "createdAt": 1, "editedAt": 1, @@ -269,51 +163,51 @@ "refs": ["5"] }, { - "uid": "50", + "uid": "36", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "51", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, - { "uid": "52", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "37", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, + { "uid": "38", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "53", + "uid": "39", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "54", "name": "```", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "40", "name": "```", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "55", - "name": "Invalid Heading [[!56!]]", + "uid": "41", + "name": "Invalid Heading [[!42!]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["!56!"], + "refs": ["!42!"], "children": [ { - "uid": "24", + "uid": "43", "name": "Block with #inlinetag2 [alias]([[13]]) [[13]] [[14]]", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["57", "58"], + "supertags": ["44", "45"], "refs": ["13", "14"] }, { - "uid": "59", + "uid": "46", "name": "#inlinetag2 Fun", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["57"] + "supertags": ["44"] } ] }, { - "uid": "60", + "uid": "47", "name": "(defn meta-data-finished? [process]\n (let [{meta-data :meta-data, :or {}} process\n {a :a, b :b, c :c} meta-data] ; any one could be missing!\n (not-any? nil? [a b c])))", "createdAt": 1, "editedAt": 1, @@ -321,15 +215,15 @@ "type": "codeblock" }, { - "uid": "61", + "uid": "48", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "62", "name": "code here", "createdAt": 1, "editedAt": 1, "type": "codeblock" }, + { "uid": "49", "name": "code here", "createdAt": 1, "editedAt": 1, "type": "codeblock" }, { - "uid": "63", + "uid": "50", "name": "single image", "createdAt": 1, "editedAt": 1, @@ -337,7 +231,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "64", + "uid": "51", "name": "single image some text", "createdAt": 1, "editedAt": 1, @@ -345,14 +239,14 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "65", - "name": "[[66]] [[67]]", + "uid": "52", + "name": "[[53]] [[54]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "66", + "uid": "53", "name": "multiple images", "createdAt": 1, "editedAt": 1, @@ -360,7 +254,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "67", + "uid": "54", "name": "multiple images 2", "createdAt": 1, "editedAt": 1, @@ -370,14 +264,14 @@ ] }, { - "uid": "68", - "name": "[[69]] [[69]]", + "uid": "55", + "name": "[[56]] [[56]]", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "69", + "uid": "56", "name": "same image", "createdAt": 1, "editedAt": 1, @@ -387,7 +281,7 @@ ] }, { - "uid": "70", + "uid": "57", "name": "ancient public baths", "createdAt": 1, "editedAt": 1, @@ -401,11 +295,117 @@ ] } ] + }, + { + "uid": "58", + "name": "folder", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "18", + "name": "test", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "supertags": ["29", "30"], + "children": [ + { + "uid": "59", + "name": "Starting without [[5]] 2.", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["5"] + }, + { + "uid": "60", + "name": "Heading here", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { "uid": "61", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, + { + "uid": "62", + "name": "Stuff but with\na newline.", + "createdAt": 1, + "editedAt": 1, + "type": "node" + }, + { + "uid": "63", + "name": "Heading 2", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "24", + "name": "Valid Heading [[48]] with duplicate but valid", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["48"], + "children": [ + { + "uid": "65", + "name": "Node with [[13]] [[14]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "todoState": "done", + "refs": ["13", "14"] + }, + { + "uid": "66", + "name": "Fun with missing block ref [[67]] [[68]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["67", "68"] + } + ] + }, + { + "uid": "69", + "name": "Out of Level", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "70", + "name": "Referencing a block [[43]]", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "refs": ["43"] + } + ] + } + ] + } + ] + } + ] + }, + { "uid": "71", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" }, + { + "uid": "72", + "name": "folder", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [{ "uid": "22", "name": "test4", "createdAt": 1, "editedAt": 1, "type": "node" }] + } + ] } ] }, { - "uid": "71", + "uid": "73", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, @@ -413,24 +413,24 @@ "children": [ { "uid": "26", "name": "folder/folder/test", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "5", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "!56!", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "!42!", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "13", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "14", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "40", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "68", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "8", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "39", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "67", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ], "supertags": [ { "name": "supertag1", "uid": "29" }, { "name": "supertag2", "uid": "30" }, - { "name": "inlinetag2", "uid": "57" }, - { "name": "inlinetag1", "uid": "58" } + { "name": "inlinetag2", "uid": "44" }, + { "name": "inlinetag1", "uid": "45" } ], "attributes": [ { "name": "field0", "values": [], "count": 2 }, { "name": "field1", "values": [], "count": 1 } ], - "summary": { "leafNodes": 64, "topLevelNodes": 2, "totalNodes": 66, "calendarNodes": 1, "fields": 3, "brokenRefs": 0 } + "summary": { "leafNodes": 66, "topLevelNodes": 2, "totalNodes": 68, "calendarNodes": 1, "fields": 3, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/vault.zip b/src/converters/obsidian/tests/fixtures/vault.zip index 76687ee800cea390c91179ff3525dc9ff6064c14..1805b4d170a3d04290c68a39bbb7cd895d93732b 100644 GIT binary patch delta 180 zcmca2c13K0E^}|9&qMCsyZycpKlyF*0x5;5oU0S!%L6lP&Y4{hpK4nLH+P z2~6J4B*qR@k_^@)HTfHpA@k1FK>bpaU6?JIYr4Rin5Rzgn>?3U3#M}OIc6(HW`(^F z6Tfo_O*Uth0NJ!Ti1i`!XJu(0Q diff --git a/src/converters/obsidian/tests/headingLinks.test.ts b/src/converters/obsidian/tests/headingLinks.test.ts index 60090df..78c94e5 100644 --- a/src/converters/obsidian/tests/headingLinks.test.ts +++ b/src/converters/obsidian/tests/headingLinks.test.ts @@ -4,7 +4,7 @@ import { HeadingTracker, HeadingDummyUidTracker, matchHeadingLinks } from '../li test('headingLinks test', () => { const headingTracker: HeadingTracker = new FileDescMap(); - headingTracker.set({ name: 'fileName' }, [ + headingTracker.nameMap.set('fileName', [ { uid: '1', level: 1, content: '1' }, { uid: '2', level: 2, content: '2' }, { uid: '3', level: 3, content: '3' }, @@ -12,11 +12,11 @@ test('headingLinks test', () => { { uid: '1_2', level: 1, content: '1_2' }, { uid: '4_2', level: 3, content: '4' }, ]); - headingTracker.set({ name: 'fileName2' }, [ + headingTracker.nameMap.set('fileName2', [ { uid: '3', level: 3, content: '3' }, { uid: '1', level: 1, content: '1' }, ]); - headingTracker.set({ name: 'fileName3' }, []); //empty is handled fine + headingTracker.nameMap.set('fileName3', []); //empty is handled fine const headingLinks: HeadingDummyUidTracker = new Map(); headingLinks.set('fileName', [ { uid: 'OLD_2', link: ['1', '2'] }, diff --git a/src/converters/obsidian/tests/vaultConversion.test.ts b/src/converters/obsidian/tests/vaultConversion.test.ts new file mode 100644 index 0000000..f3c7b32 --- /dev/null +++ b/src/converters/obsidian/tests/vaultConversion.test.ts @@ -0,0 +1,45 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import { expect, test } from 'vitest'; +import { CustomFileSystemEntry } from '../filesystem/CustomFileSystemAdapter'; +import { ChildrenPosition, handleVault } from '../tanaconversion/vaultConversion'; +import { VaultContext } from '../VaultContext'; + +const makeDirEnt = ([str, isDir]: [string, boolean]): CustomFileSystemEntry => { + return { getName: () => str, isDirectory: () => isDir }; +}; + +test('vaultConversion file filter test', async () => { + // GIVEN + const order: string[] = []; + const handleDirStart = (dir: string) => { + order.push(dir); + }; + const handleFile = (file: string, pos: ChildrenPosition) => { + order.push(file); + return Promise.resolve(); + }; + // eslint-disable-next-line @typescript-eslint/no-empty-function + const handleDirEnd = (children: ChildrenPosition) => {}; + + const dirContent = [ + [ + ['file1.md', false], + ['folder1', true], + ['file2.md', false], + ['NOT_MD', false], + ['.obsidian', true], + ['file3.md', false], + ['folder2', true], + ['.github', true], + ].map((e) => makeDirEnt(e as [string, boolean])), + [['file4.md', false]].map((e) => makeDirEnt(e as [string, boolean])), + [], + ].reverse(); + + const readDirectory = (dir: string) => dirContent.pop(); + // WHEN + await handleVault({ adapter: { readDirectory } } as VaultContext, 'vault', handleDirStart, handleDirEnd, handleFile); + // THEN + // folders have been filtered out and the rest of the folders have been sorted to the back + expect(order).toStrictEqual(['vault', 'file1.md', 'file2.md', 'file3.md', 'folder1', 'file4.md', 'folder2']); +}); From 9e156071fa035b6283b5efe411f67a4afb57a9af Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 17 Oct 2022 02:26:41 +0200 Subject: [PATCH 73/94] Obsidian: add seconds counter to webpage --- src/script.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/script.ts b/src/script.ts index 3d2b52b..e1cd634 100644 --- a/src/script.ts +++ b/src/script.ts @@ -3,6 +3,7 @@ import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaul const zipInput = document.getElementById('vault-zip') as HTMLInputElement; zipInput.addEventListener('change', async (event) => { let progress; + let seconds = 0; try { const zipFile = ((event.target as HTMLInputElement).files as FileList)[0]; @@ -10,12 +11,13 @@ zipInput.addEventListener('change', async (event) => { progress = document.createElement('b'); progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
'; document.body.appendChild(progress); - + const cancel = setInterval(() => seconds++, 1000); const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now()); + clearInterval(cancel); document.body.removeChild(progress); const success = document.createElement('b'); - success.innerHTML = 'Success!
'; + success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
'; document.body.appendChild(success); const summaryHeading = document.createElement('h2'); From 5e3ea31da3414b94f518b58faf790240cf59987e Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 17 Oct 2022 02:26:54 +0200 Subject: [PATCH 74/94] Obsidian: add seconds counter to webpage (2) --- .../{index.cc37ed43.js => index.17b16c1c.js} | 16 ++++++++-------- docs/index.html | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) rename docs/assets/{index.cc37ed43.js => index.17b16c1c.js} (91%) diff --git a/docs/assets/index.cc37ed43.js b/docs/assets/index.17b16c1c.js similarity index 91% rename from docs/assets/index.cc37ed43.js rename to docs/assets/index.17b16c1c.js index 1478ddb..9aa994c 100644 --- a/docs/assets/index.cc37ed43.js +++ b/docs/assets/index.17b16c1c.js @@ -1,5 +1,5 @@ -var uc=Object.defineProperty;var hc=(e,t,n)=>t in e?uc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var jt=(e,t,n)=>(hc(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const Fn=15,mi=30,pi=19,mc=29,ur=256,Hi=ur+1+mc,Ms=2*Hi+1,bn=256,pc=7,Is=16,Fs=17,Ls=18,$r=8*2,hr=-1,_c=1,qn=2,wc=0,rn=0,Cs=1,gc=3,Le=4,Qe=0,Ya=1,zn=2,et=-2,xc=-3,Qt=-5;function Tr(e){return Or(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function Or(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?Or(n):n),[])}const Ns=[0,1,2,3].concat(...Tr([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function se(){const e=this;function t(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,f=e.stat_desc.max_length;let d,u,p,w,D,h,c=0;for(w=0;w<=Fn;w++)i.bl_count[w]=0;for(s[i.heap[i.heap_max]*2+1]=0,d=i.heap_max+1;df&&(w=f,c++),s[u*2+1]=w,!(u>e.max_code)&&(i.bl_count[w]++,D=0,u>=l&&(D=o[u-l]),h=s[u*2],i.opt_len+=h*(w+D),a&&(i.static_len+=h*(a[u*2+1]+D)));if(c!==0){do{for(w=f-1;i.bl_count[w]===0;)w--;i.bl_count[w]--,i.bl_count[w+1]+=2,i.bl_count[f]--,c-=2}while(c>0);for(w=f;w!==0;w--)for(u=i.bl_count[w];u!==0;)p=i.heap[--d],!(p>e.max_code)&&(s[p*2+1]!=w&&(i.opt_len+=(w-s[p*2+1])*s[p*2],s[p*2+1]=w),u--)}}function n(i,s){let a=0;do a|=i&1,i>>>=1,a<<=1;while(--s>0);return a>>>1}function r(i,s,a){const o=[];let l=0,f,d,u;for(f=1;f<=Fn;f++)o[f]=l=l+a[f-1]<<1;for(d=0;d<=s;d++)u=i[d*2+1],u!==0&&(i[d*2]=n(o[u]++,u))}e.build_tree=function(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.elems;let l,f,d=-1,u;for(i.heap_len=0,i.heap_max=Ms,l=0;l=1;l--)i.pqdownheap(s,l);u=o;do l=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(s,1),f=i.heap[1],i.heap[--i.heap_max]=l,i.heap[--i.heap_max]=f,s[u*2]=s[l*2]+s[f*2],i.depth[u]=Math.max(i.depth[l],i.depth[f])+1,s[l*2+1]=s[f*2+1]=u,i.heap[1]=u++,i.pqdownheap(s,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],t(i),r(s,e.max_code,i.bl_count)}}se._length_code=[0,1,2,3,4,5,6,7].concat(...Tr([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));se.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];se.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];se.d_code=function(e){return e<256?Ns[e]:Ns[256+(e>>>7)]};se.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];se.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];se.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];se.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function De(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}const yc=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],bc=Tr([[144,8],[112,9],[24,7],[8,8]]);De.static_ltree=Or(yc.map((e,t)=>[e,bc[t]]));const vc=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],kc=Tr([[30,5]]);De.static_dtree=Or(vc.map((e,t)=>[e,kc[t]]));De.static_l_desc=new De(De.static_ltree,se.extra_lbits,ur+1,Hi,Fn);De.static_d_desc=new De(De.static_dtree,se.extra_dbits,0,mi,Fn);De.static_bl_desc=new De(null,se.extra_blbits,0,pi,pc);const Sc=9,Ec=8;function at(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const Wa=0,sr=1,Zt=2,Je=[new at(0,0,0,0,Wa),new at(4,4,8,4,sr),new at(4,5,16,8,sr),new at(4,6,32,32,sr),new at(4,4,16,16,Zt),new at(8,16,32,32,Zt),new at(8,16,128,128,Zt),new at(8,32,128,256,Zt),new at(32,128,258,1024,Zt),new at(32,258,258,4096,Zt)],$n=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ge=0,Kn=1,vn=2,Xn=3,Dc=32,Kr=42,Jn=113,kn=666,Xr=8,Tc=0,Jr=1,Oc=2,ce=3,ar=258,Ye=ar+ce+1;function Ps(e,t,n,r){const i=e[t*2],s=e[n*2];return i=3&&j[se.bl_order[T]*2+1]===0;T--);return e.opt_len+=3*(T+1)+5+5+4,T}function Ve(T){e.pending_buf[e.pending++]=T}function Tt(T){Ve(T&255),Ve(T>>>8&255)}function xn(T){Ve(T>>8&255),Ve(T&255&255)}function Ee(T,R){let A;const I=R;ge>$r-I?(A=T,ue|=A<>>$r-ge,ge+=I-$r):(ue|=T<=8&&(Ve(ue&255),ue>>>=8,ge-=8)}function sc(){Ee(Jr<<1,3),Ue(bn,De.static_ltree),Ss(),1+Se+10-ge<9&&(Ee(Jr<<1,3),Ue(bn,De.static_ltree),Ss()),Se=7}function yn(T,R){let A,I,P;if(e.dist_buf[V]=T,e.lc_buf[V]=R&255,V++,T===0?N[R*2]++:(Z++,T--,N[(se._length_code[R]+ur+1)*2]++,Y[se.d_code(T)*2]++),(V&8191)===0&&O>2){for(A=V*8,I=g-m,P=0;P>>=3,Z8?Tt(ue):ge>0&&Ve(ue&255),ue=0,ge=0}function ac(T,R,A){Ds(),Se=8,A&&(Tt(R),Tt(~R)),e.pending_buf.set(l.subarray(T,T+R),e.pending),e.pending+=R}function Ts(T,R,A){Ee((Tc<<1)+(A?1:0),3),ac(T,R,!0)}function oc(T,R,A){let I,P,G=0;O>0?(q.build_tree(e),we.build_tree(e),G=gn(),I=e.opt_len+3+7>>>3,P=e.static_len+3+7>>>3,P<=I&&(I=P)):I=P=R+5,R+4<=I&&T!=-1?Ts(T,R,A):P==I?(Ee((Jr<<1)+(A?1:0),3),Es(De.static_ltree,De.static_dtree)):(Ee((Oc<<1)+(A?1:0),3),ic(q.max_code+1,we.max_code+1,G+1),Es(N,Y)),Dt(),A&&Ds()}function Ot(T){oc(m>=0?m:-1,g-m,T),m=g,t.flush_pending()}function qr(){let T,R,A,I;do{if(I=f-x-g,I===0&&g===0&&x===0)I=s;else if(I==-1)I--;else if(g>=s+s-Ye){l.set(l.subarray(s,s+s),0),y-=s,g-=s,m-=s,T=w,A=T;do R=u[--A]&65535,u[A]=R>=s?R-s:0;while(--T!==0);T=s,A=T;do R=d[--A]&65535,d[A]=R>=s?R-s:0;while(--T!==0);I+=s}if(t.avail_in===0)return;T=t.read_buf(l,g+x,I),x+=T,x>=ce&&(p=l[g]&255,p=(p<r-5&&(R=r-5);;){if(x<=1){if(qr(),x===0&&T==rn)return Ge;if(x===0)break}if(g+=x,x=0,A=m+R,(g===0||g>=A)&&(x=g-A,g=A,Ot(!1),t.avail_out===0)||g-m>=s-Ye&&(Ot(!1),t.avail_out===0))return Ge}return Ot(T==Le),t.avail_out===0?T==Le?vn:Ge:T==Le?Xn:Kn}function Os(T){let R=k,A=g,I,P,G=E;const K=g>s-Ye?g-(s-Ye):0;let Me=B;const Xe=o,zr=g+ar;let As=l[A+G-1],Rs=l[A+G];E>=F&&(R>>=2),Me>x&&(Me=x);do if(I=T,!(l[I+G]!=Rs||l[I+G-1]!=As||l[I]!=l[A]||l[++I]!=l[A+1])){A+=2,I++;do;while(l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&AG){if(y=T,G=P,P>=Me)break;As=l[A+G-1],Rs=l[A+G]}}while((T=d[T&Xe]&65535)>K&&--R!==0);return G<=x?G:x}function cc(T){let R=0,A;for(;;){if(x=ce&&(p=(p<=ce)if(A=yn(g-y,_-ce),x-=_,_<=S&&x>=ce){_--;do g++,p=(p<=ce&&(p=(p<4096)&&(_=ce-1)),E>=ce&&_<=E){I=g+x-ce,A=yn(g-1-b,E-ce),x-=E-1,E-=2;do++g<=I&&(p=(p<Sc||I!=Xr||A<9||A>15||R<0||R>9||G<0||G>qn?et:(T.dstate=e,a=A,s=1<9||A<0||A>qn?et:(Je[O].func!=Je[R].func&&T.total_in!==0&&(I=T.deflate(Cs)),O!=R&&(O=R,S=Je[O].max_lazy,F=Je[O].good_length,B=Je[O].nice_length,k=Je[O].max_chain),U=A,I)},e.deflateSetDictionary=function(T,R,A){let I=A,P,G=0;if(!R||n!=Kr)return et;if(Is-Ye&&(I=s-Ye,G=A-I),l.set(R.subarray(G,G+I),0),g=I,m=I,p=l[0]&255,p=(p<Le||R<0)return et;if(!T.next_out||!T.next_in&&T.avail_in!==0||n==kn&&R!=Le)return T.msg=$n[zn-et],et;if(T.avail_out===0)return T.msg=$n[zn-Qt],Qt;if(t=T,G=i,i=R,n==Kr&&(I=Xr+(a-8<<4)<<8,P=(O-1&255)>>1,P>3&&(P=3),I|=P<<6,g!==0&&(I|=Dc),I+=31-I%31,n=Jn,xn(I)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,Qe}else if(t.avail_in===0&&R<=G&&R!=Le)return t.msg=$n[zn-Qt],Qt;if(n==kn&&t.avail_in!==0)return T.msg=$n[zn-Qt],Qt;if(t.avail_in!==0||x!==0||R!=rn&&n!=kn){switch(K=-1,Je[O].func){case Wa:K=lc(R);break;case sr:K=cc(R);break;case Zt:K=dc(R);break}if((K==vn||K==Xn)&&(n=kn),K==Ge||K==vn)return t.avail_out===0&&(i=-1),Qe;if(K==Kn){if(R==Cs)sc();else if(Ts(0,0,!1),R==gc)for(A=0;An&&(i=n),i===0?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Rc(e){const t=this,n=new Ha,r=Mc(e&&e.chunkSize?e.chunkSize:64*1024),i=rn,s=new Uint8Array(r);let a=e?e.level:hr;typeof a>"u"&&(a=hr),n.deflateInit(a),n.next_out=s,t.append=function(o,l){let f,d,u=0,p=0,w=0;const D=[];if(!!o.length){n.next_in_index=0,n.next_in=o,n.avail_in=o.length;do{if(n.next_out_index=0,n.avail_out=r,f=n.deflate(i),f!=Qe)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?D.push(new Uint8Array(s)):D.push(s.slice(0,n.next_out_index))),w+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=u&&(l(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return D.length>1?(d=new Uint8Array(w),D.forEach(function(h){d.set(h,p),p+=h.length})):d=D[0]||new Uint8Array,d}},t.flush=function(){let o,l,f=0,d=0;const u=[];do{if(n.next_out_index=0,n.avail_out=r,o=n.deflate(Le),o!=Ya&&o!=Qe)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&u.push(s.slice(0,n.next_out_index)),d+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),l=new Uint8Array(d),u.forEach(function(p){l.set(p,f),f+=p.length}),l}}function Mc(e){return e+5*(Math.floor(e/16383)+1)}const Ic=15,J=0,xt=1,Fc=2,Ne=-2,ae=-3,Us=-4,yt=-5,We=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ja=1440,Lc=0,Cc=4,Nc=9,Pc=5,Uc=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Yc=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Wc=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Hc=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],jc=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Bc=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],At=15;function _i(){const e=this;let t,n,r,i,s,a;function o(f,d,u,p,w,D,h,c,m,_,b){let v,g,y,x,E,k,S,O,U,F,B,N,Y,j,q;F=0,E=u;do r[f[d+F]]++,F++,E--;while(E!==0);if(r[0]==u)return h[0]=-1,c[0]=0,J;for(O=c[0],k=1;k<=At&&r[k]===0;k++);for(S=k,OE&&(O=E),c[0]=O,j=1<N+O;){if(x++,N+=O,q=y-N,q=q>O?O:q,(g=1<<(k=S-N))>v+1&&(g-=v+1,Y=S,kja)return ae;s[x]=B=_[0],_[0]+=q,x!==0?(a[x]=E,i[0]=k,i[1]=O,k=E>>>N-O,i[2]=B-s[x-1]-k,m.set(i,(s[x-1]+k)*3)):h[0]=B}for(i[1]=S-N,F>=u?i[0]=128+64:b[F]>>N;k>>=1)E^=k;for(E^=k,U=(1<257?(_==ae?m.msg="oversubscribed distance tree":_==yt?(m.msg="incomplete distance tree",_=ae):_!=Us&&(m.msg="empty distance tree with lengths",_=ae),_):J)}}_i.inflate_trees_fixed=function(e,t,n,r){return e[0]=Nc,t[0]=Pc,n[0]=Uc,r[0]=Yc,J};const Qn=0,Ys=1,Ws=2,Hs=3,js=4,Bs=5,Vs=6,Qr=7,Gs=8,er=9;function Vc(){const e=this;let t,n=0,r,i=0,s=0,a=0,o=0,l=0,f=0,d=0,u,p=0,w,D=0;function h(c,m,_,b,v,g,y,x){let E,k,S,O,U,F,B,N,Y,j,q,we,W,he,V,Z;B=x.next_in_index,N=x.avail_in,U=y.bitb,F=y.bitk,Y=y.write,j=Y>=k[Z+1],F-=k[Z+1],y.win[Y++]=k[Z+2],j--;continue}do{if(U>>=k[Z+1],F-=k[Z+1],(O&16)!==0){for(O&=15,W=k[Z+2]+(U&We[O]),U>>=O,F-=O;F<15;)N--,U|=(x.read_byte(B++)&255)<>=k[Z+1],F-=k[Z+1],(O&16)!==0){for(O&=15;F>=O,F-=O,j-=W,Y>=he)V=Y-he,Y-V>0&&2>Y-V?(y.win[Y++]=y.win[V++],y.win[Y++]=y.win[V++],W-=2):(y.win.set(y.win.subarray(V,V+2),Y),Y+=2,V+=2,W-=2);else{V=Y-he;do V+=y.end;while(V<0);if(O=y.end-V,W>O){if(W-=O,Y-V>0&&O>Y-V)do y.win[Y++]=y.win[V++];while(--O!==0);else y.win.set(y.win.subarray(V,V+O),Y),Y+=O,V+=O,O=0;V=0}}if(Y-V>0&&W>Y-V)do y.win[Y++]=y.win[V++];while(--W!==0);else y.win.set(y.win.subarray(V,V+W),Y),Y+=W,V+=W,W=0;break}else if((O&64)===0)E+=k[Z+2],E+=U&We[O],Z=(S+E)*3,O=k[Z];else return x.msg="invalid distance code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae;while(!0);break}if((O&64)===0){if(E+=k[Z+2],E+=U&We[O],Z=(S+E)*3,(O=k[Z])===0){U>>=k[Z+1],F-=k[Z+1],y.win[Y++]=k[Z+2],j--;break}}else return(O&32)!==0?(W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,xt):(x.msg="invalid literal/length code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae)}while(!0)}while(j>=258&&N>=10);return W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,J}e.init=function(c,m,_,b,v,g){t=Qn,f=c,d=m,u=_,p=b,w=v,D=g,r=null},e.proc=function(c,m,_){let b,v,g,y=0,x=0,E=0,k,S,O,U;for(E=m.next_in_index,k=m.avail_in,y=c.bitb,x=c.bitk,S=c.write,O=S=258&&k>=10&&(c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,_=h(f,d,u,p,w,D,c,m),E=m.next_in_index,k=m.avail_in,y=c.bitb,x=c.bitk,S=c.write,O=S>>=r[v+1],x-=r[v+1],g=r[v],g===0){a=r[v+2],t=Vs;break}if((g&16)!==0){o=g&15,n=r[v+2],t=Ws;break}if((g&64)===0){s=g,i=v/3+r[v+2];break}if((g&32)!==0){t=Qr;break}return t=er,m.msg="invalid literal/length code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,c.inflate_flush(m,_);case Ws:for(b=o;x>=b,x-=b,s=d,r=w,i=D,t=Hs;case Hs:for(b=s;x>=r[v+1],x-=r[v+1],g=r[v],(g&16)!==0){o=g&15,l=r[v+2],t=js;break}if((g&64)===0){s=g,i=v/3+r[v+2];break}return t=er,m.msg="invalid distance code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,c.inflate_flush(m,_);case js:for(b=o;x>=b,x-=b,t=Bs;case Bs:for(U=S-l;U<0;)U+=c.end;for(;n!==0;){if(O===0&&(S==c.end&&c.read!==0&&(S=0,O=S7&&(x-=8,k++,E--),c.write=S,_=c.inflate_flush(m,_),S=c.write,O=Sh.avail_out&&(m=h.avail_out),m!==0&&c==yt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m,b==n.end&&(b=0,n.write==n.end&&(n.write=0),m=n.write-b,m>h.avail_out&&(m=h.avail_out),m!==0&&c==yt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m),h.next_out_index=_,n.read=b,c},n.proc=function(h,c){let m,_,b,v,g,y,x,E;for(v=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y>>1){case 0:_>>>=3,b-=3,m=b&7,_>>>=m,b-=m,r=ei;break;case 1:k=[],S=[],O=[[]],U=[[]],_i.inflate_trees_fixed(k,S,O,U),d.init(k[0],S[0],O[0],0,U[0],0),_>>>=3,b-=3,r=tr;break;case 2:_>>>=3,b-=3,r=zs;break;case 3:return _>>>=3,b-=3,r=Bt,h.msg="invalid block type",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c)}break;case ei:for(;b<32;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(v++)&255)<>>16&65535)!=(_&65535))return r=Bt,h.msg="invalid stored block lengths",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);i=_&65535,_=b=0,r=i!==0?qs:u!==0?nr:en;break;case qs:if(g===0||x===0&&(y==n.end&&n.read!==0&&(y=0,x=yg&&(m=g),m>x&&(m=x),n.win.set(h.read_buf(v,m),y),v+=m,g-=m,y+=m,x-=m,(i-=m)!==0)break;r=u!==0?nr:en;break;case zs:for(;b<14;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(v++)&255)<29||(m>>5&31)>29)return r=Bt,h.msg="too many length or distance symbols",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);if(m=258+(m&31)+(m>>5&31),!o||o.length>>=14,b-=14,a=0,r=$s;case $s:for(;a<4+(s>>>10);){for(;b<3;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(v++)&255)<>>=3,b-=3}for(;a<19;)o[Zs[a++]]=0;if(l[0]=7,m=D.inflate_trees_bits(o,l,f,p,h),m!=J)return c=m,c==ae&&(o=null,r=Bt),n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);a=0,r=Ks;case Ks:for(;m=s,!(a>=258+(m&31)+(m>>5&31));){let j,q;for(m=l[0];b>>=m,b-=m,o[a++]=q;else{for(E=q==18?7:q-14,j=q==18?11:3;b>>=m,b-=m,j+=_&We[E],_>>>=E,b-=E,E=a,m=s,E+j>258+(m&31)+(m>>5&31)||q==16&&E<1)return o=null,r=Bt,h.msg="invalid bit length repeat",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);q=q==16?o[E-1]:0;do o[E++]=q;while(--j!==0);a=E}}if(f[0]=-1,F=[],B=[],N=[],Y=[],F[0]=9,B[0]=6,m=s,m=D.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),o,F,B,N,Y,p,h),m!=J)return m==ae&&(o=null,r=Bt),c=m,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);d.init(F[0],B[0],p,N[0],p,Y[0]),r=tr;case tr:if(n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,(c=d.proc(n,h,c))!=xt)return n.inflate_flush(h,c);if(c=J,d.free(h),v=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y15?(e.inflateEnd(n),Ne):(e.wbits=r,n.istate.blocks=new Gc(n,1<>4)+8>a.wbits){a.mode=Rt,n.msg="invalid win size",a.marker=5;break}a.mode=Js;case Js:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,s=n.read_byte(n.next_in_index++)&255,((a.method<<8)+s)%31!==0){a.mode=Rt,n.msg="incorrect header check",a.marker=5;break}if((s&Zc)===0){a.mode=Sn;break}a.mode=Qs;case Qs:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,a.mode=ea;case ea:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,a.mode=ta;case ta:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,a.mode=na;case na:return n.avail_in===0?i:(i=r,n.avail_in--,n.total_in++,a.need+=n.read_byte(n.next_in_index++)&255,a.mode=ti,Fc);case ti:return a.mode=Rt,n.msg="need dictionary",a.marker=0,Ne;case Sn:if(i=a.blocks.proc(n,i),i==ae){a.mode=Rt,a.marker=0;break}if(i==J&&(i=r),i!=xt)return i;i=r,a.blocks.reset(n,a.was),a.mode=ra;case ra:return n.avail_in=0,xt;case Rt:return ae;default:return Ne}},e.inflateSetDictionary=function(n,r,i){let s=0,a=i;if(!n||!n.istate||n.istate.mode!=ti)return Ne;const o=n.istate;return a>=1<0&&n.next_in_index!=p&&(l(n.next_in_index),p=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return f.length>1?(u=new Uint8Array(D),f.forEach(function(h){u.set(h,w),w+=h.length})):u=f[0]||new Uint8Array,u}},t.flush=function(){n.inflateEnd()}}const pe=4294967295,ke=65535,wi=8,Va=0,Ga=99,Za=67324752,ji=134695760,Jc=ji,gi=33639248,qa=101010256,xi=101075792,za=117853008,an=22,An=20,Rn=56,Qc=an+An+Rn,$a=1,Ka=39169,Xa=10,Ja=1,Bi=21589,ed=28789,td=25461,yi=1,nd=6,bi=8,vi=2048,ki=16,rd=20,ia=45,sa=51,or="/",aa=new Date(2107,11,31),oa=new Date(1980,0,1),fe=void 0,mr="undefined",Qa="function";class la{constructor(t){return class extends TransformStream{constructor(n,r){const i=new t(r);super({transform(s,a){a.enqueue(i.append(s))},flush(s){const a=i.flush();a&&s.enqueue(a)}})}}}}const id=64;let eo=2;try{typeof navigator!=mr&&navigator.hardwareConcurrency&&(eo=navigator.hardwareConcurrency)}catch{}const sd={chunkSize:512*1024,maxWorkers:eo,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:fe,CompressionStreamNative:typeof CompressionStream!=mr&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=mr&&DecompressionStream},Ft=Object.assign({},sd);function Vi(){return Ft}function to(e){return Math.max(e.chunkSize,id)}function Gi(e){const{baseURL:t,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:i,useCompressionStream:s,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:f,DecompressionStream:d,workerScripts:u}=e;if(Mt("baseURL",t),Mt("chunkSize",n),Mt("maxWorkers",r),Mt("terminateWorkerTimeout",i),Mt("useCompressionStream",s),Mt("useWebWorkers",a),o&&(Ft.CompressionStream=new la(o)),l&&(Ft.DecompressionStream=new la(l)),Mt("CompressionStream",f),Mt("DecompressionStream",d),u!==fe){const{deflate:p,inflate:w}=u;if((p||w)&&(Ft.workerScripts||(Ft.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");Ft.workerScripts.deflate=p}if(w){if(!Array.isArray(w))throw new Error("workerScripts.inflate must be an array");Ft.workerScripts.inflate=w}}}function Mt(e,t){t!==fe&&(Ft[e]=t)}const En={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin",cap:["cap","pcap"],"cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",javascript:"js",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":"odm","vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-debian-package":["deb","udeb"],"x-director":["dcr","dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-koan":["skp","skd","skt","skm"],"x-kpresenter":["kpr","kpt"],"x-kword":["kwd","kwt"],"x-latex":"latex","x-lha":"lha","x-lyx":"lyx","x-lzh":"lzh","x-lzx":"lzx","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-ms-wmd":"wmd","x-ms-wmz":"wmz","x-msdos-program":["com","exe","bat","dll"],"x-msi":"msi","x-netcdf":["nc","cdf"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":"rpm","x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tcl":"tcl","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-troff":["t","tr","roff"],"x-troff-man":"man","x-troff-me":"me","x-troff-ms":"ms","x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix",json:"json","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":"mathml",mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","x-msdownload":["exe","dll","com","bat","msi"],"x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tads":"gam","x-tex":"tex","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-compressed":"tgz","x-gzip":"gz","x-perfmon":["pma","pmc","pml","pmr","pmw"],"x-pkcs7-mime":["p7c","p7m"],"ynd.ms-pkipko":"pko"},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":["aif","aiff","aifc"],"x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2","x-wav":"wav",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":["mmd","mmod"],"x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":["sd","sdf"],"x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","mpc","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":["val","aso"],"x-pdb":["pdb","ent"],"x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-photoshop":"psd","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",pipeg:"jfif"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":["x3d","x3dz"],"x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:["tm","ts"],"tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{avif:".avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","vrml","wrl","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const t in En)if(En.hasOwnProperty(t)){for(const n in En[t])if(En[t].hasOwnProperty(n)){const r=En[t][n];if(typeof r=="string")e[r]=t+"/"+n;else for(let i=0;i>>1^3988292384:t=t>>>1;no[e]=t}class pr{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let r=0,i=t.length|0;r>>8^no[(n^t[r])&255];this.crc=n}get(){return~this.crc}}class ro extends TransformStream{constructor(){const t=new pr;super({transform(n){t.append(n)},flush(n){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t.get()),n.enqueue(r)}})}}function Si(e){if(typeof TextEncoder>"u"){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n0&&t&&(e[n-1]=Fe.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let a=0;a>>t),n=e[a]<<32-t;const i=e.length?e[e.length-1]:0,s=Fe.getPartial(i);return r.push(Fe.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},_r={bytes:{fromBits(e){const n=Fe.bitLength(e)/8,r=new Uint8Array(n);let i;for(let s=0;s>>24,i<<=8;return r},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let o=t.blockSize+r-(t.blockSize+r&t.blockSize-1);o<=i;o+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=Fe.concat(t,[Fe.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r},_S(e,t){return t<>>32-e},_block(e){const t=this,n=t._h,r=Array(80);for(let f=0;f<16;f++)r[f]=e[f];let i=n[0],s=n[1],a=n[2],o=n[3],l=n[4];for(let f=0;f<=79;f++){f>=16&&(r[f]=t._S(1,r[f-3]^r[f-8]^r[f-14]^r[f-16]));const d=t._S(5,i)+t._f(f,s,a,o)+l+r[f]+t._key[Math.floor(f/20)]|0;l=o,o=a,a=t._S(30,s),s=i,i=d}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+l|0}};const io={};io.aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,o,l=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;s<4*i+28;s++){let f=a[s-1];(s%i===0||i===8&&s%i===4)&&(f=n[f>>>24]<<24^n[f>>16&255]<<16^n[f>>8&255]<<8^n[f&255],s%i===0&&(f=f<<8^f>>>24^l<<24,l=l<<1^(l>>7)*283)),a[s]=a[s-i]^f}for(let f=0;s;f++,s--){const d=a[f&3?s:s-4];s<=4||f<4?o[f]=d:o[f]=r[0][n[d>>>24]]^r[1][n[d>>16&255]]^r[2][n[d>>8&255]]^r[3][n[d&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,o,l,f;for(let d=0;d<256;d++)s[(i[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let u=a^a<<1^a<<2^a<<3^a<<4;u=u>>8^u&255^99,n[d]=u,r[u]=d,f=i[l=i[o=i[d]]];let p=f*16843009^l*65537^o*257^d*16843008,w=i[u]*257^u*16843008;for(let D=0;D<4;D++)e[D][d]=w=w<<24^w>>>8,t[D][u]=p=p<<24^p>>>8}for(let d=0;d<5;d++)e[d]=e[d].slice(0),t[d]=t[d].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],l=s[2],f=s[3],d=s[4];let u=e[0]^n[0],p=e[t?3:1]^n[1],w=e[2]^n[2],D=e[t?1:3]^n[3],h=4,c,m,_;for(let b=0;b>>24]^o[p>>16&255]^l[w>>8&255]^f[D&255]^n[h],m=a[p>>>24]^o[w>>16&255]^l[D>>8&255]^f[u&255]^n[h+1],_=a[w>>>24]^o[D>>16&255]^l[u>>8&255]^f[p&255]^n[h+2],D=a[D>>>24]^o[u>>16&255]^l[p>>8&255]^f[w&255]^n[h+3],h+=4,u=c,p=m,w=_;for(let b=0;b<4;b++)i[t?3&-b:b]=d[u>>>24]<<24^d[p>>16&255]<<16^d[w>>8&255]<<8^d[D&255]^n[h++],c=u,u=p,p=w,w=D,D=c;return i}};const ad={getRandomValues(e){const t=new Uint32Array(e.buffer),n=r=>{let i=987654321;const s=4294967295;return function(){return i=36969*(i&65535)+(i>>16)&s,r=18e3*(r&65535)+(r>>16)&s,(((i<<16)+r&s)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r>24&255)===255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=Fe.bitLength(t);for(let s=0;s>5)+1<<2;let s,a,o,l,f;const d=new ArrayBuffer(i),u=new DataView(d);let p=0;const w=Fe;for(t=_r.bytes.toBits(t),f=1;p<(i||1);f++){for(s=a=e.encrypt(w.concat(t,[f])),o=1;oi&&(e=n.hash(e));for(let s=0;sthis.resolveReady=i),password:t,signed:n,strength:r-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;o?(await bd(a,l,o,qe(i,0,Ln[l]+2)),i=qe(i,Ln[l]+2),f()):await d;const u=new Uint8Array(i.length-It-(i.length-It)%on);s.enqueue(po(a,i,u,0,It,!0))},async flush(i){const{signed:s,ctr:a,hmac:o,pending:l,ready:f}=this;await f;const d=qe(l,0,l.length-It),u=qe(l,l.length-It);let p=new Uint8Array;if(d.length){const w=Nn(lt,d);o.update(w);const D=a.update(w);p=Cn(lt,D)}if(s){const w=qe(Cn(lt,o.digest()),0,It);for(let D=0;Dthis.resolveReady=i),password:t,strength:n-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;let u=new Uint8Array;o?(u=await vd(a,l,o),f()):await d;const p=new Uint8Array(u.length+i.length-i.length%on);p.set(u,0),s.enqueue(po(a,i,p,u.length,0))},async flush(i){const{ctr:s,hmac:a,pending:o,ready:l}=this;await l;let f=new Uint8Array;if(o.length){const d=s.update(Nn(lt,o));a.update(d),f=Cn(lt,d)}r.signature=Cn(lt,a.digest()).slice(0,It),i.enqueue(qi(f,r.signature))}}),r=this}}function po(e,t,n,r,i,s){const{ctr:a,hmac:o,pending:l}=e,f=t.length-i;l.length&&(t=qi(l,t),n=Ed(n,f-f%on));let d;for(d=0;d<=f-on;d+=on){const u=Nn(lt,qe(t,d,d+on));s&&o.update(u);const p=a.update(u);s||o.update(p),n.set(Cn(lt,p),d+r)}return e.pending=qe(t,d),n}async function bd(e,t,n,r){const i=await _o(e,t,n,qe(r,0,Ln[t])),s=qe(r,Ln[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new Error(ao)}async function vd(e,t,n){const r=lo(new Uint8Array(Ln[t])),i=await _o(e,t,n,r);return qi(r,i)}async function _o(e,t,n,r){e.password=null;const i=Si(n),s=await kd(ld,i,fd,!1,ud),a=await Sd(Object.assign({salt:r},fo),s,8*(Dn[t]*2+2)),o=new Uint8Array(a),l=Nn(lt,qe(o,0,Dn[t])),f=Nn(lt,qe(o,Dn[t],Dn[t]*2)),d=qe(o,Dn[t]*2);return Object.assign(e,{keys:{key:l,authentication:f,passwordVerification:d},ctr:new wd(new _d(l),Array.from(hd)),hmac:new gd(f)}),d}function kd(e,t,n,r,i){return md?Hn.importKey(e,t,n,r,i):Wn.importKey(t)}async function Sd(e,t,n){return pd?await Hn.deriveBits(e,t,n):Wn.pbkdf2(t,e.salt,fo.iterations,n)}function qi(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Ed(e,t){if(t&&t>e.length){const n=e;e=new Uint8Array(t),e.set(n,0)}return e}function qe(e,t,n){return e.subarray(t,n)}function Cn(e,t){return e.fromBits(t)}function Nn(e,t){return e.toBits(t)}const cn=12;class Dd extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),wo(this,t)},transform(r,i){const s=this;if(s.password){const a=ca(s,r.subarray(0,cn));if(s.password=null,a[cn-1]!=s.passwordVerification)throw new Error(ao);r=r.subarray(cn)}i.enqueue(ca(s,r))}})}}class Td extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),wo(this,t)},transform(r,i){const s=this;let a,o;if(s.password){s.password=null;const l=lo(new Uint8Array(cn));l[cn-1]=s.passwordVerification,a=new Uint8Array(r.length+l.length),a.set(da(s,l),0),o=cn}else a=new Uint8Array(r.length),o=0;a.set(da(s,r),o),i.enqueue(a)}})}}function ca(e,t){const n=new Uint8Array(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function go(e){const t=e.keys[2]|2;return xo(Math.imul(t,t^1)>>>8)}function xo(e){return e&255}function fa(e){return e&4294967295}const ua="deflate-raw";class Od extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:r,CompressionStreamNative:i}){super({});const{compressed:s,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:f,level:d}=t,u=this;let p,w,D=yo(super.readable);(!a||l)&&f&&([D,p]=D.tee(),p=ct(p,new ro)),s&&(D=vo(D,o,{level:d,chunkSize:n},i,r)),a&&(l?D=ct(D,new Td(t)):(w=new yd(t),D=ct(D,w))),bo(u,D,async()=>{let h;a&&!l&&(h=w.signature),(!a||l)&&f&&(h=await p.getReader().read(),h=new DataView(h.value.buffer).getUint32(0)),u.signature=h})}}class Ad extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:r,DecompressionStreamNative:i}){super({});const{zipCrypto:s,encrypted:a,signed:o,signature:l,compressed:f,useCompressionStream:d}=t;let u,p,w=yo(super.readable);a&&(s?w=ct(w,new Dd(t)):(p=new xd(t),w=ct(w,p))),f&&(w=vo(w,d,{chunkSize:n},i,r)),(!a||s)&&o&&([w,u]=w.tee(),u=ct(u,new ro)),bo(this,w,async()=>{if((!a||s)&&o){const D=await u.getReader().read(),h=new DataView(D.value.buffer);if(l!=h.getUint32(0,!1))throw new Error(oo)}})}}function yo(e){return ct(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function bo(e,t,n){t=ct(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function vo(e,t,n,r,i){try{const s=t&&r?r:i;e=ct(e,new s(ua,n))}catch(s){if(t)e=ct(e,new i(ua,n));else throw s}return e}function ct(e,t){return e.pipeThrough(t)}const Rd="message",Md="start",Id="pull",ha="data",Fd="ack",Ld="close",ko="deflate",So="inflate";class Cd extends TransformStream{constructor(t,n){super({});const r=this,{codecType:i}=t;let s;i.startsWith(ko)?s=Od:i.startsWith(So)&&(s=Ad);let a=0;const o=new s(t,n),l=super.readable,f=new TransformStream({transform(d,u){d&&d.length&&(a+=d.length,u.enqueue(d))},flush(){const{signature:d}=o;Object.assign(r,{signature:d,size:a})}});Object.defineProperty(r,"readable",{get(){return l.pipeThrough(o).pipeThrough(f)}})}}const Nd=typeof Worker!=mr;class ni{constructor(t,{readable:n,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:f},d){const{signal:u}=a;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new Pd(n,a,s),{signal:u}),writable:r,options:Object.assign({},i),scripts:f,transferStreams:l,terminate(){const{worker:p,busy:w}=t;p&&!w&&(p.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,d(t)}}),(o&&Nd?Yd:Ud)(t,s)}}class Pd extends TransformStream{constructor(t,{onstart:n,onprogress:r,size:i,onend:s},{chunkSize:a}){let o=0;super({start(){n&&ri(n,i)},async transform(l,f){o+=l.length,r&&await ri(r,o,i),f.enqueue(l)},flush(){t.size=o,s&&ri(s,o)}},{highWaterMark:1,size:()=>a})}}async function ri(e,...t){try{await e(...t)}catch{}}function Ud(e,t){return{run:()=>Wd(e,t)}}function Yd(e,{baseURL:t,chunkSize:n}){return e.interface||Object.assign(e,{worker:Bd(e.scripts[0],t,e),interface:{run:()=>Hd(e,{chunkSize:n})}}),e.interface}async function Wd({options:e,readable:t,writable:n,onTaskFinished:r},i){const s=new Cd(e,i);try{await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,size:o}=s;return{signature:a,size:o}}finally{r()}}async function Hd(e,t){let n,r;const i=new Promise((p,w)=>{n=p,r=w});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});const{readable:s,options:a,scripts:o}=e,{writable:l,closed:f}=jd(e.writable);Ei({type:Md,scripts:o.slice(1),options:a,config:t,readable:s,writable:l},e)||Object.assign(e,{reader:s.getReader(),writer:l.getWriter()});const u=await i;try{await l.close()}catch{}return await f,u}function jd(e){const t=e.getWriter();let n;const r=new Promise(s=>n=s);return{writable:new WritableStream({async write(s){await t.ready,await t.write(s)},close(){t.releaseLock(),n()},abort(s){return t.abort(s)}}),closed:r}}let ma=!0,pa=!0;function Bd(e,t,n){const r={type:"module"};let i,s;typeof e==Qa&&(e=e());try{i=new URL(e,t)}catch{i=e}if(ma)try{s=new Worker(i)}catch{ma=!1,s=new Worker(i,r)}else s=new Worker(i,r);return s.addEventListener(Rd,a=>Vd(a,n)),s}function Ei(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:s,readable:a,writable:o}=e;const l=[];if(s){const{buffer:f,length:d}=s;d!=f.byteLength&&(s=new Uint8Array(s)),e.value=s.buffer,l.push(e.value)}if(i&&pa?(a&&l.push(a),o&&l.push(o)):e.readable=e.writable=null,l.length)try{return t.postMessage(e,l),!0}catch{pa=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(s){throw n&&n.releaseLock(),r(),s}}async function Vd({data:e},t){const{type:n,value:r,messageId:i,result:s,error:a}=e,{reader:o,writer:l,resolveResult:f,rejectResult:d,onTaskFinished:u}=t;try{if(a){const{message:w,stack:D,code:h,name:c}=a,m=new Error(w);Object.assign(m,{stack:D,code:h,name:c}),p(m)}else{if(n==Id){const{value:w,done:D}=await o.read();Ei({type:ha,value:w,done:D,messageId:i},t)}n==ha&&(await l.ready,await l.write(new Uint8Array(r)),Ei({type:Fd,messageId:i},t)),n==Ld&&p(null,s)}}catch(w){p(w)}function p(w,D){w?d(w):f(D),l&&l.releaseLock(),u()}}let Vt=[];const ii=[];let _a=0;async function Eo(e,t){const{options:n,config:r}=t,{transferStreams:i,useWebWorkers:s,useCompressionStream:a,codecType:o,compressed:l,signed:f,encrypted:d}=n,{workerScripts:u,maxWorkers:p,terminateWorkerTimeout:w}=r;t.transferStreams=i||i===fe;const D=!l&&!f&&!d&&!t.transferStreams;t.useWebWorkers=!D&&(s||s===fe&&r.useWebWorkers),t.scripts=t.useWebWorkers&&u?u[o]:[],n.useCompressionStream=a||a===fe&&r.useCompressionStream;let h;const c=Vt.find(_=>!_.busy);if(c)wa(c),h=new ni(c,e,t,m);else if(Vt.lengthii.push({resolve:_,stream:e,workerOptions:t}));return h.run();function m(_){if(ii.length){const[{resolve:b,stream:v,workerOptions:g}]=ii.splice(0,1);b(new ni(_,v,g,m))}else _.worker?(wa(_),Number.isFinite(w)&&w>=0&&(_.terminateTimeout=setTimeout(()=>{Vt=Vt.filter(b=>b!=_),_.terminate()},w))):Vt=Vt.filter(b=>b!=_)}}function wa(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function Gd(e){const t=()=>URL.createObjectURL(new Blob([`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:"PBKDF2"},B=t.assign({hash:{name:"HMAC"}},R),E=t.assign({iterations:1e3,hash:{name:"SHA-1"}},R),M=["deriveBits"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&"function"==typeof T.importKey,L=N&&W&&"function"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s("Invalid password")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s("Invalid signature")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey("raw",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s("Invalid password");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s("Invalid signature")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)("deflate-raw",n))}catch(r){if(!t)throw r;e=pe(e,new s("deflate-raw",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=le:s.startsWith("inflate")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:"pull",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:"data",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:"close",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&ke(e),"data"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe="oversubscribed dynamic bit lengths tree":-5!=a&&0!==r[0]||(f.Oe="incomplete dynamic bit lengths tree",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe="oversubscribed literal/length tree":-4!=h&&(w.Oe="incomplete literal/length tree",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe="oversubscribed distance tree":-5==h?(w.Oe="incomplete distance tree",h=-3):-4!=h&&(w.Oe="empty distance tree with lengths",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe="invalid distance code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe="invalid literal/length code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe="invalid literal/length code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe="invalid distance code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe="invalid block type",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe="invalid stored block lengths",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe="too many length or distance symbols",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe="invalid bit length repeat",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe="need dictionary",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye}; -`],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}const Do="HTTP error ",Rr="HTTP Range not supported",Zd="Writer iterator completed too soon",qd="text/plain",zd="Content-Length",$d="Content-Range",Kd="Accept-Ranges",Xd="Range",Jd="Content-Type",Qd="HEAD",$i="GET",To="bytes",ef=64*1024,Ki="writable";class Mr{constructor(){this.size=0}init(){this.initialized=!0}}class Yt extends Mr{get readable(){const t=this,{chunkSize:n=ef}=t,r=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:s=0,size:a,diskNumberStart:o}=r,{chunkOffset:l}=this;i.enqueue(await Ie(t,s+l,Math.min(n,a-l),o)),l+n>a?i.close():this.chunkOffset+=n}});return r}}class Oo extends Mr{constructor(){super();const t=this,n=new WritableStream({write(r){return t.writeUint8Array(r)}});Object.defineProperty(t,Ki,{get(){return n}})}writeUint8Array(){}}class Di extends Yt{constructor(t){super();let n=t.length;for(;t.charAt(n-1)=="=";)n--;const r=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:r,size:Math.floor((n-r)*.75)})}readUint8Array(t,n){const{dataStart:r,dataURI:i}=this,s=new Uint8Array(n),a=Math.floor(t/3)*4,o=atob(i.substring(a+r,Math.ceil((t+n)/3)*4+r)),l=t-Math.floor(a/4)*3;for(let f=l;f2?n.data+=btoa(i):n.pending=i}getData(){return this.data+btoa(this.pending)}}class mn extends Yt{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){const r=this;return new Uint8Array(await r.blob.slice(t,t+n).arrayBuffer())}}class $t extends Mr{constructor(t){super();const n=this,r=new TransformStream,i=[];t&&i.push([Jd,t]),Object.defineProperty(n,Ki,{get(){return r.writable}}),n.blob=new Response(r.readable,{headers:i}).blob()}getData(){return this.blob}}class Ao extends mn{constructor(t){super(new Blob([t],{type:qd}))}}class Ti extends $t{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:n}=this,r=await super.getData();if(r.text&&n)return r.text();{const i=new FileReader;return new Promise((s,a)=>{Object.assign(i,{onload:({target:o})=>s(o.result),onerror:()=>a(i.error)}),i.readAsText(r,t)})}}}class tf extends Yt{constructor(t,n){super(),Ro(this,t,n)}async init(){super.init(),await Mo(this,Oi,ga)}readUint8Array(t,n){return Io(this,t,n,Oi,ga)}}class nf extends Yt{constructor(t,n){super(),Ro(this,t,n)}async init(){super.init(),await Mo(this,Ai,xa)}readUint8Array(t,n){return Io(this,t,n,Ai,xa)}}function Ro(e,t,n){const{preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s}=n;n=Object.assign({},n),delete n.preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.useXHR,Object.assign(e,{url:t,options:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s})}async function Mo(e,t,n){const{url:r,useRangeHeader:i,forceRangeRequests:s}=e;if(sf(r)&&(i||s)){const{headers:a}=await t($i,e,Fo(e));if(!s&&a.get(Kd)!=To)throw new Error(Rr);{let o;const l=a.get($d);if(l){const f=l.trim().split(/\s*\/\s*/);if(f.length){const d=f[1];d&&d!="*"&&(o=Number(d))}}o===fe?await ya(e,t,n):e.size=o}}else await ya(e,t,n)}async function Io(e,t,n,r,i){const{data:s,useRangeHeader:a,forceRangeRequests:o,options:l}=e;if(a||o){const f=await r($i,e,Fo(e,t,n));if(f.status!=206)throw new Error(Rr);return new Uint8Array(await f.arrayBuffer())}else return s||await i(e,l),new Uint8Array(s.subarray(t,t+n))}function Fo(e,t=0,n=1){return Object.assign({},Xi(e),{[Xd]:To+"="+t+"-"+(t+n-1)})}function Xi({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function ga(e){await Lo(e,Oi)}async function xa(e){await Lo(e,Ai)}async function Lo(e,t){const n=await t($i,e,Xi(e));e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function ya(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t(Qd,e,Xi(e))).headers.get(zd);i?e.size=Number(i):await n(e,e.options)}}async function Oi(e,{options:t,url:n},r){const i=await fetch(n,Object.assign({},t,{method:e,headers:r}));if(i.status<400)return i;throw i.status==416?new Error(Rr):new Error(Do+(i.statusText||i.status))}function Ai(e,{url:t},n){return new Promise((r,i)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",()=>{if(s.status<400){const a=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(o=>{const l=o.trim().split(/\s*:\s*/);l[0]=l[0].trim().replace(/^[a-z]|-[a-z]/g,f=>f.toUpperCase()),a.push(l)}),r({status:s.status,arrayBuffer:()=>s.response,headers:new Map(a)})}else i(s.status==416?new Error(Rr):new Error(Do+(s.statusText||s.status)))},!1),s.addEventListener("error",a=>i(a.detail.error),!1),s.open(e,t),n)for(const a of Object.entries(n))s.setRequestHeader(a[0],a[1]);s.responseType="arraybuffer",s.send()})}class ba extends Yt{constructor(t,n={}){super(),Object.assign(this,{url:t,reader:n.useXHR?new nf(t,n):new tf(t,n)})}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(t,n){return this.reader.readUint8Array(t,n)}}class Ri extends Yt{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,n){return this.array.slice(t,t+n)}}class gr extends Oo{init(t=0){super.init(),Object.assign(this,{offset:0,array:new Uint8Array(t)})}writeUint8Array(t){const n=this;if(n.offset+t.length>n.array.length){const r=n.array;n.array=new Uint8Array(r.length+t.length),n.array.set(r)}n.array.set(t,n.offset),n.offset+=t.length}getData(){return this.array}}class rf extends Yt{constructor(t){super(),this.readers=t}async init(){super.init();const t=this,{readers:n}=t;t.lastDiskNumber=0,await Promise.all(n.map(async r=>{await r.init(),t.size+=r.size}))}async readUint8Array(t,n,r=0){const i=this,{readers:s}=this;let a,o=r;o==-1&&(o=s.length-1);let l=t;for(;l>=s[o].size;)l-=s[o].size,o++;const f=s[o],d=f.size;if(l+n<=d)a=await Ie(f,l,n);else{const u=d-l;a=new Uint8Array(n),a.set(await Ie(f,l,u)),a.set(await i.readUint8Array(t+u,n-u,r),u)}return i.lastDiskNumber=Math.max(o,i.lastDiskNumber),a}}class va extends Mr{constructor(t,n=4294967296){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,availableSize:n});let i,s,a;const o=new WritableStream({async write(d){if(a)if(i.size+d.length>=n){const u=n-i.size;await l(d.slice(0,u)),await f(),r.diskOffset+=i.size,r.diskNumber++,a=null,await this.write(d.slice(u))}else d.length&&await l(d),r.availableSize=n-i.size;else{const{value:u,done:p}=await t.next();if(p&&!u)throw new Error(Zd);i=u,i.size=0,s=u.writable,a=s.getWriter(),await this.write(d)}},async close(){await a.ready,await f()}});Object.defineProperty(r,Ki,{get(){return o}});async function l(d){await a.ready,await a.write(d),i.size+=d.length,r.size+=d.length}async function f(){s.size=i.size,await a.close()}}}function sf(e){const{baseURL:t}=Vi(),{protocol:n}=new URL(e,t);return n=="http:"||n=="https:"}async function ze(e,t){e.init&&!e.initialized&&await e.init(t)}function Ie(e,t,n,r){return e.readUint8Array(t,n,r)}const Co="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),af=Co.length==256;function of(e){if(af){let t="";for(let n=0;nthis[n]=t[n])}}const si="File format is not recognized",ff="End of central directory not found",uf="End of Zip64 central directory not found",hf="End of Zip64 central directory locator not found",mf="Central directory header not found",pf="Local file header not found",_f="Zip64 extra field not found",wf="File contains encrypted entry",gf="Encryption method not supported",ka="Compression method not supported",Sa="Split zip file",Ea="utf-8",Da="cp437",xf=[[Wo,pe],[Ho,pe],[jo,pe],[Ii,ke]],yf={[ke]:{getValue:_e,bytes:4},[pe]:{getValue:lr,bytes:8}};class bf{constructor(t,n={}){t instanceof ReadableStream&&(t={readable:t}),Object.assign(this,{reader:t,options:n,config:Vi()})}async*getEntriesGenerator(t={}){const n=this;let{reader:r}=n;const{config:i}=n;if(await ze(r),(r.size===fe||!r.readUint8Array)&&(Array.isArray(r)?r=new rf(r):r=new mn(await new Response(r.readable).blob()),await ze(r)),r.size=r.size)throw new Error(si);let _=0,b=await Ie(r,l,o,D),v=Te(b);if(o){const k=s.offset-o;if(_e(v,_)!=gi&&l!=k){const S=l;l=k,c=l-S,b=await Ie(r,l,o,D),v=Te(b)}}if(l<0||l>=r.size)throw new Error(si);const g=tt(n,t,"filenameEncoding"),y=tt(n,t,"commentEncoding");for(let k=0;kS.getData(ht,Wt,Ht),_=we;const{onprogress:Dt}=t;if(Dt)try{await Dt(k+1,h,new xr(S))}catch{}yield Wt}const x=tt(n,t,"extractPrependedData"),E=tt(n,t,"extractAppendedData");return x&&(n.prependedData=m>0?await Ie(r,0,m):new Uint8Array),n.comment=d?await Ie(r,f+an,d):new Uint8Array,E&&(n.appendedData=u>>8&255:p>>>24&255),signature:p,compressed:f!=0,encrypted:v,useWebWorkers:tt(i,r,"useWebWorkers"),useCompressionStream:tt(i,r,"useCompressionStream"),transferStreams:tt(i,r,"transferStreams")},config:d,streamOptions:{signal:S,size:E,onstart:O,onprogress:U,onend:F}};return k.size+=(await Eo({readable:x,writable:k},B)).size,tt(i,r,"preventClose")||await k.close(),t.getData?t.getData():k}}function zo(e,t,n){const r=e.rawBitFlag=be(t,n+2),i=(r&yi)==yi,s=_e(t,n+6);Object.assign(e,{encrypted:i,version:be(t,n),bitFlag:{level:(r&nd)>>1,dataDescriptor:(r&bi)==bi,languageEncodingFlag:(r&vi)==vi},rawLastModDate:s,lastModDate:Of(s),filenameLength:be(t,n+22),extraFieldLength:be(t,n+24)})}async function $o(e,t,n,r){const{rawExtraField:i}=t,s=t.extraField=new Map,a=Te(new Uint8Array(i));let o=0;try{for(;ot[i]==s);for(let i=0,s=0;i{if(e.data.length>=a+4){const f=_e(n,a);t[o]=e[o]=new Date(f*1e3);const d=s[l];e[d]=f}a+=4})}async function Tf(e,t,n,r,i){const s=new Uint8Array(4),a=Te(s);Af(a,0,t);const o=r+i;return await l(r)||await l(Math.min(o,n));async function l(f){const d=n-f,u=await Ie(e,d,f);for(let p=u.length-r;p>=0;p--)if(u[p]==s[0]&&u[p+1]==s[1]&&u[p+2]==s[2]&&u[p+3]==s[3])return{offset:d+p,buffer:u.slice(p,p+r).buffer}}}function tt(e,t,n){return t[n]===fe?e.options[n]:t[n]}function Of(e){const t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function ai(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function dn(e,t){return e.getUint8(t)}function be(e,t){return e.getUint16(t,!0)}function _e(e,t){return e.getUint32(t,!0)}function lr(e,t){return Number(e.getBigUint64(t,!0))}function Af(e,t,n){e.setUint32(t,n,!0)}function Te(e){return new DataView(e.buffer)}const Rf="File already exists",Mf="Zip file comment exceeds 64KB",If="File entry comment exceeds 64KB",Ff="File entry name exceeds 64KB",Oa="Version exceeds 65535",Lf="The strength must equal 1, 2, or 3",Cf="Extra field type exceeds 65535",Nf="Extra field data exceeds 64KB",ts="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Aa=new Uint8Array([7,0,2,0,65,69,3,0,0]),Ko=28;let oi=0;const Ra=[];class Pf{constructor(t,n={}){t.writable===fe&&typeof t.next==Qa&&(t=new va(t)),t instanceof WritableStream&&(t={writable:t}),t.writable.size===fe&&(t.writable.size=0);const r=t instanceof va;r||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0}),Object.assign(this,{writer:t,addSplitZipSignature:r,options:n,config:Vi(),files:new Map,filenames:new Set,offset:t.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set})}async add(t="",n,r={}){const i=this,{pendingAddFileCalls:s,config:a}=i;oiRa.push(l));let o;try{if(t=t.trim(),i.filenames.has(t))throw new Error(Rf);return i.filenames.add(t),o=Uf(i,t,n,r),s.add(o),await o}catch(l){throw i.filenames.delete(t),l}finally{s.delete(o);const l=Ra.shift();l?l():oi--}}async close(t=new Uint8Array,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:s}=i;for(;r.size;)await Promise.all(Array.from(r));return await Zf(this,t,n),!i.preventClose&&!n.preventClose&&await s.close(),i.getData?i.getData():s}}async function Uf(e,t,n,r){t=t.trim(),r.directory&&!t.endsWith(or)?t+=or:r.directory=t.endsWith(or);const i=Si(t);if(ee(i)>ke)throw new Error(Ff);const s=r.comment||"",a=Si(s);if(ee(a)>ke)throw new Error(If);const o=e.options.version||r.version||0;if(o>ke)throw new Error(Oa);const l=e.options.versionMadeBy||r.versionMadeBy||20;if(l>ke)throw new Error(Oa);const f=xe(e,r,Ji)||new Date,d=xe(e,r,Qi),u=xe(e,r,es),p=xe(e,r,"password"),w=xe(e,r,"encryptionStrength")||3,D=xe(e,r,"zipCrypto");if(p!==fe&&w!==fe&&(w<1||w>3))throw new Error(Lf);let h=new Uint8Array;const{extraField:c}=r;if(c){let he=0,V=0;c.forEach(Z=>he+=4+ee(Z)),h=new Uint8Array(he),c.forEach((Z,Se)=>{if(Se>ke)throw new Error(Cf);if(ee(Z)>ke)throw new Error(Nf);ve(h,new Uint16Array([Se]),V),ve(h,new Uint16Array([ee(Z)]),V+2),ve(h,Z,V+4),V+=4+ee(Z)})}let m=xe(e,r,"extendedTimestamp");m===fe&&(m=!0);let _=0,b=0,v=xe(e,r,"keepOrder");v===fe&&(v=!0);let g=0,y=xe(e,r,Zo);y===fe&&(y=!0);const x=xe(e,r,Vo)||0,E=xe(e,r,Go)||0;let k=xe(e,r,qo);n&&(n instanceof ReadableStream&&(n={readable:n}),await ze(n),n.size===fe?(r.dataDescriptor=!0,(k||k===fe)&&(k=!0,_=pe)):(g=n.size,_=zf(g)));const{diskOffset:S}=e.writer;if(e.offset+e.pendingEntriesSize-S>=pe||g>=pe||_>=pe){if(k===!1||!v)throw new Error(ts);k=!0}k=k||!1;const O=xe(e,r,"level"),U=xe(e,r,"useWebWorkers"),F=xe(e,r,"bufferedWrite");let B=xe(e,r,"dataDescriptor"),N=xe(e,r,"dataDescriptorSignature");const Y=xe(e,r,"signal"),j=xe(e,r,"useCompressionStream");B===fe&&(B=!0),B&&N===fe&&(N=!1),r=Object.assign({},r,{rawFilename:i,rawComment:a,version:o,versionMadeBy:l,lastModDate:f,lastAccessDate:d,creationDate:u,rawExtraField:h,zip64:k,password:p,level:O,useWebWorkers:U,encryptionStrength:w,extendedTimestamp:m,zipCrypto:D,bufferedWrite:F,keepOrder:v,dataDescriptor:B,dataDescriptorSignature:N,signal:Y,msDosCompatible:y,internalFileAttribute:x,externalFileAttribute:E,useCompressionStream:j});const q=Hf(r),we=jf(r);b=ee(q.localHeaderArray,we.dataDescriptorArray)+_,e.pendingEntriesSize+=b;let W;try{W=await Yf(e,t,n,{headerInfo:q,dataDescriptorInfo:we},r)}finally{e.pendingEntriesSize-=b}return Object.assign(W,{name:t,comment:s,extraField:c}),new xr(W)}async function Yf(e,t,n,r,i){const{files:s,writer:a}=e,{keepOrder:o,dataDescriptor:l,signal:f}=i,d=Array.from(s.values()).pop();let u={},p,w,D,h,c,m;s.set(t,u);try{let v;o&&(v=d&&d.lock,_()),i.bufferedWrite||e.lockWriter||!l?(m=new $t,m.writable.size=0,p=!0,await ze(a)):(m=a,e.lockWriter=Promise.resolve(),w=()=>delete e.lockWriter),await ze(m);const{writable:g,diskNumber:y}=a;let{diskOffset:x}=a;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const E=new Uint8Array(4),k=He(E);Q(k,0,ji),await Nt(g,E),e.offset+=4}if(p||await v,c=!0,u.diskNumberStart=y,u=await Wf(n,m,u,r,e.config,i),c=!1,s.set(t,u),u.filename=t,p){await m.writable.close();let E=await m.getData();await v,await b(),h=!0,l||(E=await Vf(u,E,g,i)),u.diskNumberStart=a.diskNumber,x=a.diskOffset,await E.stream().pipeTo(g,{preventClose:!0,signal:f}),g.size+=E.size,h=!1}if(u.offset=e.offset-x,u.zip64)Gf(u);else if(u.offset>=pe)throw new Error(ts);return e.offset+=u.length,u}catch(v){throw(p&&h||!p&&c)&&(e.hasCorruptedEntries=!0,v&&(v.corruptedEntry=!0),p?e.offset+=m.writable.size:e.offset=m.writable.size),s.delete(t),v}finally{D&&D(),w&&w()}function _(){u.lock=new Promise(v=>D=v)}async function b(){const{lockWriter:v}=e;if(v)return await v.then(()=>delete e.lockWriter),b();e.lockWriter=new Promise(g=>w=g)}}async function Wf(e,t,{diskNumberStart:n,lock:r},i,s,a){const{headerInfo:o,dataDescriptorInfo:l}=i,{localHeaderArray:f,headerArray:d,lastModDate:u,rawLastModDate:p,encrypted:w,compressed:D,version:h,compressionMethod:c,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b}=o,{dataDescriptorArray:v}=l,{rawFilename:g,lastAccessDate:y,creationDate:x,password:E,level:k,zip64:S,zipCrypto:O,dataDescriptor:U,directory:F,versionMadeBy:B,rawComment:N,rawExtraField:Y,useWebWorkers:j,onstart:q,onprogress:we,onend:W,signal:he,encryptionStrength:V,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,useCompressionStream:Wt}=a,Dt={lock:r,versionMadeBy:B,zip64:S,directory:Boolean(F),filenameUTF8:!0,rawFilename:g,commentUTF8:!0,rawComment:N,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b,rawExtraField:Y,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,diskNumberStart:n};let ht=0,Ht=0,gn;const{writable:Ve}=t;if(e){e.chunkSize=to(s),await Nt(Ve,f);const xn=e.readable,Ee=xn.size=e.size,Ue={options:{codecType:ko,level:k,password:E,encryptionStrength:V,zipCrypto:w&&O,passwordVerification:w&&O&&p>>8&255,signed:!0,compressed:D,encrypted:w,useWebWorkers:j,useCompressionStream:Wt,transferStreams:!1},config:s,streamOptions:{signal:he,size:Ee,onstart:q,onprogress:we,onend:W}},Jt=await Eo({readable:xn,writable:Ve},Ue);Ve.size+=Jt.size,gn=Jt.signature,Ht=e.size=xn.size,ht=Jt.size}else await Nt(Ve,f);const Tt=S?new Uint8Array(Ko+4):new Uint8Array;return e&&Bf({signature:gn,rawExtraFieldZip64:Tt,compressedSize:ht,uncompressedSize:Ht,headerInfo:o,dataDescriptorInfo:l},a),U&&await Nt(Ve,v),Object.assign(Dt,{compressedSize:ht,lastModDate:u,rawLastModDate:p,creationDate:x,lastAccessDate:y,encrypted:w,length:ee(f,v)+ht,compressionMethod:c,version:h,headerArray:d,signature:gn,rawExtraFieldZip64:Tt}),Dt}function Hf(e){const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,password:s,level:a,zip64:o,zipCrypto:l,dataDescriptor:f,directory:d,rawExtraField:u,encryptionStrength:p,extendedTimestamp:w}=e,D=a!==0&&!d,h=Boolean(s&&ee(s));let c;if(h&&!l){c=new Uint8Array(ee(Aa)+2);const N=He(c);re(N,0,Ka),ve(c,Aa,2),yr(N,8,p)}else c=new Uint8Array;let m,_;if(w){_=new Uint8Array(9+(r?4:0)+(i?4:0));const N=He(_);re(N,0,Bi),re(N,2,ee(_)-4);const Y=1+(r?2:0)+(i?4:0);yr(N,4,Y),Q(N,5,Math.floor(n.getTime()/1e3)),r&&Q(N,9,Math.floor(r.getTime()/1e3)),i&&Q(N,13,Math.floor(i.getTime()/1e3));try{m=new Uint8Array(36);const j=He(m),q=li(n);re(j,0,Xa),re(j,2,32),re(j,8,Ja),re(j,10,24),Pe(j,12,q),Pe(j,20,li(r)||q),Pe(j,28,li(i)||q)}catch{m=new Uint8Array}}else m=_=new Uint8Array;let b=vi;f&&(b=b|bi);let v=Va;D&&(v=wi);let g=e.version||rd;o&&(g=g>ia?g:ia),h&&(b=b|yi,l||(g=g>sa?g:sa,v=Ga,D&&(c[9]=wi)));const y=new Uint8Array(26),x=He(y);re(x,0,g),re(x,2,b),re(x,4,v);const E=new Uint32Array(1),k=He(E);let S;naa?S=aa:S=n,re(k,0,(S.getHours()<<6|S.getMinutes())<<5|S.getSeconds()/2),re(k,2,(S.getFullYear()-1980<<4|S.getMonth()+1)<<5|S.getDate());const O=E[0];Q(x,6,O),re(x,22,ee(t));const U=ee(c,_,m,u);re(x,24,U);const F=new Uint8Array(30+ee(t)+U),B=He(F);return Q(B,0,Za),ve(F,y,4),ve(F,t,30),ve(F,c,30+ee(t)),ve(F,_,30+ee(t,c)),ve(F,m,30+ee(t,c,_)),ve(F,u,30+ee(t,c,_,m)),{localHeaderArray:F,headerArray:y,headerView:x,lastModDate:n,rawLastModDate:O,encrypted:h,compressed:D,version:g,compressionMethod:v,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:m,rawExtraFieldAES:c}}function jf(e){const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i=new Uint8Array,s,a=0;return n&&(i=new Uint8Array(t?r?24:20:r?16:12),s=He(i),r&&(a=4,Q(s,0,Jc))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}}function Bf(e,t){const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:s,headerInfo:a,dataDescriptorInfo:o}=e,{headerView:l,encrypted:f}=a,{dataDescriptorView:d,dataDescriptorOffset:u}=o,{zip64:p,zipCrypto:w,dataDescriptor:D}=t;if((!f||w)&&n!==fe&&(Q(l,10,n),D&&Q(d,u,n)),p){const h=He(r);re(h,0,$a),re(h,2,Ko),Q(l,14,pe),Pe(h,12,BigInt(i)),Q(l,18,pe),Pe(h,4,BigInt(s)),D&&(Pe(d,u+4,BigInt(i)),Pe(d,u+12,BigInt(s)))}else Q(l,14,i),Q(l,18,s),D&&(Q(d,u+4,i),Q(d,u+8,s))}async function Vf(e,t,n,{zipCrypto:r}){const i=await qf(t,0,26),s=new DataView(i);return(!e.encrypted||r)&&Q(s,14,e.signature),e.zip64?(Q(s,18,pe),Q(s,22,pe)):(Q(s,18,e.compressedSize),Q(s,22,e.uncompressedSize)),await Nt(n,new Uint8Array(i)),t.slice(i.byteLength)}function Gf(e){const{rawExtraFieldZip64:t,offset:n,diskNumberStart:r}=e,i=He(t);Pe(i,20,BigInt(n)),Q(i,28,r)}async function Zf(e,t,n){const{files:r,writer:i}=e;let s=0,a=0;const{diskOffset:o,writable:l}=i;let{diskNumber:f}=i,d=e.offset-o,u=r.size;for(const[,{rawFilename:v,rawExtraFieldZip64:g,rawExtraFieldAES:y,rawExtraField:x,rawComment:E,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:S}]of r)a+=46+ee(v,E,g,y,k,S,x);let p=n.zip64||e.options.zip64||!1;if(d>=pe||a>=pe||u>=ke){if(n.zip64===!1||e.options.zip64===!1)throw new Error(ts);p=!0}const w=new Uint8Array(a),D=He(w);for(const[v,g]of Array.from(r.values()).entries()){const{offset:y,rawFilename:x,rawExtraFieldZip64:E,rawExtraFieldAES:k,rawExtraFieldNTFS:S,rawExtraField:O,rawComment:U,versionMadeBy:F,headerArray:B,directory:N,zip64:Y,msDosCompatible:j,internalFileAttribute:q,externalFileAttribute:we,extendedTimestamp:W,lastModDate:he,diskNumberStart:V}=g;let Z;if(W){Z=new Uint8Array(9);const ue=He(Z);re(ue,0,Bi),re(ue,2,ee(Z)-4),yr(ue,4,1),Q(ue,5,Math.floor(he.getTime()/1e3))}else Z=new Uint8Array;const Se=ee(E,k,Z,S,O);if(Q(D,s,gi),re(D,s+4,F),ve(w,B,s+6),re(D,s+30,Se),re(D,s+32,ee(U)),re(D,s+34,Y?ke:V),re(D,s+36,q),we?Q(D,s+38,we):N&&j&&yr(D,s+38,ki),Q(D,s+42,Y?pe:y),ve(w,x,s+46),ve(w,E,s+46+ee(x)),ve(w,k,s+46+ee(x,E)),ve(w,Z,s+46+ee(x,E,k)),ve(w,S,s+46+ee(x,E,k,Z)),ve(w,O,s+46+ee(x,E,k,Z,S)),ve(w,U,s+46+ee(x)+Se),s+=46+ee(x,U)+Se,n.onprogress)try{await n.onprogress(v+1,r.size,new xr(g))}catch{}}await ze(i),await Nt(l,w);const h=new Uint8Array(p?Qc:an),c=He(h);let m=i.diskNumber;const{availableSize:_}=i;_n&&(t+=n.length)),t}class Xo{constructor(t,n,r,i){const s=this;if(t.root&&i&&i.getChildByName(n))throw new Error("Entry filename already exists");r||(r={}),Object.assign(s,{fs:t,name:n,data:r.data,id:t.entries.length,parent:i,children:[],uncompressedSize:0}),t.entries.push(s),i&&s.parent.children.push(s)}moveTo(t){const n=this;n.fs.move(n,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){const n=this;let r=n.name,i=n.parent;for(;i&&i!=t;)r=(i.name?i.name+"/":"")+r,i=i.parent;return r}isDescendantOf(t){let n=this.parent;for(;n&&n.id!=t.id;)n=n.parent;return Boolean(n)}}class Jo extends Xo{constructor(t,n,r,i){super(t,n,r,i);const s=this;s.Reader=r.Reader,s.Writer=r.Writer,r.getData&&(s.getData=r.getData)}async getData(t,n={}){const r=this;if(!t||t.constructor==r.Writer&&r.data)return r.data;{const i=r.reader=new r.Reader(r.data,n);await Promise.all([ze(i),ze(t,r.data.uncompressedSize)]);const s=i.readable;return s.size=r.uncompressedSize=i.size,await s.pipeTo(t.writable),t.getData?t.getData():t.writable}}getText(t,n){return this.getData(new Ti(t),n)}getBlob(t,n){return this.getData(new $t(t),n)}getData64URI(t,n){return this.getData(new wr(t),n)}getUint8Array(t){return this.getData(new gr,t)}getWritable(t=new WritableStream,n){return this.getData({writable:t},n)}replaceBlob(t){Object.assign(this,{data:t,Reader:mn,Writer:$t,reader:null})}replaceText(t){Object.assign(this,{data:t,Reader:Ao,Writer:Ti,reader:null})}replaceData64URI(t){Object.assign(this,{data:t,Reader:Di,Writer:wr,reader:null})}replaceUint8Array(t){Object.assign(this,{data:t,Reader:Ri,Writer:gr,reader:null})}replaceReadable(t){Object.assign(this,{data:null,Reader:function(){return{readable:t}},Writer:null,reader:null})}}class jn extends Xo{constructor(t,n,r,i){super(t,n,r,i),this.directory=!0}addDirectory(t){return mt(this,t,null,!0)}addText(t,n){return mt(this,t,{data:n,Reader:Ao,Writer:Ti})}addBlob(t,n){return mt(this,t,{data:n,Reader:mn,Writer:$t})}addData64URI(t,n){return mt(this,t,{data:n,Reader:Di,Writer:wr})}addUint8Array(t,n){return mt(this,t,{data:n,Reader:Ri,Writer:gr})}addHttpContent(t,n,r={}){return mt(this,t,{data:n,Reader:class extends ba{constructor(i){super(i,r)}}})}addReadable(t,n){return mt(this,t,{Reader:function(){return{readable:n}}})}addFileSystemEntry(t){return eu(this,t)}addData(t,n){return mt(this,t,n)}async importBlob(t,n={}){await this.importZip(new mn(t),n)}async importData64URI(t,n={}){await this.importZip(new Di(t),n)}async importUint8Array(t,n={}){await this.importZip(new Ri(t),n)}async importHttpContent(t,n={}){await this.importZip(new ba(t,n),n)}async importReadable(t,n={}){await this.importZip({readable:t},n)}exportBlob(t={}){return this.exportZip(new $t("application/zip"),t)}exportData64URI(t={}){return this.exportZip(new wr("application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new gr,t)}async exportWritable(t=new WritableStream,n={}){return await this.exportZip({writable:t},n),t}async importZip(t,n){await ze(t),(await new bf(t,n).getEntries()).forEach(s=>{let a=this;const o=s.filename.split("/"),l=o.pop();o.forEach(f=>a=a.getChildByName(f)||new jn(this.fs,f,null,a)),s.directory||mt(a,l,{data:s,Reader:Jf(Object.assign({},n))})})}async exportZip(t,n){const r=this;await Promise.all([Qo(r),ze(t)]);const i=new Pf(t,n);return await Qf(i,r,Xf([r],"uncompressedSize"),n),await i.close(),t.getData?t.getData():t.writable}getChildByName(t){const n=this.children;for(let r=0;r{n.id==e.id&&t.splice(r,1)})}async function Qf(e,t,n,r){const i=t,s=new Map;await a(e,t);async function a(o,l){await f();async function f(){if(r.bufferedWrite)await Promise.all(l.children.map(d));else for(const u of l.children)await d(u)}async function d(u){const p=r.relativePath?u.getRelativeName(i):u.getFullname();await o.add(p,u.reader,Object.assign({directory:u.directory},Object.assign({},r,{onprogress:async w=>{if(r.onprogress){s.set(p,w);try{await r.onprogress(Array.from(s.values()).reduce((D,h)=>D+h),n)}catch{}}}}))),await a(o,u)}}}async function eu(e,t){if(t.isDirectory){const i=e.addDirectory(t.name);return await n(i,t),i}else return new Promise((i,s)=>t.file(a=>i(e.addBlob(t.name,a)),s));async function n(i,s){const a=await r(s);for(const o of a)o.isDirectory?await n(i.addDirectory(o.name),o):await new Promise((l,f)=>{o.file(d=>{const u=i.addBlob(o.name,d);u.uncompressedSize=d.size,l(u)},f)})}function r(i){return new Promise((s,a)=>{let o=[];i.isDirectory&&l(i.createReader()),i.isFile&&s(o);function l(f){f.readEntries(d=>{d.length?(o=o.concat(d),l(f)):s(o)},a)}})}}function tn(e){e.entries=[],e.root=new jn(e)}function mt(e,t,n,r){if(e.directory)return r?new jn(e.fs,t,n,e):new Jo(e.fs,t,n,e);throw new Error("Parent entry is not a directory")}let el;try{el=import.meta.url}catch{}Gi({baseURL:el});Gd(Gi);Gi({Deflate:Rc,Inflate:Xc});function Ir(e){return e.slice(e.lastIndexOf(Fr)+1)}const Fr="/";async function tu(e,t,n){const r=e.vaultPath+"/.obsidian/"+t+".json";let i;return e.adapter.exists(r)&&(i=JSON.parse(await e.adapter.readFile(r))),n(i)}class nu{constructor(t){jt(this,"zipFS");jt(this,"chunks",[]);jt(this,"chunkIndex",0);this.zipBlob=t}async initReadingVault(){this.zipFS=new Kf.FS,await this.zipFS.importBlob(this.zipBlob)}readDirectory(t){return this.zipFS.find(t).children.map(r=>({isDirectory:()=>!!r.directory,getName:()=>r.getFullname()}))}readFile(t){return this.zipFS.find(t).getText("utf-8")}exists(t){return!!this.zipFS.find(t)}resolve(t){return t}resolveInDir(t,n){return t+Fr+n}removeFile(t){}renameFile(t,n){}flushResultsFromInitialProcessing(t){}appendToResultFile(t,n){this.chunks.push(n)}appendToPostProcessingFile(t,n){this.chunks[this.chunkIndex]=n,this.chunkIndex++}initPostProcessingResultFile(t){}chunkIter(){const t=this.chunks;let n=0;return{[Symbol.asyncIterator](){return{async next(){if(n{if(s.forEach((o,l)=>s[l]+=a),r==="seenOne"&&a!=="["&&(r="normal"),r==="seenOneOut"&&a!=="]"&&(r="normal"),a==="["&&(i+=1,r==="seenOne"?(s.push(""),r="normal"):r==="normal"&&(r="seenOne")),a==="]"&&i>0){if(i-=1,r==="seenOneOut"){const o=s.pop();o&&(!t||s.length===0)&&n.push(o.slice(0,-2)),r="normal"}else r==="normal"&&(r="seenOneOut");i===0&&(r="normal")}}),n}function su(e){return Ir(e)!==e}class ci{constructor(){jt(this,"nameWasCalledAsFile",[]);jt(this,"pathMap",new Map);jt(this,"nameMap",new Map)}accessAsFile(t,n,r){const i=this.pathMap.get(n);if(i)return this.nameMap.get(t)||this.nameMap.set(t,i),i;const s=this.nameMap.get(t);if(s&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,s),this.nameWasCalledAsFile.push(t),s;const a=r();return this.pathMap.set(n,a),this.nameMap.get(t)||this.nameMap.set(t,a),this.nameWasCalledAsFile.push(t),a}accessAsLink(t,n){const r=this.findData(t);if(r)return r;const i=su(t),s=n();return i?this.pathMap.set(t,s):this.nameMap.set(t,s),s}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Lr(e){e.totalNodes++,e.leafNodes++}function tl(e){e.leafNodes--,e.topLevelNodes++}function au(e,t,n=ru,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new ci,headingTracker:new ci,dummyHeadingLinkTracker:new Map,blockLinkTracker:new ci,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function vt(e){return Lr(e.summary),e.idGenerator()}function ou(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map);let s=i.get(r);return s||(s={uid:vt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function lu(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map);let a=s.get(i);return a||(a={uid:vt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function cu(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function du(e){let t;return[e.split(` +var uc=Object.defineProperty;var hc=(e,t,n)=>t in e?uc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var jt=(e,t,n)=>(hc(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const Fn=15,mi=30,pi=19,mc=29,ur=256,Hi=ur+1+mc,Ms=2*Hi+1,bn=256,pc=7,Is=16,Fs=17,Ls=18,$r=8*2,hr=-1,_c=1,qn=2,wc=0,rn=0,Cs=1,gc=3,Le=4,Qe=0,Ya=1,zn=2,et=-2,xc=-3,Qt=-5;function Tr(e){return Or(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function Or(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?Or(n):n),[])}const Ns=[0,1,2,3].concat(...Tr([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function se(){const e=this;function t(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,f=e.stat_desc.max_length;let d,u,p,w,v,h,c=0;for(w=0;w<=Fn;w++)i.bl_count[w]=0;for(s[i.heap[i.heap_max]*2+1]=0,d=i.heap_max+1;df&&(w=f,c++),s[u*2+1]=w,!(u>e.max_code)&&(i.bl_count[w]++,v=0,u>=l&&(v=o[u-l]),h=s[u*2],i.opt_len+=h*(w+v),a&&(i.static_len+=h*(a[u*2+1]+v)));if(c!==0){do{for(w=f-1;i.bl_count[w]===0;)w--;i.bl_count[w]--,i.bl_count[w+1]+=2,i.bl_count[f]--,c-=2}while(c>0);for(w=f;w!==0;w--)for(u=i.bl_count[w];u!==0;)p=i.heap[--d],!(p>e.max_code)&&(s[p*2+1]!=w&&(i.opt_len+=(w-s[p*2+1])*s[p*2],s[p*2+1]=w),u--)}}function n(i,s){let a=0;do a|=i&1,i>>>=1,a<<=1;while(--s>0);return a>>>1}function r(i,s,a){const o=[];let l=0,f,d,u;for(f=1;f<=Fn;f++)o[f]=l=l+a[f-1]<<1;for(d=0;d<=s;d++)u=i[d*2+1],u!==0&&(i[d*2]=n(o[u]++,u))}e.build_tree=function(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.elems;let l,f,d=-1,u;for(i.heap_len=0,i.heap_max=Ms,l=0;l=1;l--)i.pqdownheap(s,l);u=o;do l=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(s,1),f=i.heap[1],i.heap[--i.heap_max]=l,i.heap[--i.heap_max]=f,s[u*2]=s[l*2]+s[f*2],i.depth[u]=Math.max(i.depth[l],i.depth[f])+1,s[l*2+1]=s[f*2+1]=u,i.heap[1]=u++,i.pqdownheap(s,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],t(i),r(s,e.max_code,i.bl_count)}}se._length_code=[0,1,2,3,4,5,6,7].concat(...Tr([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));se.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];se.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];se.d_code=function(e){return e<256?Ns[e]:Ns[256+(e>>>7)]};se.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];se.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];se.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];se.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function De(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}const yc=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],bc=Tr([[144,8],[112,9],[24,7],[8,8]]);De.static_ltree=Or(yc.map((e,t)=>[e,bc[t]]));const vc=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],kc=Tr([[30,5]]);De.static_dtree=Or(vc.map((e,t)=>[e,kc[t]]));De.static_l_desc=new De(De.static_ltree,se.extra_lbits,ur+1,Hi,Fn);De.static_d_desc=new De(De.static_dtree,se.extra_dbits,0,mi,Fn);De.static_bl_desc=new De(null,se.extra_blbits,0,pi,pc);const Sc=9,Ec=8;function at(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const Wa=0,sr=1,Zt=2,Je=[new at(0,0,0,0,Wa),new at(4,4,8,4,sr),new at(4,5,16,8,sr),new at(4,6,32,32,sr),new at(4,4,16,16,Zt),new at(8,16,32,32,Zt),new at(8,16,128,128,Zt),new at(8,32,128,256,Zt),new at(32,128,258,1024,Zt),new at(32,258,258,4096,Zt)],$n=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ge=0,Kn=1,vn=2,Xn=3,Dc=32,Kr=42,Jn=113,kn=666,Xr=8,Tc=0,Jr=1,Oc=2,ce=3,ar=258,Ye=ar+ce+1;function Ps(e,t,n,r){const i=e[t*2],s=e[n*2];return i=3&&j[se.bl_order[T]*2+1]===0;T--);return e.opt_len+=3*(T+1)+5+5+4,T}function Ve(T){e.pending_buf[e.pending++]=T}function Tt(T){Ve(T&255),Ve(T>>>8&255)}function xn(T){Ve(T>>8&255),Ve(T&255&255)}function Ee(T,R){let A;const I=R;ge>$r-I?(A=T,ue|=A<>>$r-ge,ge+=I-$r):(ue|=T<=8&&(Ve(ue&255),ue>>>=8,ge-=8)}function sc(){Ee(Jr<<1,3),Ue(bn,De.static_ltree),Ss(),1+Se+10-ge<9&&(Ee(Jr<<1,3),Ue(bn,De.static_ltree),Ss()),Se=7}function yn(T,R){let A,I,P;if(e.dist_buf[V]=T,e.lc_buf[V]=R&255,V++,T===0?N[R*2]++:(Z++,T--,N[(se._length_code[R]+ur+1)*2]++,Y[se.d_code(T)*2]++),(V&8191)===0&&O>2){for(A=V*8,I=g-m,P=0;P>>=3,Z8?Tt(ue):ge>0&&Ve(ue&255),ue=0,ge=0}function ac(T,R,A){Ds(),Se=8,A&&(Tt(R),Tt(~R)),e.pending_buf.set(l.subarray(T,T+R),e.pending),e.pending+=R}function Ts(T,R,A){Ee((Tc<<1)+(A?1:0),3),ac(T,R,!0)}function oc(T,R,A){let I,P,G=0;O>0?(q.build_tree(e),we.build_tree(e),G=gn(),I=e.opt_len+3+7>>>3,P=e.static_len+3+7>>>3,P<=I&&(I=P)):I=P=R+5,R+4<=I&&T!=-1?Ts(T,R,A):P==I?(Ee((Jr<<1)+(A?1:0),3),Es(De.static_ltree,De.static_dtree)):(Ee((Oc<<1)+(A?1:0),3),ic(q.max_code+1,we.max_code+1,G+1),Es(N,Y)),Dt(),A&&Ds()}function Ot(T){oc(m>=0?m:-1,g-m,T),m=g,t.flush_pending()}function qr(){let T,R,A,I;do{if(I=f-x-g,I===0&&g===0&&x===0)I=s;else if(I==-1)I--;else if(g>=s+s-Ye){l.set(l.subarray(s,s+s),0),y-=s,g-=s,m-=s,T=w,A=T;do R=u[--A]&65535,u[A]=R>=s?R-s:0;while(--T!==0);T=s,A=T;do R=d[--A]&65535,d[A]=R>=s?R-s:0;while(--T!==0);I+=s}if(t.avail_in===0)return;T=t.read_buf(l,g+x,I),x+=T,x>=ce&&(p=l[g]&255,p=(p<r-5&&(R=r-5);;){if(x<=1){if(qr(),x===0&&T==rn)return Ge;if(x===0)break}if(g+=x,x=0,A=m+R,(g===0||g>=A)&&(x=g-A,g=A,Ot(!1),t.avail_out===0)||g-m>=s-Ye&&(Ot(!1),t.avail_out===0))return Ge}return Ot(T==Le),t.avail_out===0?T==Le?vn:Ge:T==Le?Xn:Kn}function Os(T){let R=S,A=g,I,P,G=D;const K=g>s-Ye?g-(s-Ye):0;let Me=B;const Xe=o,zr=g+ar;let As=l[A+G-1],Rs=l[A+G];D>=F&&(R>>=2),Me>x&&(Me=x);do if(I=T,!(l[I+G]!=Rs||l[I+G-1]!=As||l[I]!=l[A]||l[++I]!=l[A+1])){A+=2,I++;do;while(l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&AG){if(y=T,G=P,P>=Me)break;As=l[A+G-1],Rs=l[A+G]}}while((T=d[T&Xe]&65535)>K&&--R!==0);return G<=x?G:x}function cc(T){let R=0,A;for(;;){if(x=ce&&(p=(p<=ce)if(A=yn(g-y,_-ce),x-=_,_<=E&&x>=ce){_--;do g++,p=(p<=ce&&(p=(p<4096)&&(_=ce-1)),D>=ce&&_<=D){I=g+x-ce,A=yn(g-1-b,D-ce),x-=D-1,D-=2;do++g<=I&&(p=(p<Sc||I!=Xr||A<9||A>15||R<0||R>9||G<0||G>qn?et:(T.dstate=e,a=A,s=1<9||A<0||A>qn?et:(Je[O].func!=Je[R].func&&T.total_in!==0&&(I=T.deflate(Cs)),O!=R&&(O=R,E=Je[O].max_lazy,F=Je[O].good_length,B=Je[O].nice_length,S=Je[O].max_chain),U=A,I)},e.deflateSetDictionary=function(T,R,A){let I=A,P,G=0;if(!R||n!=Kr)return et;if(Is-Ye&&(I=s-Ye,G=A-I),l.set(R.subarray(G,G+I),0),g=I,m=I,p=l[0]&255,p=(p<Le||R<0)return et;if(!T.next_out||!T.next_in&&T.avail_in!==0||n==kn&&R!=Le)return T.msg=$n[zn-et],et;if(T.avail_out===0)return T.msg=$n[zn-Qt],Qt;if(t=T,G=i,i=R,n==Kr&&(I=Xr+(a-8<<4)<<8,P=(O-1&255)>>1,P>3&&(P=3),I|=P<<6,g!==0&&(I|=Dc),I+=31-I%31,n=Jn,xn(I)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,Qe}else if(t.avail_in===0&&R<=G&&R!=Le)return t.msg=$n[zn-Qt],Qt;if(n==kn&&t.avail_in!==0)return T.msg=$n[zn-Qt],Qt;if(t.avail_in!==0||x!==0||R!=rn&&n!=kn){switch(K=-1,Je[O].func){case Wa:K=lc(R);break;case sr:K=cc(R);break;case Zt:K=dc(R);break}if((K==vn||K==Xn)&&(n=kn),K==Ge||K==vn)return t.avail_out===0&&(i=-1),Qe;if(K==Kn){if(R==Cs)sc();else if(Ts(0,0,!1),R==gc)for(A=0;An&&(i=n),i===0?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Rc(e){const t=this,n=new Ha,r=Mc(e&&e.chunkSize?e.chunkSize:64*1024),i=rn,s=new Uint8Array(r);let a=e?e.level:hr;typeof a>"u"&&(a=hr),n.deflateInit(a),n.next_out=s,t.append=function(o,l){let f,d,u=0,p=0,w=0;const v=[];if(!!o.length){n.next_in_index=0,n.next_in=o,n.avail_in=o.length;do{if(n.next_out_index=0,n.avail_out=r,f=n.deflate(i),f!=Qe)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?v.push(new Uint8Array(s)):v.push(s.slice(0,n.next_out_index))),w+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=u&&(l(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return v.length>1?(d=new Uint8Array(w),v.forEach(function(h){d.set(h,p),p+=h.length})):d=v[0]||new Uint8Array,d}},t.flush=function(){let o,l,f=0,d=0;const u=[];do{if(n.next_out_index=0,n.avail_out=r,o=n.deflate(Le),o!=Ya&&o!=Qe)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&u.push(s.slice(0,n.next_out_index)),d+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),l=new Uint8Array(d),u.forEach(function(p){l.set(p,f),f+=p.length}),l}}function Mc(e){return e+5*(Math.floor(e/16383)+1)}const Ic=15,J=0,xt=1,Fc=2,Ne=-2,ae=-3,Us=-4,yt=-5,We=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ja=1440,Lc=0,Cc=4,Nc=9,Pc=5,Uc=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Yc=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Wc=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Hc=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],jc=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Bc=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],At=15;function _i(){const e=this;let t,n,r,i,s,a;function o(f,d,u,p,w,v,h,c,m,_,b){let k,g,y,x,D,S,E,O,U,F,B,N,Y,j,q;F=0,D=u;do r[f[d+F]]++,F++,D--;while(D!==0);if(r[0]==u)return h[0]=-1,c[0]=0,J;for(O=c[0],S=1;S<=At&&r[S]===0;S++);for(E=S,OD&&(O=D),c[0]=O,j=1<N+O;){if(x++,N+=O,q=y-N,q=q>O?O:q,(g=1<<(S=E-N))>k+1&&(g-=k+1,Y=E,Sja)return ae;s[x]=B=_[0],_[0]+=q,x!==0?(a[x]=D,i[0]=S,i[1]=O,S=D>>>N-O,i[2]=B-s[x-1]-S,m.set(i,(s[x-1]+S)*3)):h[0]=B}for(i[1]=E-N,F>=u?i[0]=128+64:b[F]>>N;S>>=1)D^=S;for(D^=S,U=(1<257?(_==ae?m.msg="oversubscribed distance tree":_==yt?(m.msg="incomplete distance tree",_=ae):_!=Us&&(m.msg="empty distance tree with lengths",_=ae),_):J)}}_i.inflate_trees_fixed=function(e,t,n,r){return e[0]=Nc,t[0]=Pc,n[0]=Uc,r[0]=Yc,J};const Qn=0,Ys=1,Ws=2,Hs=3,js=4,Bs=5,Vs=6,Qr=7,Gs=8,er=9;function Vc(){const e=this;let t,n=0,r,i=0,s=0,a=0,o=0,l=0,f=0,d=0,u,p=0,w,v=0;function h(c,m,_,b,k,g,y,x){let D,S,E,O,U,F,B,N,Y,j,q,we,W,he,V,Z;B=x.next_in_index,N=x.avail_in,U=y.bitb,F=y.bitk,Y=y.write,j=Y>=S[Z+1],F-=S[Z+1],y.win[Y++]=S[Z+2],j--;continue}do{if(U>>=S[Z+1],F-=S[Z+1],(O&16)!==0){for(O&=15,W=S[Z+2]+(U&We[O]),U>>=O,F-=O;F<15;)N--,U|=(x.read_byte(B++)&255)<>=S[Z+1],F-=S[Z+1],(O&16)!==0){for(O&=15;F>=O,F-=O,j-=W,Y>=he)V=Y-he,Y-V>0&&2>Y-V?(y.win[Y++]=y.win[V++],y.win[Y++]=y.win[V++],W-=2):(y.win.set(y.win.subarray(V,V+2),Y),Y+=2,V+=2,W-=2);else{V=Y-he;do V+=y.end;while(V<0);if(O=y.end-V,W>O){if(W-=O,Y-V>0&&O>Y-V)do y.win[Y++]=y.win[V++];while(--O!==0);else y.win.set(y.win.subarray(V,V+O),Y),Y+=O,V+=O,O=0;V=0}}if(Y-V>0&&W>Y-V)do y.win[Y++]=y.win[V++];while(--W!==0);else y.win.set(y.win.subarray(V,V+W),Y),Y+=W,V+=W,W=0;break}else if((O&64)===0)D+=S[Z+2],D+=U&We[O],Z=(E+D)*3,O=S[Z];else return x.msg="invalid distance code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae;while(!0);break}if((O&64)===0){if(D+=S[Z+2],D+=U&We[O],Z=(E+D)*3,(O=S[Z])===0){U>>=S[Z+1],F-=S[Z+1],y.win[Y++]=S[Z+2],j--;break}}else return(O&32)!==0?(W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,xt):(x.msg="invalid literal/length code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae)}while(!0)}while(j>=258&&N>=10);return W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,J}e.init=function(c,m,_,b,k,g){t=Qn,f=c,d=m,u=_,p=b,w=k,v=g,r=null},e.proc=function(c,m,_){let b,k,g,y=0,x=0,D=0,S,E,O,U;for(D=m.next_in_index,S=m.avail_in,y=c.bitb,x=c.bitk,E=c.write,O=E=258&&S>=10&&(c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,_=h(f,d,u,p,w,v,c,m),D=m.next_in_index,S=m.avail_in,y=c.bitb,x=c.bitk,E=c.write,O=E>>=r[k+1],x-=r[k+1],g=r[k],g===0){a=r[k+2],t=Vs;break}if((g&16)!==0){o=g&15,n=r[k+2],t=Ws;break}if((g&64)===0){s=g,i=k/3+r[k+2];break}if((g&32)!==0){t=Qr;break}return t=er,m.msg="invalid literal/length code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,c.inflate_flush(m,_);case Ws:for(b=o;x>=b,x-=b,s=d,r=w,i=v,t=Hs;case Hs:for(b=s;x>=r[k+1],x-=r[k+1],g=r[k],(g&16)!==0){o=g&15,l=r[k+2],t=js;break}if((g&64)===0){s=g,i=k/3+r[k+2];break}return t=er,m.msg="invalid distance code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,c.inflate_flush(m,_);case js:for(b=o;x>=b,x-=b,t=Bs;case Bs:for(U=E-l;U<0;)U+=c.end;for(;n!==0;){if(O===0&&(E==c.end&&c.read!==0&&(E=0,O=E7&&(x-=8,S++,D--),c.write=E,_=c.inflate_flush(m,_),E=c.write,O=Eh.avail_out&&(m=h.avail_out),m!==0&&c==yt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m,b==n.end&&(b=0,n.write==n.end&&(n.write=0),m=n.write-b,m>h.avail_out&&(m=h.avail_out),m!==0&&c==yt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m),h.next_out_index=_,n.read=b,c},n.proc=function(h,c){let m,_,b,k,g,y,x,D;for(k=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y>>1){case 0:_>>>=3,b-=3,m=b&7,_>>>=m,b-=m,r=ei;break;case 1:S=[],E=[],O=[[]],U=[[]],_i.inflate_trees_fixed(S,E,O,U),d.init(S[0],E[0],O[0],0,U[0],0),_>>>=3,b-=3,r=tr;break;case 2:_>>>=3,b-=3,r=zs;break;case 3:return _>>>=3,b-=3,r=Bt,h.msg="invalid block type",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c)}break;case ei:for(;b<32;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<>>16&65535)!=(_&65535))return r=Bt,h.msg="invalid stored block lengths",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);i=_&65535,_=b=0,r=i!==0?qs:u!==0?nr:en;break;case qs:if(g===0||x===0&&(y==n.end&&n.read!==0&&(y=0,x=yg&&(m=g),m>x&&(m=x),n.win.set(h.read_buf(k,m),y),k+=m,g-=m,y+=m,x-=m,(i-=m)!==0)break;r=u!==0?nr:en;break;case zs:for(;b<14;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<29||(m>>5&31)>29)return r=Bt,h.msg="too many length or distance symbols",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);if(m=258+(m&31)+(m>>5&31),!o||o.length>>=14,b-=14,a=0,r=$s;case $s:for(;a<4+(s>>>10);){for(;b<3;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<>>=3,b-=3}for(;a<19;)o[Zs[a++]]=0;if(l[0]=7,m=v.inflate_trees_bits(o,l,f,p,h),m!=J)return c=m,c==ae&&(o=null,r=Bt),n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);a=0,r=Ks;case Ks:for(;m=s,!(a>=258+(m&31)+(m>>5&31));){let j,q;for(m=l[0];b>>=m,b-=m,o[a++]=q;else{for(D=q==18?7:q-14,j=q==18?11:3;b>>=m,b-=m,j+=_&We[D],_>>>=D,b-=D,D=a,m=s,D+j>258+(m&31)+(m>>5&31)||q==16&&D<1)return o=null,r=Bt,h.msg="invalid bit length repeat",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);q=q==16?o[D-1]:0;do o[D++]=q;while(--j!==0);a=D}}if(f[0]=-1,F=[],B=[],N=[],Y=[],F[0]=9,B[0]=6,m=s,m=v.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),o,F,B,N,Y,p,h),m!=J)return m==ae&&(o=null,r=Bt),c=m,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);d.init(F[0],B[0],p,N[0],p,Y[0]),r=tr;case tr:if(n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,(c=d.proc(n,h,c))!=xt)return n.inflate_flush(h,c);if(c=J,d.free(h),k=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y15?(e.inflateEnd(n),Ne):(e.wbits=r,n.istate.blocks=new Gc(n,1<>4)+8>a.wbits){a.mode=Rt,n.msg="invalid win size",a.marker=5;break}a.mode=Js;case Js:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,s=n.read_byte(n.next_in_index++)&255,((a.method<<8)+s)%31!==0){a.mode=Rt,n.msg="incorrect header check",a.marker=5;break}if((s&Zc)===0){a.mode=Sn;break}a.mode=Qs;case Qs:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,a.mode=ea;case ea:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,a.mode=ta;case ta:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,a.mode=na;case na:return n.avail_in===0?i:(i=r,n.avail_in--,n.total_in++,a.need+=n.read_byte(n.next_in_index++)&255,a.mode=ti,Fc);case ti:return a.mode=Rt,n.msg="need dictionary",a.marker=0,Ne;case Sn:if(i=a.blocks.proc(n,i),i==ae){a.mode=Rt,a.marker=0;break}if(i==J&&(i=r),i!=xt)return i;i=r,a.blocks.reset(n,a.was),a.mode=ra;case ra:return n.avail_in=0,xt;case Rt:return ae;default:return Ne}},e.inflateSetDictionary=function(n,r,i){let s=0,a=i;if(!n||!n.istate||n.istate.mode!=ti)return Ne;const o=n.istate;return a>=1<0&&n.next_in_index!=p&&(l(n.next_in_index),p=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return f.length>1?(u=new Uint8Array(v),f.forEach(function(h){u.set(h,w),w+=h.length})):u=f[0]||new Uint8Array,u}},t.flush=function(){n.inflateEnd()}}const pe=4294967295,ke=65535,wi=8,Va=0,Ga=99,Za=67324752,ji=134695760,Jc=ji,gi=33639248,qa=101010256,xi=101075792,za=117853008,an=22,An=20,Rn=56,Qc=an+An+Rn,$a=1,Ka=39169,Xa=10,Ja=1,Bi=21589,ed=28789,td=25461,yi=1,nd=6,bi=8,vi=2048,ki=16,rd=20,ia=45,sa=51,or="/",aa=new Date(2107,11,31),oa=new Date(1980,0,1),fe=void 0,mr="undefined",Qa="function";class la{constructor(t){return class extends TransformStream{constructor(n,r){const i=new t(r);super({transform(s,a){a.enqueue(i.append(s))},flush(s){const a=i.flush();a&&s.enqueue(a)}})}}}}const id=64;let eo=2;try{typeof navigator!=mr&&navigator.hardwareConcurrency&&(eo=navigator.hardwareConcurrency)}catch{}const sd={chunkSize:512*1024,maxWorkers:eo,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:fe,CompressionStreamNative:typeof CompressionStream!=mr&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=mr&&DecompressionStream},Ft=Object.assign({},sd);function Vi(){return Ft}function to(e){return Math.max(e.chunkSize,id)}function Gi(e){const{baseURL:t,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:i,useCompressionStream:s,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:f,DecompressionStream:d,workerScripts:u}=e;if(Mt("baseURL",t),Mt("chunkSize",n),Mt("maxWorkers",r),Mt("terminateWorkerTimeout",i),Mt("useCompressionStream",s),Mt("useWebWorkers",a),o&&(Ft.CompressionStream=new la(o)),l&&(Ft.DecompressionStream=new la(l)),Mt("CompressionStream",f),Mt("DecompressionStream",d),u!==fe){const{deflate:p,inflate:w}=u;if((p||w)&&(Ft.workerScripts||(Ft.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");Ft.workerScripts.deflate=p}if(w){if(!Array.isArray(w))throw new Error("workerScripts.inflate must be an array");Ft.workerScripts.inflate=w}}}function Mt(e,t){t!==fe&&(Ft[e]=t)}const En={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin",cap:["cap","pcap"],"cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",javascript:"js",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":"odm","vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-debian-package":["deb","udeb"],"x-director":["dcr","dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-koan":["skp","skd","skt","skm"],"x-kpresenter":["kpr","kpt"],"x-kword":["kwd","kwt"],"x-latex":"latex","x-lha":"lha","x-lyx":"lyx","x-lzh":"lzh","x-lzx":"lzx","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-ms-wmd":"wmd","x-ms-wmz":"wmz","x-msdos-program":["com","exe","bat","dll"],"x-msi":"msi","x-netcdf":["nc","cdf"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":"rpm","x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tcl":"tcl","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-troff":["t","tr","roff"],"x-troff-man":"man","x-troff-me":"me","x-troff-ms":"ms","x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix",json:"json","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":"mathml",mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","x-msdownload":["exe","dll","com","bat","msi"],"x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tads":"gam","x-tex":"tex","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-compressed":"tgz","x-gzip":"gz","x-perfmon":["pma","pmc","pml","pmr","pmw"],"x-pkcs7-mime":["p7c","p7m"],"ynd.ms-pkipko":"pko"},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":["aif","aiff","aifc"],"x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2","x-wav":"wav",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":["mmd","mmod"],"x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":["sd","sdf"],"x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","mpc","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":["val","aso"],"x-pdb":["pdb","ent"],"x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-photoshop":"psd","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",pipeg:"jfif"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":["x3d","x3dz"],"x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:["tm","ts"],"tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{avif:".avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","vrml","wrl","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const t in En)if(En.hasOwnProperty(t)){for(const n in En[t])if(En[t].hasOwnProperty(n)){const r=En[t][n];if(typeof r=="string")e[r]=t+"/"+n;else for(let i=0;i>>1^3988292384:t=t>>>1;no[e]=t}class pr{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let r=0,i=t.length|0;r>>8^no[(n^t[r])&255];this.crc=n}get(){return~this.crc}}class ro extends TransformStream{constructor(){const t=new pr;super({transform(n){t.append(n)},flush(n){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t.get()),n.enqueue(r)}})}}function Si(e){if(typeof TextEncoder>"u"){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n0&&t&&(e[n-1]=Fe.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let a=0;a>>t),n=e[a]<<32-t;const i=e.length?e[e.length-1]:0,s=Fe.getPartial(i);return r.push(Fe.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},_r={bytes:{fromBits(e){const n=Fe.bitLength(e)/8,r=new Uint8Array(n);let i;for(let s=0;s>>24,i<<=8;return r},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let o=t.blockSize+r-(t.blockSize+r&t.blockSize-1);o<=i;o+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=Fe.concat(t,[Fe.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r},_S(e,t){return t<>>32-e},_block(e){const t=this,n=t._h,r=Array(80);for(let f=0;f<16;f++)r[f]=e[f];let i=n[0],s=n[1],a=n[2],o=n[3],l=n[4];for(let f=0;f<=79;f++){f>=16&&(r[f]=t._S(1,r[f-3]^r[f-8]^r[f-14]^r[f-16]));const d=t._S(5,i)+t._f(f,s,a,o)+l+r[f]+t._key[Math.floor(f/20)]|0;l=o,o=a,a=t._S(30,s),s=i,i=d}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+l|0}};const io={};io.aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,o,l=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;s<4*i+28;s++){let f=a[s-1];(s%i===0||i===8&&s%i===4)&&(f=n[f>>>24]<<24^n[f>>16&255]<<16^n[f>>8&255]<<8^n[f&255],s%i===0&&(f=f<<8^f>>>24^l<<24,l=l<<1^(l>>7)*283)),a[s]=a[s-i]^f}for(let f=0;s;f++,s--){const d=a[f&3?s:s-4];s<=4||f<4?o[f]=d:o[f]=r[0][n[d>>>24]]^r[1][n[d>>16&255]]^r[2][n[d>>8&255]]^r[3][n[d&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,o,l,f;for(let d=0;d<256;d++)s[(i[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let u=a^a<<1^a<<2^a<<3^a<<4;u=u>>8^u&255^99,n[d]=u,r[u]=d,f=i[l=i[o=i[d]]];let p=f*16843009^l*65537^o*257^d*16843008,w=i[u]*257^u*16843008;for(let v=0;v<4;v++)e[v][d]=w=w<<24^w>>>8,t[v][u]=p=p<<24^p>>>8}for(let d=0;d<5;d++)e[d]=e[d].slice(0),t[d]=t[d].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],l=s[2],f=s[3],d=s[4];let u=e[0]^n[0],p=e[t?3:1]^n[1],w=e[2]^n[2],v=e[t?1:3]^n[3],h=4,c,m,_;for(let b=0;b>>24]^o[p>>16&255]^l[w>>8&255]^f[v&255]^n[h],m=a[p>>>24]^o[w>>16&255]^l[v>>8&255]^f[u&255]^n[h+1],_=a[w>>>24]^o[v>>16&255]^l[u>>8&255]^f[p&255]^n[h+2],v=a[v>>>24]^o[u>>16&255]^l[p>>8&255]^f[w&255]^n[h+3],h+=4,u=c,p=m,w=_;for(let b=0;b<4;b++)i[t?3&-b:b]=d[u>>>24]<<24^d[p>>16&255]<<16^d[w>>8&255]<<8^d[v&255]^n[h++],c=u,u=p,p=w,w=v,v=c;return i}};const ad={getRandomValues(e){const t=new Uint32Array(e.buffer),n=r=>{let i=987654321;const s=4294967295;return function(){return i=36969*(i&65535)+(i>>16)&s,r=18e3*(r&65535)+(r>>16)&s,(((i<<16)+r&s)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r>24&255)===255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=Fe.bitLength(t);for(let s=0;s>5)+1<<2;let s,a,o,l,f;const d=new ArrayBuffer(i),u=new DataView(d);let p=0;const w=Fe;for(t=_r.bytes.toBits(t),f=1;p<(i||1);f++){for(s=a=e.encrypt(w.concat(t,[f])),o=1;oi&&(e=n.hash(e));for(let s=0;sthis.resolveReady=i),password:t,signed:n,strength:r-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;o?(await bd(a,l,o,qe(i,0,Ln[l]+2)),i=qe(i,Ln[l]+2),f()):await d;const u=new Uint8Array(i.length-It-(i.length-It)%on);s.enqueue(po(a,i,u,0,It,!0))},async flush(i){const{signed:s,ctr:a,hmac:o,pending:l,ready:f}=this;await f;const d=qe(l,0,l.length-It),u=qe(l,l.length-It);let p=new Uint8Array;if(d.length){const w=Nn(lt,d);o.update(w);const v=a.update(w);p=Cn(lt,v)}if(s){const w=qe(Cn(lt,o.digest()),0,It);for(let v=0;vthis.resolveReady=i),password:t,strength:n-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;let u=new Uint8Array;o?(u=await vd(a,l,o),f()):await d;const p=new Uint8Array(u.length+i.length-i.length%on);p.set(u,0),s.enqueue(po(a,i,p,u.length,0))},async flush(i){const{ctr:s,hmac:a,pending:o,ready:l}=this;await l;let f=new Uint8Array;if(o.length){const d=s.update(Nn(lt,o));a.update(d),f=Cn(lt,d)}r.signature=Cn(lt,a.digest()).slice(0,It),i.enqueue(qi(f,r.signature))}}),r=this}}function po(e,t,n,r,i,s){const{ctr:a,hmac:o,pending:l}=e,f=t.length-i;l.length&&(t=qi(l,t),n=Ed(n,f-f%on));let d;for(d=0;d<=f-on;d+=on){const u=Nn(lt,qe(t,d,d+on));s&&o.update(u);const p=a.update(u);s||o.update(p),n.set(Cn(lt,p),d+r)}return e.pending=qe(t,d),n}async function bd(e,t,n,r){const i=await _o(e,t,n,qe(r,0,Ln[t])),s=qe(r,Ln[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new Error(ao)}async function vd(e,t,n){const r=lo(new Uint8Array(Ln[t])),i=await _o(e,t,n,r);return qi(r,i)}async function _o(e,t,n,r){e.password=null;const i=Si(n),s=await kd(ld,i,fd,!1,ud),a=await Sd(Object.assign({salt:r},fo),s,8*(Dn[t]*2+2)),o=new Uint8Array(a),l=Nn(lt,qe(o,0,Dn[t])),f=Nn(lt,qe(o,Dn[t],Dn[t]*2)),d=qe(o,Dn[t]*2);return Object.assign(e,{keys:{key:l,authentication:f,passwordVerification:d},ctr:new wd(new _d(l),Array.from(hd)),hmac:new gd(f)}),d}function kd(e,t,n,r,i){return md?Hn.importKey(e,t,n,r,i):Wn.importKey(t)}async function Sd(e,t,n){return pd?await Hn.deriveBits(e,t,n):Wn.pbkdf2(t,e.salt,fo.iterations,n)}function qi(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Ed(e,t){if(t&&t>e.length){const n=e;e=new Uint8Array(t),e.set(n,0)}return e}function qe(e,t,n){return e.subarray(t,n)}function Cn(e,t){return e.fromBits(t)}function Nn(e,t){return e.toBits(t)}const cn=12;class Dd extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),wo(this,t)},transform(r,i){const s=this;if(s.password){const a=ca(s,r.subarray(0,cn));if(s.password=null,a[cn-1]!=s.passwordVerification)throw new Error(ao);r=r.subarray(cn)}i.enqueue(ca(s,r))}})}}class Td extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),wo(this,t)},transform(r,i){const s=this;let a,o;if(s.password){s.password=null;const l=lo(new Uint8Array(cn));l[cn-1]=s.passwordVerification,a=new Uint8Array(r.length+l.length),a.set(da(s,l),0),o=cn}else a=new Uint8Array(r.length),o=0;a.set(da(s,r),o),i.enqueue(a)}})}}function ca(e,t){const n=new Uint8Array(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function go(e){const t=e.keys[2]|2;return xo(Math.imul(t,t^1)>>>8)}function xo(e){return e&255}function fa(e){return e&4294967295}const ua="deflate-raw";class Od extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:r,CompressionStreamNative:i}){super({});const{compressed:s,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:f,level:d}=t,u=this;let p,w,v=yo(super.readable);(!a||l)&&f&&([v,p]=v.tee(),p=ct(p,new ro)),s&&(v=vo(v,o,{level:d,chunkSize:n},i,r)),a&&(l?v=ct(v,new Td(t)):(w=new yd(t),v=ct(v,w))),bo(u,v,async()=>{let h;a&&!l&&(h=w.signature),(!a||l)&&f&&(h=await p.getReader().read(),h=new DataView(h.value.buffer).getUint32(0)),u.signature=h})}}class Ad extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:r,DecompressionStreamNative:i}){super({});const{zipCrypto:s,encrypted:a,signed:o,signature:l,compressed:f,useCompressionStream:d}=t;let u,p,w=yo(super.readable);a&&(s?w=ct(w,new Dd(t)):(p=new xd(t),w=ct(w,p))),f&&(w=vo(w,d,{chunkSize:n},i,r)),(!a||s)&&o&&([w,u]=w.tee(),u=ct(u,new ro)),bo(this,w,async()=>{if((!a||s)&&o){const v=await u.getReader().read(),h=new DataView(v.value.buffer);if(l!=h.getUint32(0,!1))throw new Error(oo)}})}}function yo(e){return ct(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function bo(e,t,n){t=ct(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function vo(e,t,n,r,i){try{const s=t&&r?r:i;e=ct(e,new s(ua,n))}catch(s){if(t)e=ct(e,new i(ua,n));else throw s}return e}function ct(e,t){return e.pipeThrough(t)}const Rd="message",Md="start",Id="pull",ha="data",Fd="ack",Ld="close",ko="deflate",So="inflate";class Cd extends TransformStream{constructor(t,n){super({});const r=this,{codecType:i}=t;let s;i.startsWith(ko)?s=Od:i.startsWith(So)&&(s=Ad);let a=0;const o=new s(t,n),l=super.readable,f=new TransformStream({transform(d,u){d&&d.length&&(a+=d.length,u.enqueue(d))},flush(){const{signature:d}=o;Object.assign(r,{signature:d,size:a})}});Object.defineProperty(r,"readable",{get(){return l.pipeThrough(o).pipeThrough(f)}})}}const Nd=typeof Worker!=mr;class ni{constructor(t,{readable:n,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:f},d){const{signal:u}=a;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new Pd(n,a,s),{signal:u}),writable:r,options:Object.assign({},i),scripts:f,transferStreams:l,terminate(){const{worker:p,busy:w}=t;p&&!w&&(p.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,d(t)}}),(o&&Nd?Yd:Ud)(t,s)}}class Pd extends TransformStream{constructor(t,{onstart:n,onprogress:r,size:i,onend:s},{chunkSize:a}){let o=0;super({start(){n&&ri(n,i)},async transform(l,f){o+=l.length,r&&await ri(r,o,i),f.enqueue(l)},flush(){t.size=o,s&&ri(s,o)}},{highWaterMark:1,size:()=>a})}}async function ri(e,...t){try{await e(...t)}catch{}}function Ud(e,t){return{run:()=>Wd(e,t)}}function Yd(e,{baseURL:t,chunkSize:n}){return e.interface||Object.assign(e,{worker:Bd(e.scripts[0],t,e),interface:{run:()=>Hd(e,{chunkSize:n})}}),e.interface}async function Wd({options:e,readable:t,writable:n,onTaskFinished:r},i){const s=new Cd(e,i);try{await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,size:o}=s;return{signature:a,size:o}}finally{r()}}async function Hd(e,t){let n,r;const i=new Promise((p,w)=>{n=p,r=w});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});const{readable:s,options:a,scripts:o}=e,{writable:l,closed:f}=jd(e.writable);Ei({type:Md,scripts:o.slice(1),options:a,config:t,readable:s,writable:l},e)||Object.assign(e,{reader:s.getReader(),writer:l.getWriter()});const u=await i;try{await l.close()}catch{}return await f,u}function jd(e){const t=e.getWriter();let n;const r=new Promise(s=>n=s);return{writable:new WritableStream({async write(s){await t.ready,await t.write(s)},close(){t.releaseLock(),n()},abort(s){return t.abort(s)}}),closed:r}}let ma=!0,pa=!0;function Bd(e,t,n){const r={type:"module"};let i,s;typeof e==Qa&&(e=e());try{i=new URL(e,t)}catch{i=e}if(ma)try{s=new Worker(i)}catch{ma=!1,s=new Worker(i,r)}else s=new Worker(i,r);return s.addEventListener(Rd,a=>Vd(a,n)),s}function Ei(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:s,readable:a,writable:o}=e;const l=[];if(s){const{buffer:f,length:d}=s;d!=f.byteLength&&(s=new Uint8Array(s)),e.value=s.buffer,l.push(e.value)}if(i&&pa?(a&&l.push(a),o&&l.push(o)):e.readable=e.writable=null,l.length)try{return t.postMessage(e,l),!0}catch{pa=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(s){throw n&&n.releaseLock(),r(),s}}async function Vd({data:e},t){const{type:n,value:r,messageId:i,result:s,error:a}=e,{reader:o,writer:l,resolveResult:f,rejectResult:d,onTaskFinished:u}=t;try{if(a){const{message:w,stack:v,code:h,name:c}=a,m=new Error(w);Object.assign(m,{stack:v,code:h,name:c}),p(m)}else{if(n==Id){const{value:w,done:v}=await o.read();Ei({type:ha,value:w,done:v,messageId:i},t)}n==ha&&(await l.ready,await l.write(new Uint8Array(r)),Ei({type:Fd,messageId:i},t)),n==Ld&&p(null,s)}}catch(w){p(w)}function p(w,v){w?d(w):f(v),l&&l.releaseLock(),u()}}let Vt=[];const ii=[];let _a=0;async function Eo(e,t){const{options:n,config:r}=t,{transferStreams:i,useWebWorkers:s,useCompressionStream:a,codecType:o,compressed:l,signed:f,encrypted:d}=n,{workerScripts:u,maxWorkers:p,terminateWorkerTimeout:w}=r;t.transferStreams=i||i===fe;const v=!l&&!f&&!d&&!t.transferStreams;t.useWebWorkers=!v&&(s||s===fe&&r.useWebWorkers),t.scripts=t.useWebWorkers&&u?u[o]:[],n.useCompressionStream=a||a===fe&&r.useCompressionStream;let h;const c=Vt.find(_=>!_.busy);if(c)wa(c),h=new ni(c,e,t,m);else if(Vt.lengthii.push({resolve:_,stream:e,workerOptions:t}));return h.run();function m(_){if(ii.length){const[{resolve:b,stream:k,workerOptions:g}]=ii.splice(0,1);b(new ni(_,k,g,m))}else _.worker?(wa(_),Number.isFinite(w)&&w>=0&&(_.terminateTimeout=setTimeout(()=>{Vt=Vt.filter(b=>b!=_),_.terminate()},w))):Vt=Vt.filter(b=>b!=_)}}function wa(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function Gd(e){const t=()=>URL.createObjectURL(new Blob([`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:"PBKDF2"},B=t.assign({hash:{name:"HMAC"}},R),E=t.assign({iterations:1e3,hash:{name:"SHA-1"}},R),M=["deriveBits"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&"function"==typeof T.importKey,L=N&&W&&"function"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s("Invalid password")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s("Invalid signature")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey("raw",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s("Invalid password");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s("Invalid signature")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)("deflate-raw",n))}catch(r){if(!t)throw r;e=pe(e,new s("deflate-raw",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=le:s.startsWith("inflate")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:"pull",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:"data",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:"close",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&ke(e),"data"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe="oversubscribed dynamic bit lengths tree":-5!=a&&0!==r[0]||(f.Oe="incomplete dynamic bit lengths tree",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe="oversubscribed literal/length tree":-4!=h&&(w.Oe="incomplete literal/length tree",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe="oversubscribed distance tree":-5==h?(w.Oe="incomplete distance tree",h=-3):-4!=h&&(w.Oe="empty distance tree with lengths",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe="invalid distance code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe="invalid literal/length code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe="invalid literal/length code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe="invalid distance code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe="invalid block type",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe="invalid stored block lengths",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe="too many length or distance symbols",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe="invalid bit length repeat",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe="need dictionary",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye}; +`],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}const Do="HTTP error ",Rr="HTTP Range not supported",Zd="Writer iterator completed too soon",qd="text/plain",zd="Content-Length",$d="Content-Range",Kd="Accept-Ranges",Xd="Range",Jd="Content-Type",Qd="HEAD",$i="GET",To="bytes",ef=64*1024,Ki="writable";class Mr{constructor(){this.size=0}init(){this.initialized=!0}}class Yt extends Mr{get readable(){const t=this,{chunkSize:n=ef}=t,r=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:s=0,size:a,diskNumberStart:o}=r,{chunkOffset:l}=this;i.enqueue(await Ie(t,s+l,Math.min(n,a-l),o)),l+n>a?i.close():this.chunkOffset+=n}});return r}}class Oo extends Mr{constructor(){super();const t=this,n=new WritableStream({write(r){return t.writeUint8Array(r)}});Object.defineProperty(t,Ki,{get(){return n}})}writeUint8Array(){}}class Di extends Yt{constructor(t){super();let n=t.length;for(;t.charAt(n-1)=="=";)n--;const r=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:r,size:Math.floor((n-r)*.75)})}readUint8Array(t,n){const{dataStart:r,dataURI:i}=this,s=new Uint8Array(n),a=Math.floor(t/3)*4,o=atob(i.substring(a+r,Math.ceil((t+n)/3)*4+r)),l=t-Math.floor(a/4)*3;for(let f=l;f2?n.data+=btoa(i):n.pending=i}getData(){return this.data+btoa(this.pending)}}class mn extends Yt{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){const r=this;return new Uint8Array(await r.blob.slice(t,t+n).arrayBuffer())}}class $t extends Mr{constructor(t){super();const n=this,r=new TransformStream,i=[];t&&i.push([Jd,t]),Object.defineProperty(n,Ki,{get(){return r.writable}}),n.blob=new Response(r.readable,{headers:i}).blob()}getData(){return this.blob}}class Ao extends mn{constructor(t){super(new Blob([t],{type:qd}))}}class Ti extends $t{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:n}=this,r=await super.getData();if(r.text&&n)return r.text();{const i=new FileReader;return new Promise((s,a)=>{Object.assign(i,{onload:({target:o})=>s(o.result),onerror:()=>a(i.error)}),i.readAsText(r,t)})}}}class tf extends Yt{constructor(t,n){super(),Ro(this,t,n)}async init(){super.init(),await Mo(this,Oi,ga)}readUint8Array(t,n){return Io(this,t,n,Oi,ga)}}class nf extends Yt{constructor(t,n){super(),Ro(this,t,n)}async init(){super.init(),await Mo(this,Ai,xa)}readUint8Array(t,n){return Io(this,t,n,Ai,xa)}}function Ro(e,t,n){const{preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s}=n;n=Object.assign({},n),delete n.preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.useXHR,Object.assign(e,{url:t,options:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s})}async function Mo(e,t,n){const{url:r,useRangeHeader:i,forceRangeRequests:s}=e;if(sf(r)&&(i||s)){const{headers:a}=await t($i,e,Fo(e));if(!s&&a.get(Kd)!=To)throw new Error(Rr);{let o;const l=a.get($d);if(l){const f=l.trim().split(/\s*\/\s*/);if(f.length){const d=f[1];d&&d!="*"&&(o=Number(d))}}o===fe?await ya(e,t,n):e.size=o}}else await ya(e,t,n)}async function Io(e,t,n,r,i){const{data:s,useRangeHeader:a,forceRangeRequests:o,options:l}=e;if(a||o){const f=await r($i,e,Fo(e,t,n));if(f.status!=206)throw new Error(Rr);return new Uint8Array(await f.arrayBuffer())}else return s||await i(e,l),new Uint8Array(s.subarray(t,t+n))}function Fo(e,t=0,n=1){return Object.assign({},Xi(e),{[Xd]:To+"="+t+"-"+(t+n-1)})}function Xi({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function ga(e){await Lo(e,Oi)}async function xa(e){await Lo(e,Ai)}async function Lo(e,t){const n=await t($i,e,Xi(e));e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function ya(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t(Qd,e,Xi(e))).headers.get(zd);i?e.size=Number(i):await n(e,e.options)}}async function Oi(e,{options:t,url:n},r){const i=await fetch(n,Object.assign({},t,{method:e,headers:r}));if(i.status<400)return i;throw i.status==416?new Error(Rr):new Error(Do+(i.statusText||i.status))}function Ai(e,{url:t},n){return new Promise((r,i)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",()=>{if(s.status<400){const a=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(o=>{const l=o.trim().split(/\s*:\s*/);l[0]=l[0].trim().replace(/^[a-z]|-[a-z]/g,f=>f.toUpperCase()),a.push(l)}),r({status:s.status,arrayBuffer:()=>s.response,headers:new Map(a)})}else i(s.status==416?new Error(Rr):new Error(Do+(s.statusText||s.status)))},!1),s.addEventListener("error",a=>i(a.detail.error),!1),s.open(e,t),n)for(const a of Object.entries(n))s.setRequestHeader(a[0],a[1]);s.responseType="arraybuffer",s.send()})}class ba extends Yt{constructor(t,n={}){super(),Object.assign(this,{url:t,reader:n.useXHR?new nf(t,n):new tf(t,n)})}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(t,n){return this.reader.readUint8Array(t,n)}}class Ri extends Yt{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,n){return this.array.slice(t,t+n)}}class gr extends Oo{init(t=0){super.init(),Object.assign(this,{offset:0,array:new Uint8Array(t)})}writeUint8Array(t){const n=this;if(n.offset+t.length>n.array.length){const r=n.array;n.array=new Uint8Array(r.length+t.length),n.array.set(r)}n.array.set(t,n.offset),n.offset+=t.length}getData(){return this.array}}class rf extends Yt{constructor(t){super(),this.readers=t}async init(){super.init();const t=this,{readers:n}=t;t.lastDiskNumber=0,await Promise.all(n.map(async r=>{await r.init(),t.size+=r.size}))}async readUint8Array(t,n,r=0){const i=this,{readers:s}=this;let a,o=r;o==-1&&(o=s.length-1);let l=t;for(;l>=s[o].size;)l-=s[o].size,o++;const f=s[o],d=f.size;if(l+n<=d)a=await Ie(f,l,n);else{const u=d-l;a=new Uint8Array(n),a.set(await Ie(f,l,u)),a.set(await i.readUint8Array(t+u,n-u,r),u)}return i.lastDiskNumber=Math.max(o,i.lastDiskNumber),a}}class va extends Mr{constructor(t,n=4294967296){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,availableSize:n});let i,s,a;const o=new WritableStream({async write(d){if(a)if(i.size+d.length>=n){const u=n-i.size;await l(d.slice(0,u)),await f(),r.diskOffset+=i.size,r.diskNumber++,a=null,await this.write(d.slice(u))}else d.length&&await l(d),r.availableSize=n-i.size;else{const{value:u,done:p}=await t.next();if(p&&!u)throw new Error(Zd);i=u,i.size=0,s=u.writable,a=s.getWriter(),await this.write(d)}},async close(){await a.ready,await f()}});Object.defineProperty(r,Ki,{get(){return o}});async function l(d){await a.ready,await a.write(d),i.size+=d.length,r.size+=d.length}async function f(){s.size=i.size,await a.close()}}}function sf(e){const{baseURL:t}=Vi(),{protocol:n}=new URL(e,t);return n=="http:"||n=="https:"}async function ze(e,t){e.init&&!e.initialized&&await e.init(t)}function Ie(e,t,n,r){return e.readUint8Array(t,n,r)}const Co="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),af=Co.length==256;function of(e){if(af){let t="";for(let n=0;nthis[n]=t[n])}}const si="File format is not recognized",ff="End of central directory not found",uf="End of Zip64 central directory not found",hf="End of Zip64 central directory locator not found",mf="Central directory header not found",pf="Local file header not found",_f="Zip64 extra field not found",wf="File contains encrypted entry",gf="Encryption method not supported",ka="Compression method not supported",Sa="Split zip file",Ea="utf-8",Da="cp437",xf=[[Wo,pe],[Ho,pe],[jo,pe],[Ii,ke]],yf={[ke]:{getValue:_e,bytes:4},[pe]:{getValue:lr,bytes:8}};class bf{constructor(t,n={}){t instanceof ReadableStream&&(t={readable:t}),Object.assign(this,{reader:t,options:n,config:Vi()})}async*getEntriesGenerator(t={}){const n=this;let{reader:r}=n;const{config:i}=n;if(await ze(r),(r.size===fe||!r.readUint8Array)&&(Array.isArray(r)?r=new rf(r):r=new mn(await new Response(r.readable).blob()),await ze(r)),r.size=r.size)throw new Error(si);let _=0,b=await Ie(r,l,o,v),k=Te(b);if(o){const S=s.offset-o;if(_e(k,_)!=gi&&l!=S){const E=l;l=S,c=l-E,b=await Ie(r,l,o,v),k=Te(b)}}if(l<0||l>=r.size)throw new Error(si);const g=tt(n,t,"filenameEncoding"),y=tt(n,t,"commentEncoding");for(let S=0;SE.getData(ht,Wt,Ht),_=we;const{onprogress:Dt}=t;if(Dt)try{await Dt(S+1,h,new xr(E))}catch{}yield Wt}const x=tt(n,t,"extractPrependedData"),D=tt(n,t,"extractAppendedData");return x&&(n.prependedData=m>0?await Ie(r,0,m):new Uint8Array),n.comment=d?await Ie(r,f+an,d):new Uint8Array,D&&(n.appendedData=u>>8&255:p>>>24&255),signature:p,compressed:f!=0,encrypted:k,useWebWorkers:tt(i,r,"useWebWorkers"),useCompressionStream:tt(i,r,"useCompressionStream"),transferStreams:tt(i,r,"transferStreams")},config:d,streamOptions:{signal:E,size:D,onstart:O,onprogress:U,onend:F}};return S.size+=(await Eo({readable:x,writable:S},B)).size,tt(i,r,"preventClose")||await S.close(),t.getData?t.getData():S}}function zo(e,t,n){const r=e.rawBitFlag=be(t,n+2),i=(r&yi)==yi,s=_e(t,n+6);Object.assign(e,{encrypted:i,version:be(t,n),bitFlag:{level:(r&nd)>>1,dataDescriptor:(r&bi)==bi,languageEncodingFlag:(r&vi)==vi},rawLastModDate:s,lastModDate:Of(s),filenameLength:be(t,n+22),extraFieldLength:be(t,n+24)})}async function $o(e,t,n,r){const{rawExtraField:i}=t,s=t.extraField=new Map,a=Te(new Uint8Array(i));let o=0;try{for(;ot[i]==s);for(let i=0,s=0;i{if(e.data.length>=a+4){const f=_e(n,a);t[o]=e[o]=new Date(f*1e3);const d=s[l];e[d]=f}a+=4})}async function Tf(e,t,n,r,i){const s=new Uint8Array(4),a=Te(s);Af(a,0,t);const o=r+i;return await l(r)||await l(Math.min(o,n));async function l(f){const d=n-f,u=await Ie(e,d,f);for(let p=u.length-r;p>=0;p--)if(u[p]==s[0]&&u[p+1]==s[1]&&u[p+2]==s[2]&&u[p+3]==s[3])return{offset:d+p,buffer:u.slice(p,p+r).buffer}}}function tt(e,t,n){return t[n]===fe?e.options[n]:t[n]}function Of(e){const t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function ai(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function dn(e,t){return e.getUint8(t)}function be(e,t){return e.getUint16(t,!0)}function _e(e,t){return e.getUint32(t,!0)}function lr(e,t){return Number(e.getBigUint64(t,!0))}function Af(e,t,n){e.setUint32(t,n,!0)}function Te(e){return new DataView(e.buffer)}const Rf="File already exists",Mf="Zip file comment exceeds 64KB",If="File entry comment exceeds 64KB",Ff="File entry name exceeds 64KB",Oa="Version exceeds 65535",Lf="The strength must equal 1, 2, or 3",Cf="Extra field type exceeds 65535",Nf="Extra field data exceeds 64KB",ts="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Aa=new Uint8Array([7,0,2,0,65,69,3,0,0]),Ko=28;let oi=0;const Ra=[];class Pf{constructor(t,n={}){t.writable===fe&&typeof t.next==Qa&&(t=new va(t)),t instanceof WritableStream&&(t={writable:t}),t.writable.size===fe&&(t.writable.size=0);const r=t instanceof va;r||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0}),Object.assign(this,{writer:t,addSplitZipSignature:r,options:n,config:Vi(),files:new Map,filenames:new Set,offset:t.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set})}async add(t="",n,r={}){const i=this,{pendingAddFileCalls:s,config:a}=i;oiRa.push(l));let o;try{if(t=t.trim(),i.filenames.has(t))throw new Error(Rf);return i.filenames.add(t),o=Uf(i,t,n,r),s.add(o),await o}catch(l){throw i.filenames.delete(t),l}finally{s.delete(o);const l=Ra.shift();l?l():oi--}}async close(t=new Uint8Array,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:s}=i;for(;r.size;)await Promise.all(Array.from(r));return await Zf(this,t,n),!i.preventClose&&!n.preventClose&&await s.close(),i.getData?i.getData():s}}async function Uf(e,t,n,r){t=t.trim(),r.directory&&!t.endsWith(or)?t+=or:r.directory=t.endsWith(or);const i=Si(t);if(ee(i)>ke)throw new Error(Ff);const s=r.comment||"",a=Si(s);if(ee(a)>ke)throw new Error(If);const o=e.options.version||r.version||0;if(o>ke)throw new Error(Oa);const l=e.options.versionMadeBy||r.versionMadeBy||20;if(l>ke)throw new Error(Oa);const f=xe(e,r,Ji)||new Date,d=xe(e,r,Qi),u=xe(e,r,es),p=xe(e,r,"password"),w=xe(e,r,"encryptionStrength")||3,v=xe(e,r,"zipCrypto");if(p!==fe&&w!==fe&&(w<1||w>3))throw new Error(Lf);let h=new Uint8Array;const{extraField:c}=r;if(c){let he=0,V=0;c.forEach(Z=>he+=4+ee(Z)),h=new Uint8Array(he),c.forEach((Z,Se)=>{if(Se>ke)throw new Error(Cf);if(ee(Z)>ke)throw new Error(Nf);ve(h,new Uint16Array([Se]),V),ve(h,new Uint16Array([ee(Z)]),V+2),ve(h,Z,V+4),V+=4+ee(Z)})}let m=xe(e,r,"extendedTimestamp");m===fe&&(m=!0);let _=0,b=0,k=xe(e,r,"keepOrder");k===fe&&(k=!0);let g=0,y=xe(e,r,Zo);y===fe&&(y=!0);const x=xe(e,r,Vo)||0,D=xe(e,r,Go)||0;let S=xe(e,r,qo);n&&(n instanceof ReadableStream&&(n={readable:n}),await ze(n),n.size===fe?(r.dataDescriptor=!0,(S||S===fe)&&(S=!0,_=pe)):(g=n.size,_=zf(g)));const{diskOffset:E}=e.writer;if(e.offset+e.pendingEntriesSize-E>=pe||g>=pe||_>=pe){if(S===!1||!k)throw new Error(ts);S=!0}S=S||!1;const O=xe(e,r,"level"),U=xe(e,r,"useWebWorkers"),F=xe(e,r,"bufferedWrite");let B=xe(e,r,"dataDescriptor"),N=xe(e,r,"dataDescriptorSignature");const Y=xe(e,r,"signal"),j=xe(e,r,"useCompressionStream");B===fe&&(B=!0),B&&N===fe&&(N=!1),r=Object.assign({},r,{rawFilename:i,rawComment:a,version:o,versionMadeBy:l,lastModDate:f,lastAccessDate:d,creationDate:u,rawExtraField:h,zip64:S,password:p,level:O,useWebWorkers:U,encryptionStrength:w,extendedTimestamp:m,zipCrypto:v,bufferedWrite:F,keepOrder:k,dataDescriptor:B,dataDescriptorSignature:N,signal:Y,msDosCompatible:y,internalFileAttribute:x,externalFileAttribute:D,useCompressionStream:j});const q=Hf(r),we=jf(r);b=ee(q.localHeaderArray,we.dataDescriptorArray)+_,e.pendingEntriesSize+=b;let W;try{W=await Yf(e,t,n,{headerInfo:q,dataDescriptorInfo:we},r)}finally{e.pendingEntriesSize-=b}return Object.assign(W,{name:t,comment:s,extraField:c}),new xr(W)}async function Yf(e,t,n,r,i){const{files:s,writer:a}=e,{keepOrder:o,dataDescriptor:l,signal:f}=i,d=Array.from(s.values()).pop();let u={},p,w,v,h,c,m;s.set(t,u);try{let k;o&&(k=d&&d.lock,_()),i.bufferedWrite||e.lockWriter||!l?(m=new $t,m.writable.size=0,p=!0,await ze(a)):(m=a,e.lockWriter=Promise.resolve(),w=()=>delete e.lockWriter),await ze(m);const{writable:g,diskNumber:y}=a;let{diskOffset:x}=a;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const D=new Uint8Array(4),S=He(D);Q(S,0,ji),await Nt(g,D),e.offset+=4}if(p||await k,c=!0,u.diskNumberStart=y,u=await Wf(n,m,u,r,e.config,i),c=!1,s.set(t,u),u.filename=t,p){await m.writable.close();let D=await m.getData();await k,await b(),h=!0,l||(D=await Vf(u,D,g,i)),u.diskNumberStart=a.diskNumber,x=a.diskOffset,await D.stream().pipeTo(g,{preventClose:!0,signal:f}),g.size+=D.size,h=!1}if(u.offset=e.offset-x,u.zip64)Gf(u);else if(u.offset>=pe)throw new Error(ts);return e.offset+=u.length,u}catch(k){throw(p&&h||!p&&c)&&(e.hasCorruptedEntries=!0,k&&(k.corruptedEntry=!0),p?e.offset+=m.writable.size:e.offset=m.writable.size),s.delete(t),k}finally{v&&v(),w&&w()}function _(){u.lock=new Promise(k=>v=k)}async function b(){const{lockWriter:k}=e;if(k)return await k.then(()=>delete e.lockWriter),b();e.lockWriter=new Promise(g=>w=g)}}async function Wf(e,t,{diskNumberStart:n,lock:r},i,s,a){const{headerInfo:o,dataDescriptorInfo:l}=i,{localHeaderArray:f,headerArray:d,lastModDate:u,rawLastModDate:p,encrypted:w,compressed:v,version:h,compressionMethod:c,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b}=o,{dataDescriptorArray:k}=l,{rawFilename:g,lastAccessDate:y,creationDate:x,password:D,level:S,zip64:E,zipCrypto:O,dataDescriptor:U,directory:F,versionMadeBy:B,rawComment:N,rawExtraField:Y,useWebWorkers:j,onstart:q,onprogress:we,onend:W,signal:he,encryptionStrength:V,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,useCompressionStream:Wt}=a,Dt={lock:r,versionMadeBy:B,zip64:E,directory:Boolean(F),filenameUTF8:!0,rawFilename:g,commentUTF8:!0,rawComment:N,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b,rawExtraField:Y,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,diskNumberStart:n};let ht=0,Ht=0,gn;const{writable:Ve}=t;if(e){e.chunkSize=to(s),await Nt(Ve,f);const xn=e.readable,Ee=xn.size=e.size,Ue={options:{codecType:ko,level:S,password:D,encryptionStrength:V,zipCrypto:w&&O,passwordVerification:w&&O&&p>>8&255,signed:!0,compressed:v,encrypted:w,useWebWorkers:j,useCompressionStream:Wt,transferStreams:!1},config:s,streamOptions:{signal:he,size:Ee,onstart:q,onprogress:we,onend:W}},Jt=await Eo({readable:xn,writable:Ve},Ue);Ve.size+=Jt.size,gn=Jt.signature,Ht=e.size=xn.size,ht=Jt.size}else await Nt(Ve,f);const Tt=E?new Uint8Array(Ko+4):new Uint8Array;return e&&Bf({signature:gn,rawExtraFieldZip64:Tt,compressedSize:ht,uncompressedSize:Ht,headerInfo:o,dataDescriptorInfo:l},a),U&&await Nt(Ve,k),Object.assign(Dt,{compressedSize:ht,lastModDate:u,rawLastModDate:p,creationDate:x,lastAccessDate:y,encrypted:w,length:ee(f,k)+ht,compressionMethod:c,version:h,headerArray:d,signature:gn,rawExtraFieldZip64:Tt}),Dt}function Hf(e){const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,password:s,level:a,zip64:o,zipCrypto:l,dataDescriptor:f,directory:d,rawExtraField:u,encryptionStrength:p,extendedTimestamp:w}=e,v=a!==0&&!d,h=Boolean(s&&ee(s));let c;if(h&&!l){c=new Uint8Array(ee(Aa)+2);const N=He(c);re(N,0,Ka),ve(c,Aa,2),yr(N,8,p)}else c=new Uint8Array;let m,_;if(w){_=new Uint8Array(9+(r?4:0)+(i?4:0));const N=He(_);re(N,0,Bi),re(N,2,ee(_)-4);const Y=1+(r?2:0)+(i?4:0);yr(N,4,Y),Q(N,5,Math.floor(n.getTime()/1e3)),r&&Q(N,9,Math.floor(r.getTime()/1e3)),i&&Q(N,13,Math.floor(i.getTime()/1e3));try{m=new Uint8Array(36);const j=He(m),q=li(n);re(j,0,Xa),re(j,2,32),re(j,8,Ja),re(j,10,24),Pe(j,12,q),Pe(j,20,li(r)||q),Pe(j,28,li(i)||q)}catch{m=new Uint8Array}}else m=_=new Uint8Array;let b=vi;f&&(b=b|bi);let k=Va;v&&(k=wi);let g=e.version||rd;o&&(g=g>ia?g:ia),h&&(b=b|yi,l||(g=g>sa?g:sa,k=Ga,v&&(c[9]=wi)));const y=new Uint8Array(26),x=He(y);re(x,0,g),re(x,2,b),re(x,4,k);const D=new Uint32Array(1),S=He(D);let E;naa?E=aa:E=n,re(S,0,(E.getHours()<<6|E.getMinutes())<<5|E.getSeconds()/2),re(S,2,(E.getFullYear()-1980<<4|E.getMonth()+1)<<5|E.getDate());const O=D[0];Q(x,6,O),re(x,22,ee(t));const U=ee(c,_,m,u);re(x,24,U);const F=new Uint8Array(30+ee(t)+U),B=He(F);return Q(B,0,Za),ve(F,y,4),ve(F,t,30),ve(F,c,30+ee(t)),ve(F,_,30+ee(t,c)),ve(F,m,30+ee(t,c,_)),ve(F,u,30+ee(t,c,_,m)),{localHeaderArray:F,headerArray:y,headerView:x,lastModDate:n,rawLastModDate:O,encrypted:h,compressed:v,version:g,compressionMethod:k,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:m,rawExtraFieldAES:c}}function jf(e){const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i=new Uint8Array,s,a=0;return n&&(i=new Uint8Array(t?r?24:20:r?16:12),s=He(i),r&&(a=4,Q(s,0,Jc))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}}function Bf(e,t){const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:s,headerInfo:a,dataDescriptorInfo:o}=e,{headerView:l,encrypted:f}=a,{dataDescriptorView:d,dataDescriptorOffset:u}=o,{zip64:p,zipCrypto:w,dataDescriptor:v}=t;if((!f||w)&&n!==fe&&(Q(l,10,n),v&&Q(d,u,n)),p){const h=He(r);re(h,0,$a),re(h,2,Ko),Q(l,14,pe),Pe(h,12,BigInt(i)),Q(l,18,pe),Pe(h,4,BigInt(s)),v&&(Pe(d,u+4,BigInt(i)),Pe(d,u+12,BigInt(s)))}else Q(l,14,i),Q(l,18,s),v&&(Q(d,u+4,i),Q(d,u+8,s))}async function Vf(e,t,n,{zipCrypto:r}){const i=await qf(t,0,26),s=new DataView(i);return(!e.encrypted||r)&&Q(s,14,e.signature),e.zip64?(Q(s,18,pe),Q(s,22,pe)):(Q(s,18,e.compressedSize),Q(s,22,e.uncompressedSize)),await Nt(n,new Uint8Array(i)),t.slice(i.byteLength)}function Gf(e){const{rawExtraFieldZip64:t,offset:n,diskNumberStart:r}=e,i=He(t);Pe(i,20,BigInt(n)),Q(i,28,r)}async function Zf(e,t,n){const{files:r,writer:i}=e;let s=0,a=0;const{diskOffset:o,writable:l}=i;let{diskNumber:f}=i,d=e.offset-o,u=r.size;for(const[,{rawFilename:k,rawExtraFieldZip64:g,rawExtraFieldAES:y,rawExtraField:x,rawComment:D,rawExtraFieldExtendedTimestamp:S,rawExtraFieldNTFS:E}]of r)a+=46+ee(k,D,g,y,S,E,x);let p=n.zip64||e.options.zip64||!1;if(d>=pe||a>=pe||u>=ke){if(n.zip64===!1||e.options.zip64===!1)throw new Error(ts);p=!0}const w=new Uint8Array(a),v=He(w);for(const[k,g]of Array.from(r.values()).entries()){const{offset:y,rawFilename:x,rawExtraFieldZip64:D,rawExtraFieldAES:S,rawExtraFieldNTFS:E,rawExtraField:O,rawComment:U,versionMadeBy:F,headerArray:B,directory:N,zip64:Y,msDosCompatible:j,internalFileAttribute:q,externalFileAttribute:we,extendedTimestamp:W,lastModDate:he,diskNumberStart:V}=g;let Z;if(W){Z=new Uint8Array(9);const ue=He(Z);re(ue,0,Bi),re(ue,2,ee(Z)-4),yr(ue,4,1),Q(ue,5,Math.floor(he.getTime()/1e3))}else Z=new Uint8Array;const Se=ee(D,S,Z,E,O);if(Q(v,s,gi),re(v,s+4,F),ve(w,B,s+6),re(v,s+30,Se),re(v,s+32,ee(U)),re(v,s+34,Y?ke:V),re(v,s+36,q),we?Q(v,s+38,we):N&&j&&yr(v,s+38,ki),Q(v,s+42,Y?pe:y),ve(w,x,s+46),ve(w,D,s+46+ee(x)),ve(w,S,s+46+ee(x,D)),ve(w,Z,s+46+ee(x,D,S)),ve(w,E,s+46+ee(x,D,S,Z)),ve(w,O,s+46+ee(x,D,S,Z,E)),ve(w,U,s+46+ee(x)+Se),s+=46+ee(x,U)+Se,n.onprogress)try{await n.onprogress(k+1,r.size,new xr(g))}catch{}}await ze(i),await Nt(l,w);const h=new Uint8Array(p?Qc:an),c=He(h);let m=i.diskNumber;const{availableSize:_}=i;_n&&(t+=n.length)),t}class Xo{constructor(t,n,r,i){const s=this;if(t.root&&i&&i.getChildByName(n))throw new Error("Entry filename already exists");r||(r={}),Object.assign(s,{fs:t,name:n,data:r.data,id:t.entries.length,parent:i,children:[],uncompressedSize:0}),t.entries.push(s),i&&s.parent.children.push(s)}moveTo(t){const n=this;n.fs.move(n,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){const n=this;let r=n.name,i=n.parent;for(;i&&i!=t;)r=(i.name?i.name+"/":"")+r,i=i.parent;return r}isDescendantOf(t){let n=this.parent;for(;n&&n.id!=t.id;)n=n.parent;return Boolean(n)}}class Jo extends Xo{constructor(t,n,r,i){super(t,n,r,i);const s=this;s.Reader=r.Reader,s.Writer=r.Writer,r.getData&&(s.getData=r.getData)}async getData(t,n={}){const r=this;if(!t||t.constructor==r.Writer&&r.data)return r.data;{const i=r.reader=new r.Reader(r.data,n);await Promise.all([ze(i),ze(t,r.data.uncompressedSize)]);const s=i.readable;return s.size=r.uncompressedSize=i.size,await s.pipeTo(t.writable),t.getData?t.getData():t.writable}}getText(t,n){return this.getData(new Ti(t),n)}getBlob(t,n){return this.getData(new $t(t),n)}getData64URI(t,n){return this.getData(new wr(t),n)}getUint8Array(t){return this.getData(new gr,t)}getWritable(t=new WritableStream,n){return this.getData({writable:t},n)}replaceBlob(t){Object.assign(this,{data:t,Reader:mn,Writer:$t,reader:null})}replaceText(t){Object.assign(this,{data:t,Reader:Ao,Writer:Ti,reader:null})}replaceData64URI(t){Object.assign(this,{data:t,Reader:Di,Writer:wr,reader:null})}replaceUint8Array(t){Object.assign(this,{data:t,Reader:Ri,Writer:gr,reader:null})}replaceReadable(t){Object.assign(this,{data:null,Reader:function(){return{readable:t}},Writer:null,reader:null})}}class jn extends Xo{constructor(t,n,r,i){super(t,n,r,i),this.directory=!0}addDirectory(t){return mt(this,t,null,!0)}addText(t,n){return mt(this,t,{data:n,Reader:Ao,Writer:Ti})}addBlob(t,n){return mt(this,t,{data:n,Reader:mn,Writer:$t})}addData64URI(t,n){return mt(this,t,{data:n,Reader:Di,Writer:wr})}addUint8Array(t,n){return mt(this,t,{data:n,Reader:Ri,Writer:gr})}addHttpContent(t,n,r={}){return mt(this,t,{data:n,Reader:class extends ba{constructor(i){super(i,r)}}})}addReadable(t,n){return mt(this,t,{Reader:function(){return{readable:n}}})}addFileSystemEntry(t){return eu(this,t)}addData(t,n){return mt(this,t,n)}async importBlob(t,n={}){await this.importZip(new mn(t),n)}async importData64URI(t,n={}){await this.importZip(new Di(t),n)}async importUint8Array(t,n={}){await this.importZip(new Ri(t),n)}async importHttpContent(t,n={}){await this.importZip(new ba(t,n),n)}async importReadable(t,n={}){await this.importZip({readable:t},n)}exportBlob(t={}){return this.exportZip(new $t("application/zip"),t)}exportData64URI(t={}){return this.exportZip(new wr("application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new gr,t)}async exportWritable(t=new WritableStream,n={}){return await this.exportZip({writable:t},n),t}async importZip(t,n){await ze(t),(await new bf(t,n).getEntries()).forEach(s=>{let a=this;const o=s.filename.split("/"),l=o.pop();o.forEach(f=>a=a.getChildByName(f)||new jn(this.fs,f,null,a)),s.directory||mt(a,l,{data:s,Reader:Jf(Object.assign({},n))})})}async exportZip(t,n){const r=this;await Promise.all([Qo(r),ze(t)]);const i=new Pf(t,n);return await Qf(i,r,Xf([r],"uncompressedSize"),n),await i.close(),t.getData?t.getData():t.writable}getChildByName(t){const n=this.children;for(let r=0;r{n.id==e.id&&t.splice(r,1)})}async function Qf(e,t,n,r){const i=t,s=new Map;await a(e,t);async function a(o,l){await f();async function f(){if(r.bufferedWrite)await Promise.all(l.children.map(d));else for(const u of l.children)await d(u)}async function d(u){const p=r.relativePath?u.getRelativeName(i):u.getFullname();await o.add(p,u.reader,Object.assign({directory:u.directory},Object.assign({},r,{onprogress:async w=>{if(r.onprogress){s.set(p,w);try{await r.onprogress(Array.from(s.values()).reduce((v,h)=>v+h),n)}catch{}}}}))),await a(o,u)}}}async function eu(e,t){if(t.isDirectory){const i=e.addDirectory(t.name);return await n(i,t),i}else return new Promise((i,s)=>t.file(a=>i(e.addBlob(t.name,a)),s));async function n(i,s){const a=await r(s);for(const o of a)o.isDirectory?await n(i.addDirectory(o.name),o):await new Promise((l,f)=>{o.file(d=>{const u=i.addBlob(o.name,d);u.uncompressedSize=d.size,l(u)},f)})}function r(i){return new Promise((s,a)=>{let o=[];i.isDirectory&&l(i.createReader()),i.isFile&&s(o);function l(f){f.readEntries(d=>{d.length?(o=o.concat(d),l(f)):s(o)},a)}})}}function tn(e){e.entries=[],e.root=new jn(e)}function mt(e,t,n,r){if(e.directory)return r?new jn(e.fs,t,n,e):new Jo(e.fs,t,n,e);throw new Error("Parent entry is not a directory")}let el;try{el=import.meta.url}catch{}Gi({baseURL:el});Gd(Gi);Gi({Deflate:Rc,Inflate:Xc});function Ir(e){return e.slice(e.lastIndexOf(Fr)+1)}const Fr="/";async function tu(e,t,n){const r=e.vaultPath+"/.obsidian/"+t+".json";let i;return e.adapter.exists(r)&&(i=JSON.parse(await e.adapter.readFile(r))),n(i)}class nu{constructor(t){jt(this,"zipFS");jt(this,"chunks",[]);jt(this,"chunkIndex",0);this.zipBlob=t}async initReadingVault(){this.zipFS=new Kf.FS,await this.zipFS.importBlob(this.zipBlob)}readDirectory(t){return this.zipFS.find(t).children.map(r=>({isDirectory:()=>!!r.directory,getName:()=>r.getFullname()}))}readFile(t){return this.zipFS.find(t).getText("utf-8")}exists(t){return!!this.zipFS.find(t)}resolve(t){return t}resolveInDir(t,n){return t+Fr+n}removeFile(t){}renameFile(t,n){}flushResultsFromInitialProcessing(t){}appendToResultFile(t,n){this.chunks.push(n)}appendToPostProcessingFile(t,n){this.chunks[this.chunkIndex]=n,this.chunkIndex++}initPostProcessingResultFile(t){}chunkIter(){const t=this.chunks;let n=0;return{[Symbol.asyncIterator](){return{async next(){if(n{if(s.forEach((o,l)=>s[l]+=a),r==="seenOne"&&a!=="["&&(r="normal"),r==="seenOneOut"&&a!=="]"&&(r="normal"),a==="["&&(i+=1,r==="seenOne"?(s.push(""),r="normal"):r==="normal"&&(r="seenOne")),a==="]"&&i>0){if(i-=1,r==="seenOneOut"){const o=s.pop();o&&(!t||s.length===0)&&n.push(o.slice(0,-2)),r="normal"}else r==="normal"&&(r="seenOneOut");i===0&&(r="normal")}}),n}function su(e){return Ir(e)!==e}class ci{constructor(){jt(this,"nameWasCalledAsFile",[]);jt(this,"pathMap",new Map);jt(this,"nameMap",new Map)}accessAsFile(t,n,r){const i=this.pathMap.get(n);if(i)return this.nameMap.get(t)||this.nameMap.set(t,i),i;const s=this.nameMap.get(t);if(s&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,s),this.nameWasCalledAsFile.push(t),s;const a=r();return this.pathMap.set(n,a),this.nameMap.get(t)||this.nameMap.set(t,a),this.nameWasCalledAsFile.push(t),a}accessAsLink(t,n){const r=this.findData(t);if(r)return r;const i=su(t),s=n();return i?this.pathMap.set(t,s):this.nameMap.set(t,s),s}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Lr(e){e.totalNodes++,e.leafNodes++}function tl(e){e.leafNodes--,e.topLevelNodes++}function au(e,t,n=ru,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new ci,headingTracker:new ci,dummyHeadingLinkTracker:new Map,blockLinkTracker:new ci,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function vt(e){return Lr(e.summary),e.idGenerator()}function ou(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map);let s=i.get(r);return s||(s={uid:vt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function lu(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map);let a=s.get(i);return a||(a={uid:vt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function cu(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function du(e){let t;return[e.split(` `).map(r=>{const i=r.split(" "),s=i[i.length-1];if(s.startsWith("^"))return t=s,i.slice(0,-1).join(" ")}).join(` `),t]}function nl(e,t,n,r,i,s){const a=[t],o=[e];for(const l of n){const f=i(l);fu(f,l,a,o,r),s==null||s(f,l)}}function fu(e,t,n,r,i){var o;uu(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(o=a.children)!=null?o:[],a.children.push(e)),n.push(t),r.push(e)}function uu(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function rl(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=rl(n.children,r);if(i)return i}}return null}function hu(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function mu(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const o=t.findData(s);if(o){const l={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};nl(f,l,o,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=rl(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function pu(e,t){const[n,r]=mu(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Lr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let o=a;s.forEach(l=>{o=o.replace(l.old,l.new)}),await t.adapter.appendToPostProcessingFile(i,o)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var il=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(il||{});function _u(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function wu(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function gu(e,t){const n=_u(e);switch(wu(n)){case 0:return xu(n[0],t);case 2:return ou(n,t);case 1:return hu(n,t);default:throw"Invalid link type detected: "+n}}function xu(e,t){return t.defaultLinkTracker.accessAsLink(e,()=>(Lr(t.summary),{uid:t.idGenerator(),obsidianLink:e,type:1})).uid}function yu(e,t,n,r){const[i,s]=du(n);return s?[lu([e,s],t,r),i]:[vt(r),n]}function bu(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,()=>(Lr(n.summary),{uid:n.idGenerator(),obsidianLink:r,type:0}));return i.type=0,i.uid}function vu(e){const t=[];for(const n of e.getData())n.type===il.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function ku(e){return[...e.invalidLinks,...vu(e.defaultLinkTracker),...cu(e.blockLinkTracker)]}function Su(e,t,n){const r=ku(n).sort((a,o)=>a.link.localeCompare(o.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:vt(n),name:i,createdAt:t,editedAt:t,type:"node"};return tl(n.summary),s.children=r,s}function sl(e){return e===" "||e===" "}function pn(e,t,n=0){return sl(e[t])?pn(e,t+1,n+1):n}function Eu(e,t){let n=t,r=e[t];for(;sl(r);)n--,r=e[n];return n+1}function Kt(e,t,n=0){const r=e[t+n];return ns(r)?t+n:Kt(e,t,n+1)}function al(e,t){const n=e[t-1];return ns(n)}function ns(e){return e===void 0||e===` `}function ol(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function rs(e,t){let n=!0;const r=t+pn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ol(e,r));const a=Eu(e,r-1)-1,o=e[a];return ns(o)&&n?{type:Ut.BULLET,level:r-a-1}:null}function Du(e,t,n){let r=t+n.level;if(ol(e,r))return r;r+=1+1;const i=pn(e,r);return r+i}function Tu(e,t,n){let r=Kt(e,t+n.level+1+1),i=e[r];for(;;){const s=pn(e,r+1);if(s==n.level+2&&!rs(e,r+1+s))r=Kt(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Ou(e,t){return e+t.level}function Au(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=pn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function ll(e,t){if(!al(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=Kt(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],o=e[i+2];for(;[s,a,o].every(d=>d!==void 0)&&[s,a,o].join("")!=="```";)i++,s=e[i],a=e[i+1],o=e[i+2];if([s,a,o].some(d=>d===void 0))return null;const l=Kt(e,i+3);return e.slice(i+3,l).trim()!==""?null:{type:Ut.CODEBLOCK,level:l-t+(e[l]===` @@ -9,7 +9,7 @@ var uc=Object.defineProperty;var hc=(e,t,n)=>t in e?uc(e,t,{enumerable:!0,config `)continue;let[s,a,o]=Ia(e,r);for(s.content.trim()!==""&&n.push(s);o;){for(;e[a]===` `;)a++;[s,a,o]=Ia(e,a),s.content.trim()!==""&&n.push(s)}r=a-1}return n}function Ia(e,t){const n=Nu(e,t),r=Pu(e,t,n),[i,s]=Uu(e,t,n);return[{...n,content:e.slice(r,i).trimEnd()},i,s]}function Nu(e,t){let n=cl(e,t);return n||(n=rs(e,t),n||(n=ll(e,t),n)?n:{type:"Paragraph",level:0})}function Pu(e,t,n){switch(n.type){case"Heading":return Mu(e,t,n);case"Bullet Node":return Du(e,t,n);case"Paragraph":return t;case"Code Block":return t;default:throw"Unsupported HierarchyType detected: "+n}}function Uu(e,t,n){switch(n.type){case"Heading":return[Iu(e,t,n)];case"Bullet Node":return[Tu(e,t,n)];case"Paragraph":return Fu(e,t);case"Code Block":return[Ou(t,n)];default:throw"Unsupported HierarchyType detected: "+n}}function Yu(e,t){return e.type==="Root"||e.type==="Heading"&&t.type!=="Heading"?!0:e.type==="Paragraph"||t.type==="Paragraph"||e.type==="Code Block"||t.type==="Code Block"?!1:e.type===t.type?e.levelBu(i,t,n,r))))}function Bu(e,t,n,r){let i=e;r&&(i=ju(e));let s=t.get(i);return s===void 0&&(s=n(),t.set(i,s)),s}function Vu(e){return Array.from(e.entries()).map(t=>({name:t[0],uid:t[1]}))}function Gu(e){if(e.startsWith("[ ] "))return"todo";if(e.startsWith("[x] ")||e.startsWith("[X] "))return"done"}function Zu(e,t){if(t.type===Ut.BULLET){const n=Gu(e);if(n)return[e.slice(4),n]}return null}function qu(e){const t=[];let n=Fi(e,0);for(;n!==null;){let r;Array.isArray(n)?(t.push(n),r=n[2]):r=n,n=Fi(e,r)}return t}function Fi(e,t){let n,r="",i="";for(let s=t;s{const o=a[0],l=a[1];if(i.every(f=>o.trim()!==f.name||l.trim()!==f.mediaUrl)){const f=a[3],d=vt(n);e.name=e.name.replaceAll(f,"[["+d+"]]"),i.push({uid:d,name:o.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:l.trim()})}}),e.children=[...(s=e.children)!=null?s:[],...i]}function Ku(e,t,n){return{uid:vt(n),name:Au(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function Xu(e,t,n,r,i){var p;if(n.type===Ut.CODEBLOCK)return Ku(n,r,i);const[s,a]=yu(e,t,n.content,i),o={uid:s,name:a,createdAt:r,editedAt:r,type:"node"},[l,f]=(p=Zu(a,n))!=null?p:[a,void 0];o.name=l,o.todoState=f,o.name=o.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=Hu(o.name);if(d){const w=d[d.length-1];o.name.endsWith(w)&&(o.name=o.name.slice(0,-w.length)),o.supertags=dl(d,i.superTagTracker,i.idGenerator,!0)}const u=iu(o.name,!0).filter(w=>w.trim()!=="").map(w=>{const D=w.split("|"),h=D[0],c=D[1],m=gu(h,i),_=c!==void 0&&c.trim()!==""?"["+c.trim()+"]([["+m+"]])":"[["+m+"]]";return[w,m,_]});if(u.length>0){const w=new Set;o.refs||(o.refs=[]);for(const[D,h,c]of u)w.add(h),o.name=o.name.replaceAll("[["+D+"]]",c);o.refs.push(...Array.from(w.values()))}return $u(o,r,i),o}function Ju(e){if(e.startsWith(`--- +`)return n;if(!s&&l==="("){s=l;continue}if(s==="("&&l!==")"){a+=l;continue}if(s==="("&&l===")")return a.startsWith("http://")||a.startsWith("https://")?[n[0],fl(a),o+1,"[!["+n[0]+"]("+n[1]+")]("+a+")"]:n}}return n}function fl(e){return e.split(" ")[0].split(" ")[0]}function $u(e,t,n){var s;const r=qu(e.name);if(r.length===0)return;if(r.length===1){const a=r[0];e.type="image",e.mediaUrl=a[1].trim(),e.name=e.name.replace(a[3],a[0].trim());return}const i=[];r.forEach(a=>{const o=a[0],l=a[1];if(i.every(f=>o.trim()!==f.name||l.trim()!==f.mediaUrl)){const f=a[3],d=vt(n);e.name=e.name.replaceAll(f,"[["+d+"]]"),i.push({uid:d,name:o.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:l.trim()})}}),e.children=[...(s=e.children)!=null?s:[],...i]}function Ku(e,t,n){return{uid:vt(n),name:Au(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function Xu(e,t,n,r,i){var p;if(n.type===Ut.CODEBLOCK)return Ku(n,r,i);const[s,a]=yu(e,t,n.content,i),o={uid:s,name:a,createdAt:r,editedAt:r,type:"node"},[l,f]=(p=Zu(a,n))!=null?p:[a,void 0];o.name=l,o.todoState=f,o.name=o.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=Hu(o.name);if(d){const w=d[d.length-1];o.name.endsWith(w)&&(o.name=o.name.slice(0,-w.length)),o.supertags=dl(d,i.superTagTracker,i.idGenerator,!0)}const u=iu(o.name,!0).filter(w=>w.trim()!=="").map(w=>{const v=w.split("|"),h=v[0],c=v[1],m=gu(h,i),_=c!==void 0&&c.trim()!==""?"["+c.trim()+"]([["+m+"]])":"[["+m+"]]";return[w,m,_]});if(u.length>0){const w=new Set;o.refs||(o.refs=[]);for(const[v,h,c]of u)w.add(h),o.name=o.name.replaceAll("[["+v+"]]",c);o.refs.push(...Array.from(w.values()))}return $u(o,r,i),o}function Ju(e){if(e.startsWith(`--- `)){const t=e.indexOf(` --- `);if(t!==-1)return[Qu(e.slice(4,t)),t+5]}return null}function Qu(e){const t=e.split(` @@ -22,7 +22,7 @@ var ul;function L(){return ul.apply(null,arguments)}function e0(e){ul=e}function [`+s+"] ";for(a in arguments[0])te(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[s];r.push(i)}ml(e+` Arguments: `+Array.prototype.slice.call(r).join("")+` `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var La={};function pl(e,t){L.deprecationHandler!=null&&L.deprecationHandler(e,t),La[e]||(ml(t),La[e]=!0)}L.suppressDeprecationWarnings=!1;L.deprecationHandler=null;function ut(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function n0(e){var t,n;for(n in e)te(e,n)&&(t=e[n],ut(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Ci(e,t){var n=Lt({},e),r;for(r in t)te(t,r)&&(zt(e[r])&&zt(t[r])?(n[r]={},Lt(n[r],e[r]),Lt(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)te(e,r)&&!te(t,r)&&zt(e[r])&&(n[r]=Lt({},n[r]));return n}function os(e){e!=null&&this.set(e)}var Ni;Object.keys?Ni=Object.keys:Ni=function(e){var t,n=[];for(t in e)te(e,t)&&n.push(t);return n};var r0={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function i0(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return ut(r)?r.call(t,n):r}function dt(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var ls=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,fi={},fn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(fn[e]=i),t&&(fn[t[0]]=function(){return dt(i.apply(this,arguments),t[1],t[2])}),n&&(fn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function s0(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function a0(e){var t=e.match(ls),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var o0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function l0(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(ls).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var c0="Invalid date";function d0(){return this._invalidDate}var f0="%d",u0=/\d{1,2}/;function h0(e){return this._ordinal.replace("%d",e)}var m0={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function p0(e,t,n,r){var i=this._relativeTime[n];return ut(i)?i(e,t,n,r):i.replace(/%d/i,e)}function _0(e,t){var n=this._relativeTime[e>0?"future":"past"];return ut(n)?n(t):n.replace(/%s/i,t)}var Mn={};function Ae(e,t){var n=e.toLowerCase();Mn[n]=Mn[n+"s"]=Mn[t]=e}function Ke(e){return typeof e=="string"?Mn[e]||Mn[e.toLowerCase()]:void 0}function cs(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var wl={};function Re(e,t){wl[e]=t}function w0(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:wl[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Nr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function _n(e,t){return function(n){return n!=null?(gl(this,e,n),L.updateOffset(this,t),this):br(this,e)}}function br(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function gl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Nr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),jr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function g0(e){return e=Ke(e),ut(this[e])?this[e]():this}function x0(e,t){if(typeof e=="object"){e=cs(e);var n=w0(e),r,i=n.length;for(r=0;r68?1900:2e3)};var Ol=_n("FullYear",!0);function U0(){return Nr(this.year())}function Y0(e,t,n,r,i,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function Pn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Pn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Al(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),o=1+7*(t-1)+s+a,l,f;return o<=0?(l=e-1,f=In(l)+o):o>In(e)?(l=e+1,f=o-In(e)):(l=e,f=o),{year:l,dayOfYear:f}}function Un(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+bt(a,t,n)):i>bt(e.year(),t,n)?(s=i-bt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function bt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(In(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Ae("week","w");Ae("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Zn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function W0(e){return Un(e,this._week.dow,this._week.doy).week}var H0={dow:0,doy:6};function j0(){return this._week.dow}function B0(){return this._week.doy}function V0(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function G0(e){var t=Un(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Ae("day","d");Ae("weekday","e");Ae("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Zn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Zn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function Z0(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function q0(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function us(e,t){return e.slice(t,7).concat(e.slice(0,t))}var z0="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Rl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$0="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),K0=Gn,X0=Gn,J0=Gn;function Q0(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?us(n,this._week.dow):e?n[e.day()]:n}function eh(e){return e===!0?us(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function th(e){return e===!0?us(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function nh(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ft([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function rh(e,t,n){var r,i,s;if(this._weekdaysParseExact)return nh.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ft([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function ih(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=Z0(e,this.localeData()),this.add(e-t,"d")):t}function sh(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function ah(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=q0(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function oh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=K0),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function lh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=X0),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ch(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=J0),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function hs(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,o,l,f;for(s=0;s<7;s++)a=ft([2e3,1]).day(s),o=je(this.weekdaysMin(a,"")),l=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(o),n.push(l),r.push(f),i.push(o),i.push(l),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ms(){return this.hours()%12||12}function dh(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,ms);H("k",["kk",2],0,dh);H("hmm",0,0,function(){return""+ms.apply(this)+dt(this.minutes(),2)});H("hmmss",0,0,function(){return""+ms.apply(this)+dt(this.minutes(),2)+dt(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+dt(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+dt(this.minutes(),2)+dt(this.seconds(),2)});function Ml(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Ml("a",!0);Ml("A",!1);Ae("hour","h");Re("hour",13);function Il(e,t){return t._meridiemParse}C("a",Il);C("A",Il);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",bl);C("hmmss",vl);C("Hmm",bl);C("Hmmss",vl);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[gt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[gt]=$(e.substr(i))});function fh(e){return(e+"").toLowerCase().charAt(0)==="p"}var uh=/[ap]\.?m?\.?/i,hh=_n("Hours",!0);function mh(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Fl={calendar:r0,longDateFormat:o0,invalidDate:c0,ordinal:f0,dayOfMonthOrdinalParse:u0,relativeTime:m0,months:O0,monthsShort:kl,week:H0,weekdays:z0,weekdaysMin:$0,weekdaysShort:Rl,meridiemParse:uh},de={},Tn={},Yn;function ph(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=Br(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&ph(s,r)>=n-1)break;n--}t++}return Yn}function wh(e){return e.match("^[^/\\\\]*$")!=null}function Br(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&wh(e))try{t=Yn._abbr,n=require,n("./locale/"+e),Pt(t)}catch{de[e]=null}return de[e]}function Pt(e,t){var n;return e&&(Ce(t)?n=St(e):n=ps(e,t),n?Yn=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Yn._abbr}function ps(e,t){if(t!==null){var n,r=Fl;if(t.abbr=e,de[e]!=null)pl("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=Br(t.parentLocale),n!=null)r=n._config;else return Tn[t.parentLocale]||(Tn[t.parentLocale]=[]),Tn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new os(Ci(r,t)),Tn[e]&&Tn[e].forEach(function(i){ps(i.name,i.config)}),Pt(e),de[e]}else return delete de[e],null}function gh(e,t){if(t!=null){var n,r,i=Fl;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Ci(de[e]._config,t)):(r=Br(e),r!=null&&(i=r._config),t=Ci(i,t),r==null&&(t.abbr=e),n=new os(t),n.parentLocale=de[e],de[e]=n),Pt(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Pt()&&Pt(e)):de[e]!=null&&delete de[e]);return de[e]}function St(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Yn;if(!rt(e)){if(t=Br(e),t)return t;e=[e]}return _h(e)}function xh(){return Ni(de)}function _s(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[wt]<0||n[wt]>11?wt:n[ot]<1||n[ot]>jr(n[Oe],n[wt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[gt]!==0||n[qt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[gt]<0||n[gt]>59?gt:n[qt]<0||n[qt]>999?qt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=E0),z(e)._overflowWeekday&&t===-1&&(t=D0),z(e).overflow=t),e}var yh=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,bh=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vh=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ui=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],kh=/^\/?Date\((-?\d+)/i,Sh=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Eh={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Ll(e){var t,n,r=e._i,i=yh.exec(r)||bh.exec(r),s,a,o,l,f=ir.length,d=ui.length;if(i){for(z(e).iso=!0,t=0,n=f;tIn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Pn(a,0,e._dayOfYear),e._a[wt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[gt]===0&&e._a[qt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Pn:Y0).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function Fh(e){var t,n,r,i,s,a,o,l,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=sn(t.GG,e._a[Oe],Un(oe(),1,4).year),r=sn(t.W,1),i=sn(t.E,1),(i<1||i>7)&&(l=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Un(oe(),s,a),n=sn(t.gg,e._a[Oe],f.year),r=sn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>bt(n,s,a)?z(e)._overflowWeeks=!0:l!=null?z(e)._overflowWeekday=!0:(o=Al(n,r,i,s,a),e._a[Oe]=o.year,e._dayOfYear=o.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function gs(e){if(e._f===L.ISO_8601){Ll(e);return}if(e._f===L.RFC_2822){Cl(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,o=t.length,l=0,f,d;for(i=_l(e._f,e._locale).match(ls)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),l+=r.length),fn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),S0(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=o-l,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=Lh(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Oe]=e._locale.erasConvertYear(f,e._a[Oe])),ws(e),_s(e)}function Lh(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Ch(e){var t,n,r,i,s,a,o=!1,l=e._f.length;if(l===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Cr()});function Ul(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function n1(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return as(e,this),e=Nl(e),e._a?(t=e._isUTC?ft(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&qh(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function r1(){return this.isValid()?!this._isUTC:!1}function i1(){return this.isValid()?this._isUTC:!1}function Wl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var s1=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,a1=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:kt(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=s1.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[gt])*i,ms:$(Ui(r[qt]*1e3))*i}):(r=a1.exec(e))?(i=r[1]==="-"?-1:1,n={y:Gt(r[2],i),M:Gt(r[3],i),w:Gt(r[4],i),d:Gt(r[5],i),h:Gt(r[6],i),m:Gt(r[7],i),s:Gt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=o1(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Vr(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Vr.prototype;st.invalid=Zh;function Gt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Na(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function o1(e,t){var n;return e.isValid()&&t.isValid()?(t=ys(t,e),e.isBefore(t)?n=Na(e,t):(n=Na(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Hl(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(pl(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),jl(this,i,e),this}}function jl(e,t,n,r){var i=t._milliseconds,s=Ui(t._days),a=Ui(t._months);!e.isValid()||(r=r==null?!0:r,a&&El(e,br(e,"Month")+a*n),s&&gl(e,"Date",br(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var l1=Hl(1,"add"),c1=Hl(-1,"subtract");function Bl(e){return typeof e=="string"||e instanceof String}function d1(e){return it(e)||Bn(e)||Bl(e)||kt(e)||u1(e)||f1(e)||e===null||e===void 0}function f1(e){var t=zt(e)&&!is(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ut(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function D1(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function T1(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function O1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function A1(e){return this.from(oe(),e)}function R1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function M1(e){return this.to(oe(),e)}function Vl(e){var t;return e===void 0?this._locale._abbr:(t=St(e),t!=null&&(this._locale=t),this)}var Gl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Zl(){return this._locale}var Sr=1e3,un=60*Sr,Er=60*un,ql=(365*400+97)*24*Er;function hn(e,t){return(e%t+t)%t}function zl(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-ql:new Date(e,t,n).valueOf()}function $l(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-ql:Date.UTC(e,t,n)}function I1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?$l:zl,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hn(t+(this._isUTC?0:this.utcOffset()*un),Er);break;case"minute":t=this._d.valueOf(),t-=hn(t,un);break;case"second":t=this._d.valueOf(),t-=hn(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function F1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?$l:zl,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-hn(t+(this._isUTC?0:this.utcOffset()*un),Er)-1;break;case"minute":t=this._d.valueOf(),t+=un-hn(t,un)-1;break;case"second":t=this._d.valueOf(),t+=Sr-hn(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function L1(){return this._d.valueOf()-(this._offset||0)*6e4}function C1(){return Math.floor(this.valueOf()/1e3)}function N1(){return new Date(this.valueOf())}function P1(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function U1(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Y1(){return this.isValid()?this.toISOString():null}function W1(){return ss(this)}function H1(){return Lt({},z(this))}function j1(){return z(this).overflow}function B1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",bs);C("NN",bs);C("NNN",bs);C("NNNN",em);C("NNNNN",tm);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",wn);C("yy",wn);C("yyy",wn);C("yyyy",wn);C("yo",nm);ie(["y","yy","yyy","yyyy"],Oe);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Oe]=n._locale.eraYearOrdinalParse(e,i):t[Oe]=parseInt(e,10)});function V1(e,t){var n,r,i,s=this._eras||St("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function Z1(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function q1(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),cm.call(this,e,t,n,r,i))}function cm(e,t,n,r,i){var s=Al(e,t,n,r,i),a=Pn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Ae("quarter","Q");Re("quarter",7);C("Q",xl);ie("Q",function(e,t){t[wt]=($(e)-1)*3});function dm(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Ae("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var Xl=_n("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Ae("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Ur);C("DDDD",yl);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function fm(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Ae("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var um=_n("Minutes",!1);H("s",["ss",2],0,"second");Ae("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],gt);var hm=_n("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Ae("millisecond","ms");Re("millisecond",16);C("S",Ur,xl);C("SS",Ur,Be);C("SSS",Ur,yl);var Ct,Jl;for(Ct="SSSS";Ct.length<=9;Ct+="S")C(Ct,wn);function mm(e,t){t[qt]=$(("0."+e)*1e3)}for(Ct="S";Ct.length<=9;Ct+="S")ie(Ct,mm);Jl=_n("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function pm(){return this._isUTC?"UTC":""}function _m(){return this._isUTC?"Coordinated Universal Time":""}var M=Vn.prototype;M.add=l1;M.calendar=p1;M.clone=_1;M.diff=k1;M.endOf=F1;M.format=T1;M.from=O1;M.fromNow=A1;M.to=R1;M.toNow=M1;M.get=g0;M.invalidAt=j1;M.isAfter=w1;M.isBefore=g1;M.isBetween=x1;M.isSame=y1;M.isSameOrAfter=b1;M.isSameOrBefore=v1;M.isValid=W1;M.lang=Gl;M.locale=Vl;M.localeData=Zl;M.max=Wh;M.min=Yh;M.parsingFlags=H1;M.set=x0;M.startOf=I1;M.subtract=c1;M.toArray=P1;M.toObject=U1;M.toDate=N1;M.toISOString=E1;M.inspect=D1;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=Y1;M.toString=S1;M.unix=C1;M.valueOf=L1;M.creationData=B1;M.eraName=q1;M.eraNarrow=z1;M.eraAbbr=$1;M.eraYear=K1;M.year=Ol;M.isLeapYear=U0;M.weekYear=rm;M.isoWeekYear=im;M.quarter=M.quarters=dm;M.month=Dl;M.daysInMonth=C0;M.week=M.weeks=V0;M.isoWeek=M.isoWeeks=G0;M.weeksInYear=om;M.weeksInWeekYear=lm;M.isoWeeksInYear=sm;M.isoWeeksInISOWeekYear=am;M.date=Xl;M.day=M.days=ih;M.weekday=sh;M.isoWeekday=ah;M.dayOfYear=fm;M.hour=M.hours=hh;M.minute=M.minutes=um;M.second=M.seconds=hm;M.millisecond=M.milliseconds=Jl;M.utcOffset=$h;M.utc=Xh;M.local=Jh;M.parseZone=Qh;M.hasAlignedHourOffset=e1;M.isDST=t1;M.isLocal=r1;M.isUtcOffset=i1;M.isUtc=Wl;M.isUTC=Wl;M.zoneAbbr=pm;M.zoneName=_m;M.dates=$e("dates accessor is deprecated. Use date instead.",Xl);M.months=$e("months accessor is deprecated. Use month instead",Dl);M.years=$e("years accessor is deprecated. Use year instead",Ol);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Kh);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",n1);function wm(e){return oe(e*1e3)}function gm(){return oe.apply(null,arguments).parseZone()}function Ql(e){return e}var ne=os.prototype;ne.calendar=i0;ne.longDateFormat=l0;ne.invalidDate=d0;ne.ordinal=h0;ne.preparse=Ql;ne.postformat=Ql;ne.relativeTime=p0;ne.pastFuture=_0;ne.set=n0;ne.eras=V1;ne.erasParse=G1;ne.erasConvertYear=Z1;ne.erasAbbrRegex=J1;ne.erasNameRegex=X1;ne.erasNarrowRegex=Q1;ne.months=M0;ne.monthsShort=I0;ne.monthsParse=L0;ne.monthsRegex=P0;ne.monthsShortRegex=N0;ne.week=W0;ne.firstDayOfYear=B0;ne.firstDayOfWeek=j0;ne.weekdays=Q0;ne.weekdaysMin=th;ne.weekdaysShort=eh;ne.weekdaysParse=rh;ne.weekdaysRegex=oh;ne.weekdaysShortRegex=lh;ne.weekdaysMinRegex=ch;ne.isPM=fh;ne.meridiem=mh;function Dr(e,t,n,r){var i=St(),s=ft().set(r,t);return i[n](s,e)}function ec(e,t,n){if(kt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function ks(e,t,n,r){typeof e=="boolean"?(kt(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,kt(t)&&(n=t,t=void 0),t=t||"");var i=St(),s=e?i._week.dow:0,a,o=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)o[a]=Dr(t,(a+s)%7,r,"day");return o}function xm(e,t){return ec(e,t,"months")}function ym(e,t){return ec(e,t,"monthsShort")}function bm(e,t,n){return ks(e,t,n,"weekdays")}function vm(e,t,n){return ks(e,t,n,"weekdaysShort")}function km(e,t,n){return ks(e,t,n,"weekdaysMin")}Pt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Pt);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",St);var pt=Math.abs;function Sm(){var e=this._data;return this._milliseconds=pt(this._milliseconds),this._days=pt(this._days),this._months=pt(this._months),e.milliseconds=pt(e.milliseconds),e.seconds=pt(e.seconds),e.minutes=pt(e.minutes),e.hours=pt(e.hours),e.months=pt(e.months),e.years=pt(e.years),this}function tc(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Em(e,t){return tc(this,e,t,1)}function Dm(e,t){return tc(this,e,t,-1)}function Pa(e){return e<0?Math.floor(e):Math.ceil(e)}function Tm(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,o,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Pa(Wi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),l=Ze(nc(t)),n+=l,t-=Pa(Wi(l)),o=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=o,this}function nc(e){return e*4800/146097}function Wi(e){return e*146097/4800}function Om(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+nc(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Wi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Am(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Et(e){return function(){return this.as(e)}}var Rm=Et("ms"),Mm=Et("s"),Im=Et("m"),Fm=Et("h"),Lm=Et("d"),Cm=Et("w"),Nm=Et("M"),Pm=Et("Q"),Um=Et("y");function Ym(){return st(this)}function Wm(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Xt(e){return function(){return this.isValid()?this._data[e]:NaN}}var Hm=Xt("milliseconds"),jm=Xt("seconds"),Bm=Xt("minutes"),Vm=Xt("hours"),Gm=Xt("days"),Zm=Xt("months"),qm=Xt("years");function zm(){return Ze(this.days()/7)}var _t=Math.round,ln={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function $m(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function Km(e,t,n,r){var i=st(e).abs(),s=_t(i.as("s")),a=_t(i.as("m")),o=_t(i.as("h")),l=_t(i.as("d")),f=_t(i.as("M")),d=_t(i.as("w")),u=_t(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,$m.apply(null,p)}function Xm(e){return e===void 0?_t:typeof e=="function"?(_t=e,!0):!1}function Jm(e,t){return ln[e]===void 0?!1:t===void 0?ln[e]:(ln[e]=t,e==="s"&&(ln.ss=t-1),!0)}function Qm(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ln,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ln,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=Km(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var hi=Math.abs;function nn(e){return(e>0)-(e<0)||+e}function Zr(){if(!this.isValid())return this.localeData().invalidDate();var e=hi(this._milliseconds)/1e3,t=hi(this._days),n=hi(this._months),r,i,s,a,o=this.asSeconds(),l,f,d,u;return o?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",f=nn(this._months)!==nn(o)?"-":"",d=nn(this._days)!==nn(o)?"-":"",u=nn(this._milliseconds)!==nn(o)?"-":"",l+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Vr.prototype;X.isValid=Gh;X.abs=Sm;X.add=Em;X.subtract=Dm;X.as=Om;X.asMilliseconds=Rm;X.asSeconds=Mm;X.asMinutes=Im;X.asHours=Fm;X.asDays=Lm;X.asWeeks=Cm;X.asMonths=Nm;X.asQuarters=Pm;X.asYears=Um;X.valueOf=Am;X._bubble=Tm;X.clone=Ym;X.get=Wm;X.milliseconds=Hm;X.seconds=jm;X.minutes=Bm;X.hours=Vm;X.days=Gm;X.weeks=zm;X.months=Zm;X.years=qm;X.humanize=Qm;X.toISOString=Zr;X.toString=Zr;X.toJSON=Zr;X.locale=Vl;X.localeData=Zl;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zr);X.lang=Gl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Wr);C("X",b0);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js -L.version="2.29.4";e0(oe);L.fn=M;L.min=Hh;L.max=jh;L.now=Bh;L.utc=ft;L.unix=wm;L.months=xm;L.isDate=Bn;L.locale=Pt;L.invalid=Cr;L.duration=st;L.isMoment=it;L.weekdays=bm;L.parseZone=gm;L.localeData=St;L.isDuration=dr;L.monthsShort=ym;L.weekdaysMin=km;L.defineLocale=ps;L.updateLocale=gh;L.locales=xh;L.weekdaysShort=vm;L.normalizeUnits=Ke;L.relativeTimeRounding=Xm;L.relativeTimeThreshold=Jm;L.calendarFormat=m1;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function ep(e,t,n){let r;return e.values&&e.values.length>0&&(r=e.values.map(i=>({uid:vt(n),name:i,type:"node",createdAt:t,editedAt:t}))),tp(e.key,n.attributes),n.summary.fields++,{uid:vt(n),name:e.key,type:"field",createdAt:t,editedAt:t,children:r}}function tp(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function np(e,t,n,r,i=Date.now()){var p;const[s,a]=(p=Ju(n))!=null?p:[[],0];let o=Cu(n,a),l=e;const f=o[0]&&o[0].content.match(/^title::(.+)$/);f&&(l=f[1],o=o.slice(1)),o[0]&&o[0].content.replace(/^#+/,"").trim()===l.trim()&&(o=o.slice(1));const d=[],u=rp(l,t,i,r,s);return nl(u,{type:Ut.ROOT,level:-1},o,Yu,w=>Xu(e,t,w,i,r),(w,D)=>{D.type===Ut.HEADING&&d.push({...D,uid:w.uid})}),o=null,r.headingTracker.pathMap.set(t,d),r.headingTracker.nameMap.get(e)||r.headingTracker.nameMap.set(e,d),u}function rp(e,t,n,r,i){let s;const a=[];i.forEach(d=>{d.key==="tags"?s=dl(d.values,r.superTagTracker,r.idGenerator):a.push(ep(d,n,r))});let o=bu(e,t,r),l="node";const f=ip(e,r.dailyNoteFormat);return f&&(o=f,l="date",e=f,r.summary.calendarNodes++),{uid:o,name:e,createdAt:n,editedAt:n,type:l,supertags:s,children:a.length>0?a:void 0}}function ip(e,t){const n=L(e,t,!0);return n.isValid()?n.format("MM-DD-YYYY"):null}function Ua(e,t){return e===t.length-1?"LAST":"NOT_LAST"}function sp(e,t){return e.adapter.readDirectory(t).filter(n=>{const r=t+Fr+n.getName();return n.isDirectory()&&!r.endsWith(".github")&&!r.endsWith(".obsidian")||!n.isDirectory()&&r.endsWith(".md")}).sort((n,r)=>Number(n.isDirectory())-Number(r.isDirectory()))}async function rc(e,t,n,r,i,s="LAST"){n(t);const a=sp(e,t);for(let o=0;o{const i=Ir(r),s=vt(n);n.adapter.appendToResultFile(e,`{ +L.version="2.29.4";e0(oe);L.fn=M;L.min=Hh;L.max=jh;L.now=Bh;L.utc=ft;L.unix=wm;L.months=xm;L.isDate=Bn;L.locale=Pt;L.invalid=Cr;L.duration=st;L.isMoment=it;L.weekdays=bm;L.parseZone=gm;L.localeData=St;L.isDuration=dr;L.monthsShort=ym;L.weekdaysMin=km;L.defineLocale=ps;L.updateLocale=gh;L.locales=xh;L.weekdaysShort=vm;L.normalizeUnits=Ke;L.relativeTimeRounding=Xm;L.relativeTimeThreshold=Jm;L.calendarFormat=m1;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function ep(e,t,n){let r;return e.values&&e.values.length>0&&(r=e.values.map(i=>({uid:vt(n),name:i,type:"node",createdAt:t,editedAt:t}))),tp(e.key,n.attributes),n.summary.fields++,{uid:vt(n),name:e.key,type:"field",createdAt:t,editedAt:t,children:r}}function tp(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function np(e,t,n,r,i=Date.now()){var p;const[s,a]=(p=Ju(n))!=null?p:[[],0];let o=Cu(n,a),l=e;const f=o[0]&&o[0].content.match(/^title::(.+)$/);f&&(l=f[1],o=o.slice(1)),o[0]&&o[0].content.replace(/^#+/,"").trim()===l.trim()&&(o=o.slice(1));const d=[],u=rp(l,t,i,r,s);return nl(u,{type:Ut.ROOT,level:-1},o,Yu,w=>Xu(e,t,w,i,r),(w,v)=>{v.type===Ut.HEADING&&d.push({...v,uid:w.uid})}),o=null,r.headingTracker.pathMap.set(t,d),r.headingTracker.nameMap.get(e)||r.headingTracker.nameMap.set(e,d),u}function rp(e,t,n,r,i){let s;const a=[];i.forEach(d=>{d.key==="tags"?s=dl(d.values,r.superTagTracker,r.idGenerator):a.push(ep(d,n,r))});let o=bu(e,t,r),l="node";const f=ip(e,r.dailyNoteFormat);return f&&(o=f,l="date",e=f,r.summary.calendarNodes++),{uid:o,name:e,createdAt:n,editedAt:n,type:l,supertags:s,children:a.length>0?a:void 0}}function ip(e,t){const n=L(e,t,!0);return n.isValid()?n.format("MM-DD-YYYY"):null}function Ua(e,t){return e===t.length-1?"LAST":"NOT_LAST"}function sp(e,t){return e.adapter.readDirectory(t).filter(n=>{const r=t+Fr+n.getName();return n.isDirectory()&&!r.endsWith(".github")&&!r.endsWith(".obsidian")||!n.isDirectory()&&r.endsWith(".md")}).sort((n,r)=>Number(n.isDirectory())-Number(r.isDirectory()))}async function rc(e,t,n,r,i,s="LAST"){n(t);const a=sp(e,t);for(let o=0;o{const i=Ir(r),s=vt(n);n.adapter.appendToResultFile(e,`{ "uid": "${s}", "name": "${i}", "createdAt": ${t}, @@ -41,8 +41,8 @@ L.version="2.29.4";e0(oe);L.fn=M;L.min=Hh;L.max=jh;L.now=Bh;L.utc=ft;L.unix=wm;L `+JSON.stringify(e.attributes,null,2)),e.adapter.appendToResultFile(n,`, "summary": `+JSON.stringify(e.summary,null,2)),e.adapter.appendToResultFile(n,` -}`),e.adapter.flushResultsFromInitialProcessing(n),e.summary}async function dp(e){const t=await tu(e,"daily-notes",n=>n||{format:"YYYY-MM-DD"});e.dailyNoteFormat=t.format,console.log("Using daily notes format "+t.format+" for detecting calendar nodes.")}async function fp(e,t,n,r){const i=new nu(e),s=au(t,i,r);return cp(s,n).then(a=>[a,s,i])}const up=document.getElementById("vault-zip");up.addEventListener("change",async e=>{let t;try{const n=e.target.files[0],r=n.name.slice(0,n.name.indexOf(".zip"));t=document.createElement("b"),t.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(t);const[i,,s]=await fp(n,r,Date.now());document.body.removeChild(t);const a=document.createElement("b");a.innerHTML="Success!
",document.body.appendChild(a);const o=document.createElement("h2");o.innerText="Summary:",document.body.appendChild(o);const l=document.createElement("p");l.innerText=Object.entries(i).map(u=>u[0]+": "+u[1]).join(` -`),document.body.appendChild(l);const f=s.getResult(),d=document.createElement("button");d.innerText="Download TIF File",d.addEventListener("click",()=>{const u=URL.createObjectURL(new Blob([f])),p=document.createElement("a");p.style.display="none",p.href=u,p.download=r+".tif.json",document.body.appendChild(p),p.click(),URL.revokeObjectURL(u)}),document.body.appendChild(d)}catch(n){console.trace(n),t&&document.body.removeChild(t);const r=n.stack.toString();document.body.appendChild(document.createElement("br"));const i=document.createElement("b");if(i.innerText="An Error occured.",document.body.appendChild(i),r.toLowerCase().includes("readdirectory")){document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`It probably has to do with a not properly zipped vault. -Please check the text at the top again.`,document.body.appendChild(a)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const s=document.createElement("b");s.innerText=`Content of Error (please post in the Slack): +}`),e.adapter.flushResultsFromInitialProcessing(n),e.summary}async function dp(e){const t=await tu(e,"daily-notes",n=>n||{format:"YYYY-MM-DD"});e.dailyNoteFormat=t.format,console.log("Using daily notes format "+t.format+" for detecting calendar nodes.")}async function fp(e,t,n,r){const i=new nu(e),s=au(t,i,r);return cp(s,n).then(a=>[a,s,i])}const up=document.getElementById("vault-zip");up.addEventListener("change",async e=>{let t,n=0;try{const r=e.target.files[0],i=r.name.slice(0,r.name.indexOf(".zip"));t=document.createElement("b"),t.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(t);const s=setInterval(()=>n++,1e3),[a,,o]=await fp(r,i,Date.now());clearInterval(s),document.body.removeChild(t);const l=document.createElement("b");l.innerHTML="Success! And it only took "+n+" seconds.
",document.body.appendChild(l);const f=document.createElement("h2");f.innerText="Summary:",document.body.appendChild(f);const d=document.createElement("p");d.innerText=Object.entries(a).map(w=>w[0]+": "+w[1]).join(` +`),document.body.appendChild(d);const u=o.getResult(),p=document.createElement("button");p.innerText="Download TIF File",p.addEventListener("click",()=>{const w=URL.createObjectURL(new Blob([u])),v=document.createElement("a");v.style.display="none",v.href=w,v.download=i+".tif.json",document.body.appendChild(v),v.click(),URL.revokeObjectURL(w)}),document.body.appendChild(p)}catch(r){console.trace(r),t&&document.body.removeChild(t);const i=r.stack.toString();document.body.appendChild(document.createElement("br"));const s=document.createElement("b");if(s.innerText="An Error occured.",document.body.appendChild(s),i.toLowerCase().includes("readdirectory")){document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const o=document.createElement("b");o.innerText=`It probably has to do with a not properly zipped vault. +Please check the text at the top again.`,document.body.appendChild(o)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack): -`+r,document.body.appendChild(s)}}); +`+i,document.body.appendChild(a)}}); diff --git a/docs/index.html b/docs/index.html index 605b196..c25c41a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

From 0f380c08b1c2527116ce1cfe838459a78f85c935 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 17 Oct 2022 14:28:38 +0200 Subject: [PATCH 75/94] Obsidian: deploy sourcemaps to website --- docs/assets/index.17b16c1c.js | 1 + docs/assets/index.17b16c1c.js.map | 1 + vite.config.ts | 3 +++ 3 files changed, 5 insertions(+) create mode 100644 docs/assets/index.17b16c1c.js.map diff --git a/docs/assets/index.17b16c1c.js b/docs/assets/index.17b16c1c.js index 9aa994c..a76c04a 100644 --- a/docs/assets/index.17b16c1c.js +++ b/docs/assets/index.17b16c1c.js @@ -46,3 +46,4 @@ L.version="2.29.4";e0(oe);L.fn=M;L.min=Hh;L.max=jh;L.now=Bh;L.utc=ft;L.unix=wm;L Please check the text at the top again.`,document.body.appendChild(o)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack): `+i,document.body.appendChild(a)}}); +//# sourceMappingURL=index.17b16c1c.js.map diff --git a/docs/assets/index.17b16c1c.js.map b/docs/assets/index.17b16c1c.js.map new file mode 100644 index 0000000..84e17ac --- /dev/null +++ b/docs/assets/index.17b16c1c.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.17b16c1c.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: () => Data) {\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData();\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: () => Data) {\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData();\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(fileName, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(fileName, filePath, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n //20 secs!\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(obsidianLink, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n });\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(obsidianLink, filePath, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n });\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number, count = 0): number {\n //we count tab as one empty space\n if (!isEmptySpace(content[curPosition])) {\n return count;\n }\n return countEmptySpace(content, curPosition + 1, count + 1);\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number, count = 0): number {\n const curChar = content[curPosition + count];\n if (isNewLine(curChar)) {\n return curPosition + count;\n }\n return nextNewLine(content, curPosition, count + 1);\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: tags are too naive! ()\nexport function detectTags(content: string) {\n return content.match(tagRegex);\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { Hierarchy, HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchy: Hierarchy): [string, 'todo' | 'done'] | null {\n if (hierarchy.type === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags } from '../markdown/tags';\nimport { handleImages } from '../tanafeatures/imageNodes';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode, requestUidForLink } from '../links/internalLinks';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\n//30 sec\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n //1 sec\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const tanaNode: TanaIntermediateNode = {\n uid,\n name: content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n\n const [updatedContent, todoState] = removeTodo(content, obsidianNode) ?? [content, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tag without losing meaning because it will show up as a super tag anyways\n const lastTag = tags[tags.length - 1];\n if (tanaNode.name.endsWith(lastTag)) {\n tanaNode.name = tanaNode.name.slice(0, -lastTag.length);\n }\n\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n const foundUIDs = getBracketLinks(tanaNode.name, true)\n .filter((bracketLink) => bracketLink.trim() !== '')\n .map((bracketLink) => {\n //handling aliases\n const aliasArr = bracketLink.split('|');\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [bracketLink, foundUid, result];\n });\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n\n handleImages(tanaNode, today, context);\n\n return tanaNode;\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import { TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function frontMatterToFieldNode(\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n let children: TanaIntermediateNode[] | undefined;\n\n if (data.values && data.values.length > 0) {\n children = data.values.map((value) => ({\n uid: untrackedUidRequest(context),\n name: value,\n type: 'node',\n createdAt: today,\n editedAt: today,\n }));\n }\n addAttribute(data.key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: untrackedUidRequest(context),\n name: data.key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children,\n };\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport moment from 'moment';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n let nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeUid = dateDisplayName;\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n\nfunction dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return null;\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","dailyNoteFormat","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","cleanUpLink","detectLinkType","requestUidForLink","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","pos","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","detectTags","cleanUpTag","tag","superTagUidRequests","tags","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","tanaNode","image","childImageNodes","oldLink","convertCodeBlock","convertMarkdownNode","updatedContent","todoState","lastTag","foundUIDs","bracketLink","aliasArr","alias","foundUid","refSet","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","frontMatterToFieldNode","addAttribute","attributes","foundAttr","attr","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","displayName","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","dateStringToDateUID","moment","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAAU,YAAc,OAExBA,EAAU,YAAc,cACrBA,CACV,CACD,SAASN,EAAeD,EAAM,CAC1B,GAAIA,EAAK,GAEL,OACJA,EAAK,GAAK,GAEV,MAAMO,EAAYF,EAAaL,CAAI,EACnC,MAAMA,EAAK,KAAMO,CAAS,CAC7B,CACL,KCHA,MAAMC,GAAW,GACXC,GAAU,GACVC,GAAW,GAEXC,GAAe,GACfC,GAAW,IACXC,GAAWD,GAAW,EAAID,GAC1BG,GAAa,EAAID,GAAU,EAE3BE,GAAY,IAGZC,GAAc,EAGdC,GAAU,GAGVC,GAAY,GAGZC,GAAc,GAMdC,GAAW,EAAI,EAGfC,GAAwB,GAGxBC,GAAa,EACbC,GAAiB,EACjBC,GAAqB,E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AAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 6923897..1315322 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,4 +2,7 @@ import { defineConfig } from 'vite'; export default defineConfig({ base: '', + build: { + sourcemap: true, + }, }); From d3180b455582807d07cc6539fda839589d61ac8e Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 17 Oct 2022 15:18:22 +0200 Subject: [PATCH 76/94] Obsidian: replace recursive functions with loop to avoid overflow --- src/converters/obsidian/markdown/emptySpace.ts | 11 ++++++----- src/converters/obsidian/markdown/newline.ts | 10 +++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/converters/obsidian/markdown/emptySpace.ts b/src/converters/obsidian/markdown/emptySpace.ts index 38e5734..feee352 100644 --- a/src/converters/obsidian/markdown/emptySpace.ts +++ b/src/converters/obsidian/markdown/emptySpace.ts @@ -1,13 +1,14 @@ export function isEmptySpace(char: string) { + //we count tab as one empty space return char === ' ' || char === '\t'; } -export function countEmptySpace(content: string, curPosition: number, count = 0): number { - //we count tab as one empty space - if (!isEmptySpace(content[curPosition])) { - return count; +export function countEmptySpace(content: string, curPosition: number): number { + let count = 0; + while (isEmptySpace(content[curPosition + count])) { + count++; } - return countEmptySpace(content, curPosition + 1, count + 1); + return count; } /** diff --git a/src/converters/obsidian/markdown/newline.ts b/src/converters/obsidian/markdown/newline.ts index 0d53601..b5aa645 100644 --- a/src/converters/obsidian/markdown/newline.ts +++ b/src/converters/obsidian/markdown/newline.ts @@ -1,9 +1,9 @@ -export function nextNewLine(content: string, curPosition: number, count = 0): number { - const curChar = content[curPosition + count]; - if (isNewLine(curChar)) { - return curPosition + count; +export function nextNewLine(content: string, curPosition: number): number { + let count = 0; + while (!isNewLine(content[curPosition + count])) { + count++; } - return nextNewLine(content, curPosition, count + 1); + return curPosition + count; } export function lastPositionIsNewline(content: string, curPosition: number) { From d2e5695a692dc21bf9b29695a00cbf6a1f1ef25c Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 17 Oct 2022 15:18:44 +0200 Subject: [PATCH 77/94] Obsidian: replace recursive functions with loop to avoid overflow (2) --- .../{index.17b16c1c.js => index.3adbdeaf.js} | 14 +++++++------- ...index.17b16c1c.js.map => index.3adbdeaf.js.map} | 2 +- docs/index.html | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) rename docs/assets/{index.17b16c1c.js => index.3adbdeaf.js} (94%) rename docs/assets/{index.17b16c1c.js.map => index.3adbdeaf.js.map} (50%) diff --git a/docs/assets/index.17b16c1c.js b/docs/assets/index.3adbdeaf.js similarity index 94% rename from docs/assets/index.17b16c1c.js rename to docs/assets/index.3adbdeaf.js index a76c04a..ab98988 100644 --- a/docs/assets/index.17b16c1c.js +++ b/docs/assets/index.3adbdeaf.js @@ -1,9 +1,9 @@ -var uc=Object.defineProperty;var hc=(e,t,n)=>t in e?uc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var jt=(e,t,n)=>(hc(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const Fn=15,mi=30,pi=19,mc=29,ur=256,Hi=ur+1+mc,Ms=2*Hi+1,bn=256,pc=7,Is=16,Fs=17,Ls=18,$r=8*2,hr=-1,_c=1,qn=2,wc=0,rn=0,Cs=1,gc=3,Le=4,Qe=0,Ya=1,zn=2,et=-2,xc=-3,Qt=-5;function Tr(e){return Or(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function Or(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?Or(n):n),[])}const Ns=[0,1,2,3].concat(...Tr([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function se(){const e=this;function t(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,f=e.stat_desc.max_length;let d,u,p,w,v,h,c=0;for(w=0;w<=Fn;w++)i.bl_count[w]=0;for(s[i.heap[i.heap_max]*2+1]=0,d=i.heap_max+1;df&&(w=f,c++),s[u*2+1]=w,!(u>e.max_code)&&(i.bl_count[w]++,v=0,u>=l&&(v=o[u-l]),h=s[u*2],i.opt_len+=h*(w+v),a&&(i.static_len+=h*(a[u*2+1]+v)));if(c!==0){do{for(w=f-1;i.bl_count[w]===0;)w--;i.bl_count[w]--,i.bl_count[w+1]+=2,i.bl_count[f]--,c-=2}while(c>0);for(w=f;w!==0;w--)for(u=i.bl_count[w];u!==0;)p=i.heap[--d],!(p>e.max_code)&&(s[p*2+1]!=w&&(i.opt_len+=(w-s[p*2+1])*s[p*2],s[p*2+1]=w),u--)}}function n(i,s){let a=0;do a|=i&1,i>>>=1,a<<=1;while(--s>0);return a>>>1}function r(i,s,a){const o=[];let l=0,f,d,u;for(f=1;f<=Fn;f++)o[f]=l=l+a[f-1]<<1;for(d=0;d<=s;d++)u=i[d*2+1],u!==0&&(i[d*2]=n(o[u]++,u))}e.build_tree=function(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.elems;let l,f,d=-1,u;for(i.heap_len=0,i.heap_max=Ms,l=0;l=1;l--)i.pqdownheap(s,l);u=o;do l=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(s,1),f=i.heap[1],i.heap[--i.heap_max]=l,i.heap[--i.heap_max]=f,s[u*2]=s[l*2]+s[f*2],i.depth[u]=Math.max(i.depth[l],i.depth[f])+1,s[l*2+1]=s[f*2+1]=u,i.heap[1]=u++,i.pqdownheap(s,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],t(i),r(s,e.max_code,i.bl_count)}}se._length_code=[0,1,2,3,4,5,6,7].concat(...Tr([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));se.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];se.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];se.d_code=function(e){return e<256?Ns[e]:Ns[256+(e>>>7)]};se.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];se.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];se.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];se.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function De(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}const yc=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],bc=Tr([[144,8],[112,9],[24,7],[8,8]]);De.static_ltree=Or(yc.map((e,t)=>[e,bc[t]]));const vc=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],kc=Tr([[30,5]]);De.static_dtree=Or(vc.map((e,t)=>[e,kc[t]]));De.static_l_desc=new De(De.static_ltree,se.extra_lbits,ur+1,Hi,Fn);De.static_d_desc=new De(De.static_dtree,se.extra_dbits,0,mi,Fn);De.static_bl_desc=new De(null,se.extra_blbits,0,pi,pc);const Sc=9,Ec=8;function at(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const Wa=0,sr=1,Zt=2,Je=[new at(0,0,0,0,Wa),new at(4,4,8,4,sr),new at(4,5,16,8,sr),new at(4,6,32,32,sr),new at(4,4,16,16,Zt),new at(8,16,32,32,Zt),new at(8,16,128,128,Zt),new at(8,32,128,256,Zt),new at(32,128,258,1024,Zt),new at(32,258,258,4096,Zt)],$n=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ge=0,Kn=1,vn=2,Xn=3,Dc=32,Kr=42,Jn=113,kn=666,Xr=8,Tc=0,Jr=1,Oc=2,ce=3,ar=258,Ye=ar+ce+1;function Ps(e,t,n,r){const i=e[t*2],s=e[n*2];return i=3&&j[se.bl_order[T]*2+1]===0;T--);return e.opt_len+=3*(T+1)+5+5+4,T}function Ve(T){e.pending_buf[e.pending++]=T}function Tt(T){Ve(T&255),Ve(T>>>8&255)}function xn(T){Ve(T>>8&255),Ve(T&255&255)}function Ee(T,R){let A;const I=R;ge>$r-I?(A=T,ue|=A<>>$r-ge,ge+=I-$r):(ue|=T<=8&&(Ve(ue&255),ue>>>=8,ge-=8)}function sc(){Ee(Jr<<1,3),Ue(bn,De.static_ltree),Ss(),1+Se+10-ge<9&&(Ee(Jr<<1,3),Ue(bn,De.static_ltree),Ss()),Se=7}function yn(T,R){let A,I,P;if(e.dist_buf[V]=T,e.lc_buf[V]=R&255,V++,T===0?N[R*2]++:(Z++,T--,N[(se._length_code[R]+ur+1)*2]++,Y[se.d_code(T)*2]++),(V&8191)===0&&O>2){for(A=V*8,I=g-m,P=0;P>>=3,Z8?Tt(ue):ge>0&&Ve(ue&255),ue=0,ge=0}function ac(T,R,A){Ds(),Se=8,A&&(Tt(R),Tt(~R)),e.pending_buf.set(l.subarray(T,T+R),e.pending),e.pending+=R}function Ts(T,R,A){Ee((Tc<<1)+(A?1:0),3),ac(T,R,!0)}function oc(T,R,A){let I,P,G=0;O>0?(q.build_tree(e),we.build_tree(e),G=gn(),I=e.opt_len+3+7>>>3,P=e.static_len+3+7>>>3,P<=I&&(I=P)):I=P=R+5,R+4<=I&&T!=-1?Ts(T,R,A):P==I?(Ee((Jr<<1)+(A?1:0),3),Es(De.static_ltree,De.static_dtree)):(Ee((Oc<<1)+(A?1:0),3),ic(q.max_code+1,we.max_code+1,G+1),Es(N,Y)),Dt(),A&&Ds()}function Ot(T){oc(m>=0?m:-1,g-m,T),m=g,t.flush_pending()}function qr(){let T,R,A,I;do{if(I=f-x-g,I===0&&g===0&&x===0)I=s;else if(I==-1)I--;else if(g>=s+s-Ye){l.set(l.subarray(s,s+s),0),y-=s,g-=s,m-=s,T=w,A=T;do R=u[--A]&65535,u[A]=R>=s?R-s:0;while(--T!==0);T=s,A=T;do R=d[--A]&65535,d[A]=R>=s?R-s:0;while(--T!==0);I+=s}if(t.avail_in===0)return;T=t.read_buf(l,g+x,I),x+=T,x>=ce&&(p=l[g]&255,p=(p<r-5&&(R=r-5);;){if(x<=1){if(qr(),x===0&&T==rn)return Ge;if(x===0)break}if(g+=x,x=0,A=m+R,(g===0||g>=A)&&(x=g-A,g=A,Ot(!1),t.avail_out===0)||g-m>=s-Ye&&(Ot(!1),t.avail_out===0))return Ge}return Ot(T==Le),t.avail_out===0?T==Le?vn:Ge:T==Le?Xn:Kn}function Os(T){let R=S,A=g,I,P,G=D;const K=g>s-Ye?g-(s-Ye):0;let Me=B;const Xe=o,zr=g+ar;let As=l[A+G-1],Rs=l[A+G];D>=F&&(R>>=2),Me>x&&(Me=x);do if(I=T,!(l[I+G]!=Rs||l[I+G-1]!=As||l[I]!=l[A]||l[++I]!=l[A+1])){A+=2,I++;do;while(l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&AG){if(y=T,G=P,P>=Me)break;As=l[A+G-1],Rs=l[A+G]}}while((T=d[T&Xe]&65535)>K&&--R!==0);return G<=x?G:x}function cc(T){let R=0,A;for(;;){if(x=ce&&(p=(p<=ce)if(A=yn(g-y,_-ce),x-=_,_<=E&&x>=ce){_--;do g++,p=(p<=ce&&(p=(p<4096)&&(_=ce-1)),D>=ce&&_<=D){I=g+x-ce,A=yn(g-1-b,D-ce),x-=D-1,D-=2;do++g<=I&&(p=(p<Sc||I!=Xr||A<9||A>15||R<0||R>9||G<0||G>qn?et:(T.dstate=e,a=A,s=1<9||A<0||A>qn?et:(Je[O].func!=Je[R].func&&T.total_in!==0&&(I=T.deflate(Cs)),O!=R&&(O=R,E=Je[O].max_lazy,F=Je[O].good_length,B=Je[O].nice_length,S=Je[O].max_chain),U=A,I)},e.deflateSetDictionary=function(T,R,A){let I=A,P,G=0;if(!R||n!=Kr)return et;if(Is-Ye&&(I=s-Ye,G=A-I),l.set(R.subarray(G,G+I),0),g=I,m=I,p=l[0]&255,p=(p<Le||R<0)return et;if(!T.next_out||!T.next_in&&T.avail_in!==0||n==kn&&R!=Le)return T.msg=$n[zn-et],et;if(T.avail_out===0)return T.msg=$n[zn-Qt],Qt;if(t=T,G=i,i=R,n==Kr&&(I=Xr+(a-8<<4)<<8,P=(O-1&255)>>1,P>3&&(P=3),I|=P<<6,g!==0&&(I|=Dc),I+=31-I%31,n=Jn,xn(I)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,Qe}else if(t.avail_in===0&&R<=G&&R!=Le)return t.msg=$n[zn-Qt],Qt;if(n==kn&&t.avail_in!==0)return T.msg=$n[zn-Qt],Qt;if(t.avail_in!==0||x!==0||R!=rn&&n!=kn){switch(K=-1,Je[O].func){case Wa:K=lc(R);break;case sr:K=cc(R);break;case Zt:K=dc(R);break}if((K==vn||K==Xn)&&(n=kn),K==Ge||K==vn)return t.avail_out===0&&(i=-1),Qe;if(K==Kn){if(R==Cs)sc();else if(Ts(0,0,!1),R==gc)for(A=0;An&&(i=n),i===0?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Rc(e){const t=this,n=new Ha,r=Mc(e&&e.chunkSize?e.chunkSize:64*1024),i=rn,s=new Uint8Array(r);let a=e?e.level:hr;typeof a>"u"&&(a=hr),n.deflateInit(a),n.next_out=s,t.append=function(o,l){let f,d,u=0,p=0,w=0;const v=[];if(!!o.length){n.next_in_index=0,n.next_in=o,n.avail_in=o.length;do{if(n.next_out_index=0,n.avail_out=r,f=n.deflate(i),f!=Qe)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?v.push(new Uint8Array(s)):v.push(s.slice(0,n.next_out_index))),w+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=u&&(l(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return v.length>1?(d=new Uint8Array(w),v.forEach(function(h){d.set(h,p),p+=h.length})):d=v[0]||new Uint8Array,d}},t.flush=function(){let o,l,f=0,d=0;const u=[];do{if(n.next_out_index=0,n.avail_out=r,o=n.deflate(Le),o!=Ya&&o!=Qe)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&u.push(s.slice(0,n.next_out_index)),d+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),l=new Uint8Array(d),u.forEach(function(p){l.set(p,f),f+=p.length}),l}}function Mc(e){return e+5*(Math.floor(e/16383)+1)}const Ic=15,J=0,xt=1,Fc=2,Ne=-2,ae=-3,Us=-4,yt=-5,We=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ja=1440,Lc=0,Cc=4,Nc=9,Pc=5,Uc=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Yc=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Wc=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Hc=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],jc=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Bc=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],At=15;function _i(){const e=this;let t,n,r,i,s,a;function o(f,d,u,p,w,v,h,c,m,_,b){let k,g,y,x,D,S,E,O,U,F,B,N,Y,j,q;F=0,D=u;do r[f[d+F]]++,F++,D--;while(D!==0);if(r[0]==u)return h[0]=-1,c[0]=0,J;for(O=c[0],S=1;S<=At&&r[S]===0;S++);for(E=S,OD&&(O=D),c[0]=O,j=1<N+O;){if(x++,N+=O,q=y-N,q=q>O?O:q,(g=1<<(S=E-N))>k+1&&(g-=k+1,Y=E,Sja)return ae;s[x]=B=_[0],_[0]+=q,x!==0?(a[x]=D,i[0]=S,i[1]=O,S=D>>>N-O,i[2]=B-s[x-1]-S,m.set(i,(s[x-1]+S)*3)):h[0]=B}for(i[1]=E-N,F>=u?i[0]=128+64:b[F]>>N;S>>=1)D^=S;for(D^=S,U=(1<257?(_==ae?m.msg="oversubscribed distance tree":_==yt?(m.msg="incomplete distance tree",_=ae):_!=Us&&(m.msg="empty distance tree with lengths",_=ae),_):J)}}_i.inflate_trees_fixed=function(e,t,n,r){return e[0]=Nc,t[0]=Pc,n[0]=Uc,r[0]=Yc,J};const Qn=0,Ys=1,Ws=2,Hs=3,js=4,Bs=5,Vs=6,Qr=7,Gs=8,er=9;function Vc(){const e=this;let t,n=0,r,i=0,s=0,a=0,o=0,l=0,f=0,d=0,u,p=0,w,v=0;function h(c,m,_,b,k,g,y,x){let D,S,E,O,U,F,B,N,Y,j,q,we,W,he,V,Z;B=x.next_in_index,N=x.avail_in,U=y.bitb,F=y.bitk,Y=y.write,j=Y>=S[Z+1],F-=S[Z+1],y.win[Y++]=S[Z+2],j--;continue}do{if(U>>=S[Z+1],F-=S[Z+1],(O&16)!==0){for(O&=15,W=S[Z+2]+(U&We[O]),U>>=O,F-=O;F<15;)N--,U|=(x.read_byte(B++)&255)<>=S[Z+1],F-=S[Z+1],(O&16)!==0){for(O&=15;F>=O,F-=O,j-=W,Y>=he)V=Y-he,Y-V>0&&2>Y-V?(y.win[Y++]=y.win[V++],y.win[Y++]=y.win[V++],W-=2):(y.win.set(y.win.subarray(V,V+2),Y),Y+=2,V+=2,W-=2);else{V=Y-he;do V+=y.end;while(V<0);if(O=y.end-V,W>O){if(W-=O,Y-V>0&&O>Y-V)do y.win[Y++]=y.win[V++];while(--O!==0);else y.win.set(y.win.subarray(V,V+O),Y),Y+=O,V+=O,O=0;V=0}}if(Y-V>0&&W>Y-V)do y.win[Y++]=y.win[V++];while(--W!==0);else y.win.set(y.win.subarray(V,V+W),Y),Y+=W,V+=W,W=0;break}else if((O&64)===0)D+=S[Z+2],D+=U&We[O],Z=(E+D)*3,O=S[Z];else return x.msg="invalid distance code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae;while(!0);break}if((O&64)===0){if(D+=S[Z+2],D+=U&We[O],Z=(E+D)*3,(O=S[Z])===0){U>>=S[Z+1],F-=S[Z+1],y.win[Y++]=S[Z+2],j--;break}}else return(O&32)!==0?(W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,xt):(x.msg="invalid literal/length code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae)}while(!0)}while(j>=258&&N>=10);return W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,J}e.init=function(c,m,_,b,k,g){t=Qn,f=c,d=m,u=_,p=b,w=k,v=g,r=null},e.proc=function(c,m,_){let b,k,g,y=0,x=0,D=0,S,E,O,U;for(D=m.next_in_index,S=m.avail_in,y=c.bitb,x=c.bitk,E=c.write,O=E=258&&S>=10&&(c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,_=h(f,d,u,p,w,v,c,m),D=m.next_in_index,S=m.avail_in,y=c.bitb,x=c.bitk,E=c.write,O=E>>=r[k+1],x-=r[k+1],g=r[k],g===0){a=r[k+2],t=Vs;break}if((g&16)!==0){o=g&15,n=r[k+2],t=Ws;break}if((g&64)===0){s=g,i=k/3+r[k+2];break}if((g&32)!==0){t=Qr;break}return t=er,m.msg="invalid literal/length code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,c.inflate_flush(m,_);case Ws:for(b=o;x>=b,x-=b,s=d,r=w,i=v,t=Hs;case Hs:for(b=s;x>=r[k+1],x-=r[k+1],g=r[k],(g&16)!==0){o=g&15,l=r[k+2],t=js;break}if((g&64)===0){s=g,i=k/3+r[k+2];break}return t=er,m.msg="invalid distance code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,c.inflate_flush(m,_);case js:for(b=o;x>=b,x-=b,t=Bs;case Bs:for(U=E-l;U<0;)U+=c.end;for(;n!==0;){if(O===0&&(E==c.end&&c.read!==0&&(E=0,O=E7&&(x-=8,S++,D--),c.write=E,_=c.inflate_flush(m,_),E=c.write,O=Eh.avail_out&&(m=h.avail_out),m!==0&&c==yt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m,b==n.end&&(b=0,n.write==n.end&&(n.write=0),m=n.write-b,m>h.avail_out&&(m=h.avail_out),m!==0&&c==yt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m),h.next_out_index=_,n.read=b,c},n.proc=function(h,c){let m,_,b,k,g,y,x,D;for(k=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y>>1){case 0:_>>>=3,b-=3,m=b&7,_>>>=m,b-=m,r=ei;break;case 1:S=[],E=[],O=[[]],U=[[]],_i.inflate_trees_fixed(S,E,O,U),d.init(S[0],E[0],O[0],0,U[0],0),_>>>=3,b-=3,r=tr;break;case 2:_>>>=3,b-=3,r=zs;break;case 3:return _>>>=3,b-=3,r=Bt,h.msg="invalid block type",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c)}break;case ei:for(;b<32;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<>>16&65535)!=(_&65535))return r=Bt,h.msg="invalid stored block lengths",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);i=_&65535,_=b=0,r=i!==0?qs:u!==0?nr:en;break;case qs:if(g===0||x===0&&(y==n.end&&n.read!==0&&(y=0,x=yg&&(m=g),m>x&&(m=x),n.win.set(h.read_buf(k,m),y),k+=m,g-=m,y+=m,x-=m,(i-=m)!==0)break;r=u!==0?nr:en;break;case zs:for(;b<14;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<29||(m>>5&31)>29)return r=Bt,h.msg="too many length or distance symbols",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);if(m=258+(m&31)+(m>>5&31),!o||o.length>>=14,b-=14,a=0,r=$s;case $s:for(;a<4+(s>>>10);){for(;b<3;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<>>=3,b-=3}for(;a<19;)o[Zs[a++]]=0;if(l[0]=7,m=v.inflate_trees_bits(o,l,f,p,h),m!=J)return c=m,c==ae&&(o=null,r=Bt),n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);a=0,r=Ks;case Ks:for(;m=s,!(a>=258+(m&31)+(m>>5&31));){let j,q;for(m=l[0];b>>=m,b-=m,o[a++]=q;else{for(D=q==18?7:q-14,j=q==18?11:3;b>>=m,b-=m,j+=_&We[D],_>>>=D,b-=D,D=a,m=s,D+j>258+(m&31)+(m>>5&31)||q==16&&D<1)return o=null,r=Bt,h.msg="invalid bit length repeat",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);q=q==16?o[D-1]:0;do o[D++]=q;while(--j!==0);a=D}}if(f[0]=-1,F=[],B=[],N=[],Y=[],F[0]=9,B[0]=6,m=s,m=v.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),o,F,B,N,Y,p,h),m!=J)return m==ae&&(o=null,r=Bt),c=m,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);d.init(F[0],B[0],p,N[0],p,Y[0]),r=tr;case tr:if(n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,(c=d.proc(n,h,c))!=xt)return n.inflate_flush(h,c);if(c=J,d.free(h),k=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y15?(e.inflateEnd(n),Ne):(e.wbits=r,n.istate.blocks=new Gc(n,1<>4)+8>a.wbits){a.mode=Rt,n.msg="invalid win size",a.marker=5;break}a.mode=Js;case Js:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,s=n.read_byte(n.next_in_index++)&255,((a.method<<8)+s)%31!==0){a.mode=Rt,n.msg="incorrect header check",a.marker=5;break}if((s&Zc)===0){a.mode=Sn;break}a.mode=Qs;case Qs:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,a.mode=ea;case ea:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,a.mode=ta;case ta:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,a.mode=na;case na:return n.avail_in===0?i:(i=r,n.avail_in--,n.total_in++,a.need+=n.read_byte(n.next_in_index++)&255,a.mode=ti,Fc);case ti:return a.mode=Rt,n.msg="need dictionary",a.marker=0,Ne;case Sn:if(i=a.blocks.proc(n,i),i==ae){a.mode=Rt,a.marker=0;break}if(i==J&&(i=r),i!=xt)return i;i=r,a.blocks.reset(n,a.was),a.mode=ra;case ra:return n.avail_in=0,xt;case Rt:return ae;default:return Ne}},e.inflateSetDictionary=function(n,r,i){let s=0,a=i;if(!n||!n.istate||n.istate.mode!=ti)return Ne;const o=n.istate;return a>=1<0&&n.next_in_index!=p&&(l(n.next_in_index),p=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return f.length>1?(u=new Uint8Array(v),f.forEach(function(h){u.set(h,w),w+=h.length})):u=f[0]||new Uint8Array,u}},t.flush=function(){n.inflateEnd()}}const pe=4294967295,ke=65535,wi=8,Va=0,Ga=99,Za=67324752,ji=134695760,Jc=ji,gi=33639248,qa=101010256,xi=101075792,za=117853008,an=22,An=20,Rn=56,Qc=an+An+Rn,$a=1,Ka=39169,Xa=10,Ja=1,Bi=21589,ed=28789,td=25461,yi=1,nd=6,bi=8,vi=2048,ki=16,rd=20,ia=45,sa=51,or="/",aa=new Date(2107,11,31),oa=new Date(1980,0,1),fe=void 0,mr="undefined",Qa="function";class la{constructor(t){return class extends TransformStream{constructor(n,r){const i=new t(r);super({transform(s,a){a.enqueue(i.append(s))},flush(s){const a=i.flush();a&&s.enqueue(a)}})}}}}const id=64;let eo=2;try{typeof navigator!=mr&&navigator.hardwareConcurrency&&(eo=navigator.hardwareConcurrency)}catch{}const sd={chunkSize:512*1024,maxWorkers:eo,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:fe,CompressionStreamNative:typeof CompressionStream!=mr&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=mr&&DecompressionStream},Ft=Object.assign({},sd);function Vi(){return Ft}function to(e){return Math.max(e.chunkSize,id)}function Gi(e){const{baseURL:t,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:i,useCompressionStream:s,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:f,DecompressionStream:d,workerScripts:u}=e;if(Mt("baseURL",t),Mt("chunkSize",n),Mt("maxWorkers",r),Mt("terminateWorkerTimeout",i),Mt("useCompressionStream",s),Mt("useWebWorkers",a),o&&(Ft.CompressionStream=new la(o)),l&&(Ft.DecompressionStream=new la(l)),Mt("CompressionStream",f),Mt("DecompressionStream",d),u!==fe){const{deflate:p,inflate:w}=u;if((p||w)&&(Ft.workerScripts||(Ft.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");Ft.workerScripts.deflate=p}if(w){if(!Array.isArray(w))throw new Error("workerScripts.inflate must be an array");Ft.workerScripts.inflate=w}}}function Mt(e,t){t!==fe&&(Ft[e]=t)}const En={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin",cap:["cap","pcap"],"cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",javascript:"js",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":"odm","vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-debian-package":["deb","udeb"],"x-director":["dcr","dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-koan":["skp","skd","skt","skm"],"x-kpresenter":["kpr","kpt"],"x-kword":["kwd","kwt"],"x-latex":"latex","x-lha":"lha","x-lyx":"lyx","x-lzh":"lzh","x-lzx":"lzx","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-ms-wmd":"wmd","x-ms-wmz":"wmz","x-msdos-program":["com","exe","bat","dll"],"x-msi":"msi","x-netcdf":["nc","cdf"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":"rpm","x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tcl":"tcl","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-troff":["t","tr","roff"],"x-troff-man":"man","x-troff-me":"me","x-troff-ms":"ms","x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix",json:"json","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":"mathml",mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","x-msdownload":["exe","dll","com","bat","msi"],"x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tads":"gam","x-tex":"tex","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-compressed":"tgz","x-gzip":"gz","x-perfmon":["pma","pmc","pml","pmr","pmw"],"x-pkcs7-mime":["p7c","p7m"],"ynd.ms-pkipko":"pko"},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":["aif","aiff","aifc"],"x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2","x-wav":"wav",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":["mmd","mmod"],"x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":["sd","sdf"],"x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","mpc","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":["val","aso"],"x-pdb":["pdb","ent"],"x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-photoshop":"psd","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",pipeg:"jfif"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":["x3d","x3dz"],"x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:["tm","ts"],"tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{avif:".avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","vrml","wrl","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const t in En)if(En.hasOwnProperty(t)){for(const n in En[t])if(En[t].hasOwnProperty(n)){const r=En[t][n];if(typeof r=="string")e[r]=t+"/"+n;else for(let i=0;i>>1^3988292384:t=t>>>1;no[e]=t}class pr{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let r=0,i=t.length|0;r>>8^no[(n^t[r])&255];this.crc=n}get(){return~this.crc}}class ro extends TransformStream{constructor(){const t=new pr;super({transform(n){t.append(n)},flush(n){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t.get()),n.enqueue(r)}})}}function Si(e){if(typeof TextEncoder>"u"){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n0&&t&&(e[n-1]=Fe.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let a=0;a>>t),n=e[a]<<32-t;const i=e.length?e[e.length-1]:0,s=Fe.getPartial(i);return r.push(Fe.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},_r={bytes:{fromBits(e){const n=Fe.bitLength(e)/8,r=new Uint8Array(n);let i;for(let s=0;s>>24,i<<=8;return r},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let o=t.blockSize+r-(t.blockSize+r&t.blockSize-1);o<=i;o+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=Fe.concat(t,[Fe.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r},_S(e,t){return t<>>32-e},_block(e){const t=this,n=t._h,r=Array(80);for(let f=0;f<16;f++)r[f]=e[f];let i=n[0],s=n[1],a=n[2],o=n[3],l=n[4];for(let f=0;f<=79;f++){f>=16&&(r[f]=t._S(1,r[f-3]^r[f-8]^r[f-14]^r[f-16]));const d=t._S(5,i)+t._f(f,s,a,o)+l+r[f]+t._key[Math.floor(f/20)]|0;l=o,o=a,a=t._S(30,s),s=i,i=d}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+l|0}};const io={};io.aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,o,l=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;s<4*i+28;s++){let f=a[s-1];(s%i===0||i===8&&s%i===4)&&(f=n[f>>>24]<<24^n[f>>16&255]<<16^n[f>>8&255]<<8^n[f&255],s%i===0&&(f=f<<8^f>>>24^l<<24,l=l<<1^(l>>7)*283)),a[s]=a[s-i]^f}for(let f=0;s;f++,s--){const d=a[f&3?s:s-4];s<=4||f<4?o[f]=d:o[f]=r[0][n[d>>>24]]^r[1][n[d>>16&255]]^r[2][n[d>>8&255]]^r[3][n[d&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,o,l,f;for(let d=0;d<256;d++)s[(i[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let u=a^a<<1^a<<2^a<<3^a<<4;u=u>>8^u&255^99,n[d]=u,r[u]=d,f=i[l=i[o=i[d]]];let p=f*16843009^l*65537^o*257^d*16843008,w=i[u]*257^u*16843008;for(let v=0;v<4;v++)e[v][d]=w=w<<24^w>>>8,t[v][u]=p=p<<24^p>>>8}for(let d=0;d<5;d++)e[d]=e[d].slice(0),t[d]=t[d].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],l=s[2],f=s[3],d=s[4];let u=e[0]^n[0],p=e[t?3:1]^n[1],w=e[2]^n[2],v=e[t?1:3]^n[3],h=4,c,m,_;for(let b=0;b>>24]^o[p>>16&255]^l[w>>8&255]^f[v&255]^n[h],m=a[p>>>24]^o[w>>16&255]^l[v>>8&255]^f[u&255]^n[h+1],_=a[w>>>24]^o[v>>16&255]^l[u>>8&255]^f[p&255]^n[h+2],v=a[v>>>24]^o[u>>16&255]^l[p>>8&255]^f[w&255]^n[h+3],h+=4,u=c,p=m,w=_;for(let b=0;b<4;b++)i[t?3&-b:b]=d[u>>>24]<<24^d[p>>16&255]<<16^d[w>>8&255]<<8^d[v&255]^n[h++],c=u,u=p,p=w,w=v,v=c;return i}};const ad={getRandomValues(e){const t=new Uint32Array(e.buffer),n=r=>{let i=987654321;const s=4294967295;return function(){return i=36969*(i&65535)+(i>>16)&s,r=18e3*(r&65535)+(r>>16)&s,(((i<<16)+r&s)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r>24&255)===255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=Fe.bitLength(t);for(let s=0;s>5)+1<<2;let s,a,o,l,f;const d=new ArrayBuffer(i),u=new DataView(d);let p=0;const w=Fe;for(t=_r.bytes.toBits(t),f=1;p<(i||1);f++){for(s=a=e.encrypt(w.concat(t,[f])),o=1;oi&&(e=n.hash(e));for(let s=0;sthis.resolveReady=i),password:t,signed:n,strength:r-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;o?(await bd(a,l,o,qe(i,0,Ln[l]+2)),i=qe(i,Ln[l]+2),f()):await d;const u=new Uint8Array(i.length-It-(i.length-It)%on);s.enqueue(po(a,i,u,0,It,!0))},async flush(i){const{signed:s,ctr:a,hmac:o,pending:l,ready:f}=this;await f;const d=qe(l,0,l.length-It),u=qe(l,l.length-It);let p=new Uint8Array;if(d.length){const w=Nn(lt,d);o.update(w);const v=a.update(w);p=Cn(lt,v)}if(s){const w=qe(Cn(lt,o.digest()),0,It);for(let v=0;vthis.resolveReady=i),password:t,strength:n-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;let u=new Uint8Array;o?(u=await vd(a,l,o),f()):await d;const p=new Uint8Array(u.length+i.length-i.length%on);p.set(u,0),s.enqueue(po(a,i,p,u.length,0))},async flush(i){const{ctr:s,hmac:a,pending:o,ready:l}=this;await l;let f=new Uint8Array;if(o.length){const d=s.update(Nn(lt,o));a.update(d),f=Cn(lt,d)}r.signature=Cn(lt,a.digest()).slice(0,It),i.enqueue(qi(f,r.signature))}}),r=this}}function po(e,t,n,r,i,s){const{ctr:a,hmac:o,pending:l}=e,f=t.length-i;l.length&&(t=qi(l,t),n=Ed(n,f-f%on));let d;for(d=0;d<=f-on;d+=on){const u=Nn(lt,qe(t,d,d+on));s&&o.update(u);const p=a.update(u);s||o.update(p),n.set(Cn(lt,p),d+r)}return e.pending=qe(t,d),n}async function bd(e,t,n,r){const i=await _o(e,t,n,qe(r,0,Ln[t])),s=qe(r,Ln[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new Error(ao)}async function vd(e,t,n){const r=lo(new Uint8Array(Ln[t])),i=await _o(e,t,n,r);return qi(r,i)}async function _o(e,t,n,r){e.password=null;const i=Si(n),s=await kd(ld,i,fd,!1,ud),a=await Sd(Object.assign({salt:r},fo),s,8*(Dn[t]*2+2)),o=new Uint8Array(a),l=Nn(lt,qe(o,0,Dn[t])),f=Nn(lt,qe(o,Dn[t],Dn[t]*2)),d=qe(o,Dn[t]*2);return Object.assign(e,{keys:{key:l,authentication:f,passwordVerification:d},ctr:new wd(new _d(l),Array.from(hd)),hmac:new gd(f)}),d}function kd(e,t,n,r,i){return md?Hn.importKey(e,t,n,r,i):Wn.importKey(t)}async function Sd(e,t,n){return pd?await Hn.deriveBits(e,t,n):Wn.pbkdf2(t,e.salt,fo.iterations,n)}function qi(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Ed(e,t){if(t&&t>e.length){const n=e;e=new Uint8Array(t),e.set(n,0)}return e}function qe(e,t,n){return e.subarray(t,n)}function Cn(e,t){return e.fromBits(t)}function Nn(e,t){return e.toBits(t)}const cn=12;class Dd extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),wo(this,t)},transform(r,i){const s=this;if(s.password){const a=ca(s,r.subarray(0,cn));if(s.password=null,a[cn-1]!=s.passwordVerification)throw new Error(ao);r=r.subarray(cn)}i.enqueue(ca(s,r))}})}}class Td extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),wo(this,t)},transform(r,i){const s=this;let a,o;if(s.password){s.password=null;const l=lo(new Uint8Array(cn));l[cn-1]=s.passwordVerification,a=new Uint8Array(r.length+l.length),a.set(da(s,l),0),o=cn}else a=new Uint8Array(r.length),o=0;a.set(da(s,r),o),i.enqueue(a)}})}}function ca(e,t){const n=new Uint8Array(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function go(e){const t=e.keys[2]|2;return xo(Math.imul(t,t^1)>>>8)}function xo(e){return e&255}function fa(e){return e&4294967295}const ua="deflate-raw";class Od extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:r,CompressionStreamNative:i}){super({});const{compressed:s,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:f,level:d}=t,u=this;let p,w,v=yo(super.readable);(!a||l)&&f&&([v,p]=v.tee(),p=ct(p,new ro)),s&&(v=vo(v,o,{level:d,chunkSize:n},i,r)),a&&(l?v=ct(v,new Td(t)):(w=new yd(t),v=ct(v,w))),bo(u,v,async()=>{let h;a&&!l&&(h=w.signature),(!a||l)&&f&&(h=await p.getReader().read(),h=new DataView(h.value.buffer).getUint32(0)),u.signature=h})}}class Ad extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:r,DecompressionStreamNative:i}){super({});const{zipCrypto:s,encrypted:a,signed:o,signature:l,compressed:f,useCompressionStream:d}=t;let u,p,w=yo(super.readable);a&&(s?w=ct(w,new Dd(t)):(p=new xd(t),w=ct(w,p))),f&&(w=vo(w,d,{chunkSize:n},i,r)),(!a||s)&&o&&([w,u]=w.tee(),u=ct(u,new ro)),bo(this,w,async()=>{if((!a||s)&&o){const v=await u.getReader().read(),h=new DataView(v.value.buffer);if(l!=h.getUint32(0,!1))throw new Error(oo)}})}}function yo(e){return ct(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function bo(e,t,n){t=ct(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function vo(e,t,n,r,i){try{const s=t&&r?r:i;e=ct(e,new s(ua,n))}catch(s){if(t)e=ct(e,new i(ua,n));else throw s}return e}function ct(e,t){return e.pipeThrough(t)}const Rd="message",Md="start",Id="pull",ha="data",Fd="ack",Ld="close",ko="deflate",So="inflate";class Cd extends TransformStream{constructor(t,n){super({});const r=this,{codecType:i}=t;let s;i.startsWith(ko)?s=Od:i.startsWith(So)&&(s=Ad);let a=0;const o=new s(t,n),l=super.readable,f=new TransformStream({transform(d,u){d&&d.length&&(a+=d.length,u.enqueue(d))},flush(){const{signature:d}=o;Object.assign(r,{signature:d,size:a})}});Object.defineProperty(r,"readable",{get(){return l.pipeThrough(o).pipeThrough(f)}})}}const Nd=typeof Worker!=mr;class ni{constructor(t,{readable:n,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:f},d){const{signal:u}=a;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new Pd(n,a,s),{signal:u}),writable:r,options:Object.assign({},i),scripts:f,transferStreams:l,terminate(){const{worker:p,busy:w}=t;p&&!w&&(p.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,d(t)}}),(o&&Nd?Yd:Ud)(t,s)}}class Pd extends TransformStream{constructor(t,{onstart:n,onprogress:r,size:i,onend:s},{chunkSize:a}){let o=0;super({start(){n&&ri(n,i)},async transform(l,f){o+=l.length,r&&await ri(r,o,i),f.enqueue(l)},flush(){t.size=o,s&&ri(s,o)}},{highWaterMark:1,size:()=>a})}}async function ri(e,...t){try{await e(...t)}catch{}}function Ud(e,t){return{run:()=>Wd(e,t)}}function Yd(e,{baseURL:t,chunkSize:n}){return e.interface||Object.assign(e,{worker:Bd(e.scripts[0],t,e),interface:{run:()=>Hd(e,{chunkSize:n})}}),e.interface}async function Wd({options:e,readable:t,writable:n,onTaskFinished:r},i){const s=new Cd(e,i);try{await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,size:o}=s;return{signature:a,size:o}}finally{r()}}async function Hd(e,t){let n,r;const i=new Promise((p,w)=>{n=p,r=w});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});const{readable:s,options:a,scripts:o}=e,{writable:l,closed:f}=jd(e.writable);Ei({type:Md,scripts:o.slice(1),options:a,config:t,readable:s,writable:l},e)||Object.assign(e,{reader:s.getReader(),writer:l.getWriter()});const u=await i;try{await l.close()}catch{}return await f,u}function jd(e){const t=e.getWriter();let n;const r=new Promise(s=>n=s);return{writable:new WritableStream({async write(s){await t.ready,await t.write(s)},close(){t.releaseLock(),n()},abort(s){return t.abort(s)}}),closed:r}}let ma=!0,pa=!0;function Bd(e,t,n){const r={type:"module"};let i,s;typeof e==Qa&&(e=e());try{i=new URL(e,t)}catch{i=e}if(ma)try{s=new Worker(i)}catch{ma=!1,s=new Worker(i,r)}else s=new Worker(i,r);return s.addEventListener(Rd,a=>Vd(a,n)),s}function Ei(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:s,readable:a,writable:o}=e;const l=[];if(s){const{buffer:f,length:d}=s;d!=f.byteLength&&(s=new Uint8Array(s)),e.value=s.buffer,l.push(e.value)}if(i&&pa?(a&&l.push(a),o&&l.push(o)):e.readable=e.writable=null,l.length)try{return t.postMessage(e,l),!0}catch{pa=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(s){throw n&&n.releaseLock(),r(),s}}async function Vd({data:e},t){const{type:n,value:r,messageId:i,result:s,error:a}=e,{reader:o,writer:l,resolveResult:f,rejectResult:d,onTaskFinished:u}=t;try{if(a){const{message:w,stack:v,code:h,name:c}=a,m=new Error(w);Object.assign(m,{stack:v,code:h,name:c}),p(m)}else{if(n==Id){const{value:w,done:v}=await o.read();Ei({type:ha,value:w,done:v,messageId:i},t)}n==ha&&(await l.ready,await l.write(new Uint8Array(r)),Ei({type:Fd,messageId:i},t)),n==Ld&&p(null,s)}}catch(w){p(w)}function p(w,v){w?d(w):f(v),l&&l.releaseLock(),u()}}let Vt=[];const ii=[];let _a=0;async function Eo(e,t){const{options:n,config:r}=t,{transferStreams:i,useWebWorkers:s,useCompressionStream:a,codecType:o,compressed:l,signed:f,encrypted:d}=n,{workerScripts:u,maxWorkers:p,terminateWorkerTimeout:w}=r;t.transferStreams=i||i===fe;const v=!l&&!f&&!d&&!t.transferStreams;t.useWebWorkers=!v&&(s||s===fe&&r.useWebWorkers),t.scripts=t.useWebWorkers&&u?u[o]:[],n.useCompressionStream=a||a===fe&&r.useCompressionStream;let h;const c=Vt.find(_=>!_.busy);if(c)wa(c),h=new ni(c,e,t,m);else if(Vt.lengthii.push({resolve:_,stream:e,workerOptions:t}));return h.run();function m(_){if(ii.length){const[{resolve:b,stream:k,workerOptions:g}]=ii.splice(0,1);b(new ni(_,k,g,m))}else _.worker?(wa(_),Number.isFinite(w)&&w>=0&&(_.terminateTimeout=setTimeout(()=>{Vt=Vt.filter(b=>b!=_),_.terminate()},w))):Vt=Vt.filter(b=>b!=_)}}function wa(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function Gd(e){const t=()=>URL.createObjectURL(new Blob([`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:"PBKDF2"},B=t.assign({hash:{name:"HMAC"}},R),E=t.assign({iterations:1e3,hash:{name:"SHA-1"}},R),M=["deriveBits"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&"function"==typeof T.importKey,L=N&&W&&"function"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s("Invalid password")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s("Invalid signature")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey("raw",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s("Invalid password");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s("Invalid signature")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)("deflate-raw",n))}catch(r){if(!t)throw r;e=pe(e,new s("deflate-raw",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=le:s.startsWith("inflate")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:"pull",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:"data",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:"close",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&ke(e),"data"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe="oversubscribed dynamic bit lengths tree":-5!=a&&0!==r[0]||(f.Oe="incomplete dynamic bit lengths tree",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe="oversubscribed literal/length tree":-4!=h&&(w.Oe="incomplete literal/length tree",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe="oversubscribed distance tree":-5==h?(w.Oe="incomplete distance tree",h=-3):-4!=h&&(w.Oe="empty distance tree with lengths",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe="invalid distance code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe="invalid literal/length code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe="invalid literal/length code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe="invalid distance code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe="invalid block type",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe="invalid stored block lengths",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe="too many length or distance symbols",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe="invalid bit length repeat",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe="need dictionary",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye}; -`],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}const Do="HTTP error ",Rr="HTTP Range not supported",Zd="Writer iterator completed too soon",qd="text/plain",zd="Content-Length",$d="Content-Range",Kd="Accept-Ranges",Xd="Range",Jd="Content-Type",Qd="HEAD",$i="GET",To="bytes",ef=64*1024,Ki="writable";class Mr{constructor(){this.size=0}init(){this.initialized=!0}}class Yt extends Mr{get readable(){const t=this,{chunkSize:n=ef}=t,r=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:s=0,size:a,diskNumberStart:o}=r,{chunkOffset:l}=this;i.enqueue(await Ie(t,s+l,Math.min(n,a-l),o)),l+n>a?i.close():this.chunkOffset+=n}});return r}}class Oo extends Mr{constructor(){super();const t=this,n=new WritableStream({write(r){return t.writeUint8Array(r)}});Object.defineProperty(t,Ki,{get(){return n}})}writeUint8Array(){}}class Di extends Yt{constructor(t){super();let n=t.length;for(;t.charAt(n-1)=="=";)n--;const r=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:r,size:Math.floor((n-r)*.75)})}readUint8Array(t,n){const{dataStart:r,dataURI:i}=this,s=new Uint8Array(n),a=Math.floor(t/3)*4,o=atob(i.substring(a+r,Math.ceil((t+n)/3)*4+r)),l=t-Math.floor(a/4)*3;for(let f=l;f2?n.data+=btoa(i):n.pending=i}getData(){return this.data+btoa(this.pending)}}class mn extends Yt{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){const r=this;return new Uint8Array(await r.blob.slice(t,t+n).arrayBuffer())}}class $t extends Mr{constructor(t){super();const n=this,r=new TransformStream,i=[];t&&i.push([Jd,t]),Object.defineProperty(n,Ki,{get(){return r.writable}}),n.blob=new Response(r.readable,{headers:i}).blob()}getData(){return this.blob}}class Ao extends mn{constructor(t){super(new Blob([t],{type:qd}))}}class Ti extends $t{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:n}=this,r=await super.getData();if(r.text&&n)return r.text();{const i=new FileReader;return new Promise((s,a)=>{Object.assign(i,{onload:({target:o})=>s(o.result),onerror:()=>a(i.error)}),i.readAsText(r,t)})}}}class tf extends Yt{constructor(t,n){super(),Ro(this,t,n)}async init(){super.init(),await Mo(this,Oi,ga)}readUint8Array(t,n){return Io(this,t,n,Oi,ga)}}class nf extends Yt{constructor(t,n){super(),Ro(this,t,n)}async init(){super.init(),await Mo(this,Ai,xa)}readUint8Array(t,n){return Io(this,t,n,Ai,xa)}}function Ro(e,t,n){const{preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s}=n;n=Object.assign({},n),delete n.preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.useXHR,Object.assign(e,{url:t,options:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s})}async function Mo(e,t,n){const{url:r,useRangeHeader:i,forceRangeRequests:s}=e;if(sf(r)&&(i||s)){const{headers:a}=await t($i,e,Fo(e));if(!s&&a.get(Kd)!=To)throw new Error(Rr);{let o;const l=a.get($d);if(l){const f=l.trim().split(/\s*\/\s*/);if(f.length){const d=f[1];d&&d!="*"&&(o=Number(d))}}o===fe?await ya(e,t,n):e.size=o}}else await ya(e,t,n)}async function Io(e,t,n,r,i){const{data:s,useRangeHeader:a,forceRangeRequests:o,options:l}=e;if(a||o){const f=await r($i,e,Fo(e,t,n));if(f.status!=206)throw new Error(Rr);return new Uint8Array(await f.arrayBuffer())}else return s||await i(e,l),new Uint8Array(s.subarray(t,t+n))}function Fo(e,t=0,n=1){return Object.assign({},Xi(e),{[Xd]:To+"="+t+"-"+(t+n-1)})}function Xi({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function ga(e){await Lo(e,Oi)}async function xa(e){await Lo(e,Ai)}async function Lo(e,t){const n=await t($i,e,Xi(e));e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function ya(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t(Qd,e,Xi(e))).headers.get(zd);i?e.size=Number(i):await n(e,e.options)}}async function Oi(e,{options:t,url:n},r){const i=await fetch(n,Object.assign({},t,{method:e,headers:r}));if(i.status<400)return i;throw i.status==416?new Error(Rr):new Error(Do+(i.statusText||i.status))}function Ai(e,{url:t},n){return new Promise((r,i)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",()=>{if(s.status<400){const a=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(o=>{const l=o.trim().split(/\s*:\s*/);l[0]=l[0].trim().replace(/^[a-z]|-[a-z]/g,f=>f.toUpperCase()),a.push(l)}),r({status:s.status,arrayBuffer:()=>s.response,headers:new Map(a)})}else i(s.status==416?new Error(Rr):new Error(Do+(s.statusText||s.status)))},!1),s.addEventListener("error",a=>i(a.detail.error),!1),s.open(e,t),n)for(const a of Object.entries(n))s.setRequestHeader(a[0],a[1]);s.responseType="arraybuffer",s.send()})}class ba extends Yt{constructor(t,n={}){super(),Object.assign(this,{url:t,reader:n.useXHR?new nf(t,n):new tf(t,n)})}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(t,n){return this.reader.readUint8Array(t,n)}}class Ri extends Yt{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,n){return this.array.slice(t,t+n)}}class gr extends Oo{init(t=0){super.init(),Object.assign(this,{offset:0,array:new Uint8Array(t)})}writeUint8Array(t){const n=this;if(n.offset+t.length>n.array.length){const r=n.array;n.array=new Uint8Array(r.length+t.length),n.array.set(r)}n.array.set(t,n.offset),n.offset+=t.length}getData(){return this.array}}class rf extends Yt{constructor(t){super(),this.readers=t}async init(){super.init();const t=this,{readers:n}=t;t.lastDiskNumber=0,await Promise.all(n.map(async r=>{await r.init(),t.size+=r.size}))}async readUint8Array(t,n,r=0){const i=this,{readers:s}=this;let a,o=r;o==-1&&(o=s.length-1);let l=t;for(;l>=s[o].size;)l-=s[o].size,o++;const f=s[o],d=f.size;if(l+n<=d)a=await Ie(f,l,n);else{const u=d-l;a=new Uint8Array(n),a.set(await Ie(f,l,u)),a.set(await i.readUint8Array(t+u,n-u,r),u)}return i.lastDiskNumber=Math.max(o,i.lastDiskNumber),a}}class va extends Mr{constructor(t,n=4294967296){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,availableSize:n});let i,s,a;const o=new WritableStream({async write(d){if(a)if(i.size+d.length>=n){const u=n-i.size;await l(d.slice(0,u)),await f(),r.diskOffset+=i.size,r.diskNumber++,a=null,await this.write(d.slice(u))}else d.length&&await l(d),r.availableSize=n-i.size;else{const{value:u,done:p}=await t.next();if(p&&!u)throw new Error(Zd);i=u,i.size=0,s=u.writable,a=s.getWriter(),await this.write(d)}},async close(){await a.ready,await f()}});Object.defineProperty(r,Ki,{get(){return o}});async function l(d){await a.ready,await a.write(d),i.size+=d.length,r.size+=d.length}async function f(){s.size=i.size,await a.close()}}}function sf(e){const{baseURL:t}=Vi(),{protocol:n}=new URL(e,t);return n=="http:"||n=="https:"}async function ze(e,t){e.init&&!e.initialized&&await e.init(t)}function Ie(e,t,n,r){return e.readUint8Array(t,n,r)}const Co="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),af=Co.length==256;function of(e){if(af){let t="";for(let n=0;nthis[n]=t[n])}}const si="File format is not recognized",ff="End of central directory not found",uf="End of Zip64 central directory not found",hf="End of Zip64 central directory locator not found",mf="Central directory header not found",pf="Local file header not found",_f="Zip64 extra field not found",wf="File contains encrypted entry",gf="Encryption method not supported",ka="Compression method not supported",Sa="Split zip file",Ea="utf-8",Da="cp437",xf=[[Wo,pe],[Ho,pe],[jo,pe],[Ii,ke]],yf={[ke]:{getValue:_e,bytes:4},[pe]:{getValue:lr,bytes:8}};class bf{constructor(t,n={}){t instanceof ReadableStream&&(t={readable:t}),Object.assign(this,{reader:t,options:n,config:Vi()})}async*getEntriesGenerator(t={}){const n=this;let{reader:r}=n;const{config:i}=n;if(await ze(r),(r.size===fe||!r.readUint8Array)&&(Array.isArray(r)?r=new rf(r):r=new mn(await new Response(r.readable).blob()),await ze(r)),r.size=r.size)throw new Error(si);let _=0,b=await Ie(r,l,o,v),k=Te(b);if(o){const S=s.offset-o;if(_e(k,_)!=gi&&l!=S){const E=l;l=S,c=l-E,b=await Ie(r,l,o,v),k=Te(b)}}if(l<0||l>=r.size)throw new Error(si);const g=tt(n,t,"filenameEncoding"),y=tt(n,t,"commentEncoding");for(let S=0;SE.getData(ht,Wt,Ht),_=we;const{onprogress:Dt}=t;if(Dt)try{await Dt(S+1,h,new xr(E))}catch{}yield Wt}const x=tt(n,t,"extractPrependedData"),D=tt(n,t,"extractAppendedData");return x&&(n.prependedData=m>0?await Ie(r,0,m):new Uint8Array),n.comment=d?await Ie(r,f+an,d):new Uint8Array,D&&(n.appendedData=u>>8&255:p>>>24&255),signature:p,compressed:f!=0,encrypted:k,useWebWorkers:tt(i,r,"useWebWorkers"),useCompressionStream:tt(i,r,"useCompressionStream"),transferStreams:tt(i,r,"transferStreams")},config:d,streamOptions:{signal:E,size:D,onstart:O,onprogress:U,onend:F}};return S.size+=(await Eo({readable:x,writable:S},B)).size,tt(i,r,"preventClose")||await S.close(),t.getData?t.getData():S}}function zo(e,t,n){const r=e.rawBitFlag=be(t,n+2),i=(r&yi)==yi,s=_e(t,n+6);Object.assign(e,{encrypted:i,version:be(t,n),bitFlag:{level:(r&nd)>>1,dataDescriptor:(r&bi)==bi,languageEncodingFlag:(r&vi)==vi},rawLastModDate:s,lastModDate:Of(s),filenameLength:be(t,n+22),extraFieldLength:be(t,n+24)})}async function $o(e,t,n,r){const{rawExtraField:i}=t,s=t.extraField=new Map,a=Te(new Uint8Array(i));let o=0;try{for(;ot[i]==s);for(let i=0,s=0;i{if(e.data.length>=a+4){const f=_e(n,a);t[o]=e[o]=new Date(f*1e3);const d=s[l];e[d]=f}a+=4})}async function Tf(e,t,n,r,i){const s=new Uint8Array(4),a=Te(s);Af(a,0,t);const o=r+i;return await l(r)||await l(Math.min(o,n));async function l(f){const d=n-f,u=await Ie(e,d,f);for(let p=u.length-r;p>=0;p--)if(u[p]==s[0]&&u[p+1]==s[1]&&u[p+2]==s[2]&&u[p+3]==s[3])return{offset:d+p,buffer:u.slice(p,p+r).buffer}}}function tt(e,t,n){return t[n]===fe?e.options[n]:t[n]}function Of(e){const t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function ai(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function dn(e,t){return e.getUint8(t)}function be(e,t){return e.getUint16(t,!0)}function _e(e,t){return e.getUint32(t,!0)}function lr(e,t){return Number(e.getBigUint64(t,!0))}function Af(e,t,n){e.setUint32(t,n,!0)}function Te(e){return new DataView(e.buffer)}const Rf="File already exists",Mf="Zip file comment exceeds 64KB",If="File entry comment exceeds 64KB",Ff="File entry name exceeds 64KB",Oa="Version exceeds 65535",Lf="The strength must equal 1, 2, or 3",Cf="Extra field type exceeds 65535",Nf="Extra field data exceeds 64KB",ts="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Aa=new Uint8Array([7,0,2,0,65,69,3,0,0]),Ko=28;let oi=0;const Ra=[];class Pf{constructor(t,n={}){t.writable===fe&&typeof t.next==Qa&&(t=new va(t)),t instanceof WritableStream&&(t={writable:t}),t.writable.size===fe&&(t.writable.size=0);const r=t instanceof va;r||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0}),Object.assign(this,{writer:t,addSplitZipSignature:r,options:n,config:Vi(),files:new Map,filenames:new Set,offset:t.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set})}async add(t="",n,r={}){const i=this,{pendingAddFileCalls:s,config:a}=i;oiRa.push(l));let o;try{if(t=t.trim(),i.filenames.has(t))throw new Error(Rf);return i.filenames.add(t),o=Uf(i,t,n,r),s.add(o),await o}catch(l){throw i.filenames.delete(t),l}finally{s.delete(o);const l=Ra.shift();l?l():oi--}}async close(t=new Uint8Array,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:s}=i;for(;r.size;)await Promise.all(Array.from(r));return await Zf(this,t,n),!i.preventClose&&!n.preventClose&&await s.close(),i.getData?i.getData():s}}async function Uf(e,t,n,r){t=t.trim(),r.directory&&!t.endsWith(or)?t+=or:r.directory=t.endsWith(or);const i=Si(t);if(ee(i)>ke)throw new Error(Ff);const s=r.comment||"",a=Si(s);if(ee(a)>ke)throw new Error(If);const o=e.options.version||r.version||0;if(o>ke)throw new Error(Oa);const l=e.options.versionMadeBy||r.versionMadeBy||20;if(l>ke)throw new Error(Oa);const f=xe(e,r,Ji)||new Date,d=xe(e,r,Qi),u=xe(e,r,es),p=xe(e,r,"password"),w=xe(e,r,"encryptionStrength")||3,v=xe(e,r,"zipCrypto");if(p!==fe&&w!==fe&&(w<1||w>3))throw new Error(Lf);let h=new Uint8Array;const{extraField:c}=r;if(c){let he=0,V=0;c.forEach(Z=>he+=4+ee(Z)),h=new Uint8Array(he),c.forEach((Z,Se)=>{if(Se>ke)throw new Error(Cf);if(ee(Z)>ke)throw new Error(Nf);ve(h,new Uint16Array([Se]),V),ve(h,new Uint16Array([ee(Z)]),V+2),ve(h,Z,V+4),V+=4+ee(Z)})}let m=xe(e,r,"extendedTimestamp");m===fe&&(m=!0);let _=0,b=0,k=xe(e,r,"keepOrder");k===fe&&(k=!0);let g=0,y=xe(e,r,Zo);y===fe&&(y=!0);const x=xe(e,r,Vo)||0,D=xe(e,r,Go)||0;let S=xe(e,r,qo);n&&(n instanceof ReadableStream&&(n={readable:n}),await ze(n),n.size===fe?(r.dataDescriptor=!0,(S||S===fe)&&(S=!0,_=pe)):(g=n.size,_=zf(g)));const{diskOffset:E}=e.writer;if(e.offset+e.pendingEntriesSize-E>=pe||g>=pe||_>=pe){if(S===!1||!k)throw new Error(ts);S=!0}S=S||!1;const O=xe(e,r,"level"),U=xe(e,r,"useWebWorkers"),F=xe(e,r,"bufferedWrite");let B=xe(e,r,"dataDescriptor"),N=xe(e,r,"dataDescriptorSignature");const Y=xe(e,r,"signal"),j=xe(e,r,"useCompressionStream");B===fe&&(B=!0),B&&N===fe&&(N=!1),r=Object.assign({},r,{rawFilename:i,rawComment:a,version:o,versionMadeBy:l,lastModDate:f,lastAccessDate:d,creationDate:u,rawExtraField:h,zip64:S,password:p,level:O,useWebWorkers:U,encryptionStrength:w,extendedTimestamp:m,zipCrypto:v,bufferedWrite:F,keepOrder:k,dataDescriptor:B,dataDescriptorSignature:N,signal:Y,msDosCompatible:y,internalFileAttribute:x,externalFileAttribute:D,useCompressionStream:j});const q=Hf(r),we=jf(r);b=ee(q.localHeaderArray,we.dataDescriptorArray)+_,e.pendingEntriesSize+=b;let W;try{W=await Yf(e,t,n,{headerInfo:q,dataDescriptorInfo:we},r)}finally{e.pendingEntriesSize-=b}return Object.assign(W,{name:t,comment:s,extraField:c}),new xr(W)}async function Yf(e,t,n,r,i){const{files:s,writer:a}=e,{keepOrder:o,dataDescriptor:l,signal:f}=i,d=Array.from(s.values()).pop();let u={},p,w,v,h,c,m;s.set(t,u);try{let k;o&&(k=d&&d.lock,_()),i.bufferedWrite||e.lockWriter||!l?(m=new $t,m.writable.size=0,p=!0,await ze(a)):(m=a,e.lockWriter=Promise.resolve(),w=()=>delete e.lockWriter),await ze(m);const{writable:g,diskNumber:y}=a;let{diskOffset:x}=a;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const D=new Uint8Array(4),S=He(D);Q(S,0,ji),await Nt(g,D),e.offset+=4}if(p||await k,c=!0,u.diskNumberStart=y,u=await Wf(n,m,u,r,e.config,i),c=!1,s.set(t,u),u.filename=t,p){await m.writable.close();let D=await m.getData();await k,await b(),h=!0,l||(D=await Vf(u,D,g,i)),u.diskNumberStart=a.diskNumber,x=a.diskOffset,await D.stream().pipeTo(g,{preventClose:!0,signal:f}),g.size+=D.size,h=!1}if(u.offset=e.offset-x,u.zip64)Gf(u);else if(u.offset>=pe)throw new Error(ts);return e.offset+=u.length,u}catch(k){throw(p&&h||!p&&c)&&(e.hasCorruptedEntries=!0,k&&(k.corruptedEntry=!0),p?e.offset+=m.writable.size:e.offset=m.writable.size),s.delete(t),k}finally{v&&v(),w&&w()}function _(){u.lock=new Promise(k=>v=k)}async function b(){const{lockWriter:k}=e;if(k)return await k.then(()=>delete e.lockWriter),b();e.lockWriter=new Promise(g=>w=g)}}async function Wf(e,t,{diskNumberStart:n,lock:r},i,s,a){const{headerInfo:o,dataDescriptorInfo:l}=i,{localHeaderArray:f,headerArray:d,lastModDate:u,rawLastModDate:p,encrypted:w,compressed:v,version:h,compressionMethod:c,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b}=o,{dataDescriptorArray:k}=l,{rawFilename:g,lastAccessDate:y,creationDate:x,password:D,level:S,zip64:E,zipCrypto:O,dataDescriptor:U,directory:F,versionMadeBy:B,rawComment:N,rawExtraField:Y,useWebWorkers:j,onstart:q,onprogress:we,onend:W,signal:he,encryptionStrength:V,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,useCompressionStream:Wt}=a,Dt={lock:r,versionMadeBy:B,zip64:E,directory:Boolean(F),filenameUTF8:!0,rawFilename:g,commentUTF8:!0,rawComment:N,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b,rawExtraField:Y,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,diskNumberStart:n};let ht=0,Ht=0,gn;const{writable:Ve}=t;if(e){e.chunkSize=to(s),await Nt(Ve,f);const xn=e.readable,Ee=xn.size=e.size,Ue={options:{codecType:ko,level:S,password:D,encryptionStrength:V,zipCrypto:w&&O,passwordVerification:w&&O&&p>>8&255,signed:!0,compressed:v,encrypted:w,useWebWorkers:j,useCompressionStream:Wt,transferStreams:!1},config:s,streamOptions:{signal:he,size:Ee,onstart:q,onprogress:we,onend:W}},Jt=await Eo({readable:xn,writable:Ve},Ue);Ve.size+=Jt.size,gn=Jt.signature,Ht=e.size=xn.size,ht=Jt.size}else await Nt(Ve,f);const Tt=E?new Uint8Array(Ko+4):new Uint8Array;return e&&Bf({signature:gn,rawExtraFieldZip64:Tt,compressedSize:ht,uncompressedSize:Ht,headerInfo:o,dataDescriptorInfo:l},a),U&&await Nt(Ve,k),Object.assign(Dt,{compressedSize:ht,lastModDate:u,rawLastModDate:p,creationDate:x,lastAccessDate:y,encrypted:w,length:ee(f,k)+ht,compressionMethod:c,version:h,headerArray:d,signature:gn,rawExtraFieldZip64:Tt}),Dt}function Hf(e){const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,password:s,level:a,zip64:o,zipCrypto:l,dataDescriptor:f,directory:d,rawExtraField:u,encryptionStrength:p,extendedTimestamp:w}=e,v=a!==0&&!d,h=Boolean(s&&ee(s));let c;if(h&&!l){c=new Uint8Array(ee(Aa)+2);const N=He(c);re(N,0,Ka),ve(c,Aa,2),yr(N,8,p)}else c=new Uint8Array;let m,_;if(w){_=new Uint8Array(9+(r?4:0)+(i?4:0));const N=He(_);re(N,0,Bi),re(N,2,ee(_)-4);const Y=1+(r?2:0)+(i?4:0);yr(N,4,Y),Q(N,5,Math.floor(n.getTime()/1e3)),r&&Q(N,9,Math.floor(r.getTime()/1e3)),i&&Q(N,13,Math.floor(i.getTime()/1e3));try{m=new Uint8Array(36);const j=He(m),q=li(n);re(j,0,Xa),re(j,2,32),re(j,8,Ja),re(j,10,24),Pe(j,12,q),Pe(j,20,li(r)||q),Pe(j,28,li(i)||q)}catch{m=new Uint8Array}}else m=_=new Uint8Array;let b=vi;f&&(b=b|bi);let k=Va;v&&(k=wi);let g=e.version||rd;o&&(g=g>ia?g:ia),h&&(b=b|yi,l||(g=g>sa?g:sa,k=Ga,v&&(c[9]=wi)));const y=new Uint8Array(26),x=He(y);re(x,0,g),re(x,2,b),re(x,4,k);const D=new Uint32Array(1),S=He(D);let E;naa?E=aa:E=n,re(S,0,(E.getHours()<<6|E.getMinutes())<<5|E.getSeconds()/2),re(S,2,(E.getFullYear()-1980<<4|E.getMonth()+1)<<5|E.getDate());const O=D[0];Q(x,6,O),re(x,22,ee(t));const U=ee(c,_,m,u);re(x,24,U);const F=new Uint8Array(30+ee(t)+U),B=He(F);return Q(B,0,Za),ve(F,y,4),ve(F,t,30),ve(F,c,30+ee(t)),ve(F,_,30+ee(t,c)),ve(F,m,30+ee(t,c,_)),ve(F,u,30+ee(t,c,_,m)),{localHeaderArray:F,headerArray:y,headerView:x,lastModDate:n,rawLastModDate:O,encrypted:h,compressed:v,version:g,compressionMethod:k,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:m,rawExtraFieldAES:c}}function jf(e){const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i=new Uint8Array,s,a=0;return n&&(i=new Uint8Array(t?r?24:20:r?16:12),s=He(i),r&&(a=4,Q(s,0,Jc))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}}function Bf(e,t){const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:s,headerInfo:a,dataDescriptorInfo:o}=e,{headerView:l,encrypted:f}=a,{dataDescriptorView:d,dataDescriptorOffset:u}=o,{zip64:p,zipCrypto:w,dataDescriptor:v}=t;if((!f||w)&&n!==fe&&(Q(l,10,n),v&&Q(d,u,n)),p){const h=He(r);re(h,0,$a),re(h,2,Ko),Q(l,14,pe),Pe(h,12,BigInt(i)),Q(l,18,pe),Pe(h,4,BigInt(s)),v&&(Pe(d,u+4,BigInt(i)),Pe(d,u+12,BigInt(s)))}else Q(l,14,i),Q(l,18,s),v&&(Q(d,u+4,i),Q(d,u+8,s))}async function Vf(e,t,n,{zipCrypto:r}){const i=await qf(t,0,26),s=new DataView(i);return(!e.encrypted||r)&&Q(s,14,e.signature),e.zip64?(Q(s,18,pe),Q(s,22,pe)):(Q(s,18,e.compressedSize),Q(s,22,e.uncompressedSize)),await Nt(n,new Uint8Array(i)),t.slice(i.byteLength)}function Gf(e){const{rawExtraFieldZip64:t,offset:n,diskNumberStart:r}=e,i=He(t);Pe(i,20,BigInt(n)),Q(i,28,r)}async function Zf(e,t,n){const{files:r,writer:i}=e;let s=0,a=0;const{diskOffset:o,writable:l}=i;let{diskNumber:f}=i,d=e.offset-o,u=r.size;for(const[,{rawFilename:k,rawExtraFieldZip64:g,rawExtraFieldAES:y,rawExtraField:x,rawComment:D,rawExtraFieldExtendedTimestamp:S,rawExtraFieldNTFS:E}]of r)a+=46+ee(k,D,g,y,S,E,x);let p=n.zip64||e.options.zip64||!1;if(d>=pe||a>=pe||u>=ke){if(n.zip64===!1||e.options.zip64===!1)throw new Error(ts);p=!0}const w=new Uint8Array(a),v=He(w);for(const[k,g]of Array.from(r.values()).entries()){const{offset:y,rawFilename:x,rawExtraFieldZip64:D,rawExtraFieldAES:S,rawExtraFieldNTFS:E,rawExtraField:O,rawComment:U,versionMadeBy:F,headerArray:B,directory:N,zip64:Y,msDosCompatible:j,internalFileAttribute:q,externalFileAttribute:we,extendedTimestamp:W,lastModDate:he,diskNumberStart:V}=g;let Z;if(W){Z=new Uint8Array(9);const ue=He(Z);re(ue,0,Bi),re(ue,2,ee(Z)-4),yr(ue,4,1),Q(ue,5,Math.floor(he.getTime()/1e3))}else Z=new Uint8Array;const Se=ee(D,S,Z,E,O);if(Q(v,s,gi),re(v,s+4,F),ve(w,B,s+6),re(v,s+30,Se),re(v,s+32,ee(U)),re(v,s+34,Y?ke:V),re(v,s+36,q),we?Q(v,s+38,we):N&&j&&yr(v,s+38,ki),Q(v,s+42,Y?pe:y),ve(w,x,s+46),ve(w,D,s+46+ee(x)),ve(w,S,s+46+ee(x,D)),ve(w,Z,s+46+ee(x,D,S)),ve(w,E,s+46+ee(x,D,S,Z)),ve(w,O,s+46+ee(x,D,S,Z,E)),ve(w,U,s+46+ee(x)+Se),s+=46+ee(x,U)+Se,n.onprogress)try{await n.onprogress(k+1,r.size,new xr(g))}catch{}}await ze(i),await Nt(l,w);const h=new Uint8Array(p?Qc:an),c=He(h);let m=i.diskNumber;const{availableSize:_}=i;_n&&(t+=n.length)),t}class Xo{constructor(t,n,r,i){const s=this;if(t.root&&i&&i.getChildByName(n))throw new Error("Entry filename already exists");r||(r={}),Object.assign(s,{fs:t,name:n,data:r.data,id:t.entries.length,parent:i,children:[],uncompressedSize:0}),t.entries.push(s),i&&s.parent.children.push(s)}moveTo(t){const n=this;n.fs.move(n,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){const n=this;let r=n.name,i=n.parent;for(;i&&i!=t;)r=(i.name?i.name+"/":"")+r,i=i.parent;return r}isDescendantOf(t){let n=this.parent;for(;n&&n.id!=t.id;)n=n.parent;return Boolean(n)}}class Jo extends Xo{constructor(t,n,r,i){super(t,n,r,i);const s=this;s.Reader=r.Reader,s.Writer=r.Writer,r.getData&&(s.getData=r.getData)}async getData(t,n={}){const r=this;if(!t||t.constructor==r.Writer&&r.data)return r.data;{const i=r.reader=new r.Reader(r.data,n);await Promise.all([ze(i),ze(t,r.data.uncompressedSize)]);const s=i.readable;return s.size=r.uncompressedSize=i.size,await s.pipeTo(t.writable),t.getData?t.getData():t.writable}}getText(t,n){return this.getData(new Ti(t),n)}getBlob(t,n){return this.getData(new $t(t),n)}getData64URI(t,n){return this.getData(new wr(t),n)}getUint8Array(t){return this.getData(new gr,t)}getWritable(t=new WritableStream,n){return this.getData({writable:t},n)}replaceBlob(t){Object.assign(this,{data:t,Reader:mn,Writer:$t,reader:null})}replaceText(t){Object.assign(this,{data:t,Reader:Ao,Writer:Ti,reader:null})}replaceData64URI(t){Object.assign(this,{data:t,Reader:Di,Writer:wr,reader:null})}replaceUint8Array(t){Object.assign(this,{data:t,Reader:Ri,Writer:gr,reader:null})}replaceReadable(t){Object.assign(this,{data:null,Reader:function(){return{readable:t}},Writer:null,reader:null})}}class jn extends Xo{constructor(t,n,r,i){super(t,n,r,i),this.directory=!0}addDirectory(t){return mt(this,t,null,!0)}addText(t,n){return mt(this,t,{data:n,Reader:Ao,Writer:Ti})}addBlob(t,n){return mt(this,t,{data:n,Reader:mn,Writer:$t})}addData64URI(t,n){return mt(this,t,{data:n,Reader:Di,Writer:wr})}addUint8Array(t,n){return mt(this,t,{data:n,Reader:Ri,Writer:gr})}addHttpContent(t,n,r={}){return mt(this,t,{data:n,Reader:class extends ba{constructor(i){super(i,r)}}})}addReadable(t,n){return mt(this,t,{Reader:function(){return{readable:n}}})}addFileSystemEntry(t){return eu(this,t)}addData(t,n){return mt(this,t,n)}async importBlob(t,n={}){await this.importZip(new mn(t),n)}async importData64URI(t,n={}){await this.importZip(new Di(t),n)}async importUint8Array(t,n={}){await this.importZip(new Ri(t),n)}async importHttpContent(t,n={}){await this.importZip(new ba(t,n),n)}async importReadable(t,n={}){await this.importZip({readable:t},n)}exportBlob(t={}){return this.exportZip(new $t("application/zip"),t)}exportData64URI(t={}){return this.exportZip(new wr("application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new gr,t)}async exportWritable(t=new WritableStream,n={}){return await this.exportZip({writable:t},n),t}async importZip(t,n){await ze(t),(await new bf(t,n).getEntries()).forEach(s=>{let a=this;const o=s.filename.split("/"),l=o.pop();o.forEach(f=>a=a.getChildByName(f)||new jn(this.fs,f,null,a)),s.directory||mt(a,l,{data:s,Reader:Jf(Object.assign({},n))})})}async exportZip(t,n){const r=this;await Promise.all([Qo(r),ze(t)]);const i=new Pf(t,n);return await Qf(i,r,Xf([r],"uncompressedSize"),n),await i.close(),t.getData?t.getData():t.writable}getChildByName(t){const n=this.children;for(let r=0;r{n.id==e.id&&t.splice(r,1)})}async function Qf(e,t,n,r){const i=t,s=new Map;await a(e,t);async function a(o,l){await f();async function f(){if(r.bufferedWrite)await Promise.all(l.children.map(d));else for(const u of l.children)await d(u)}async function d(u){const p=r.relativePath?u.getRelativeName(i):u.getFullname();await o.add(p,u.reader,Object.assign({directory:u.directory},Object.assign({},r,{onprogress:async w=>{if(r.onprogress){s.set(p,w);try{await r.onprogress(Array.from(s.values()).reduce((v,h)=>v+h),n)}catch{}}}}))),await a(o,u)}}}async function eu(e,t){if(t.isDirectory){const i=e.addDirectory(t.name);return await n(i,t),i}else return new Promise((i,s)=>t.file(a=>i(e.addBlob(t.name,a)),s));async function n(i,s){const a=await r(s);for(const o of a)o.isDirectory?await n(i.addDirectory(o.name),o):await new Promise((l,f)=>{o.file(d=>{const u=i.addBlob(o.name,d);u.uncompressedSize=d.size,l(u)},f)})}function r(i){return new Promise((s,a)=>{let o=[];i.isDirectory&&l(i.createReader()),i.isFile&&s(o);function l(f){f.readEntries(d=>{d.length?(o=o.concat(d),l(f)):s(o)},a)}})}}function tn(e){e.entries=[],e.root=new jn(e)}function mt(e,t,n,r){if(e.directory)return r?new jn(e.fs,t,n,e):new Jo(e.fs,t,n,e);throw new Error("Parent entry is not a directory")}let el;try{el=import.meta.url}catch{}Gi({baseURL:el});Gd(Gi);Gi({Deflate:Rc,Inflate:Xc});function Ir(e){return e.slice(e.lastIndexOf(Fr)+1)}const Fr="/";async function tu(e,t,n){const r=e.vaultPath+"/.obsidian/"+t+".json";let i;return e.adapter.exists(r)&&(i=JSON.parse(await e.adapter.readFile(r))),n(i)}class nu{constructor(t){jt(this,"zipFS");jt(this,"chunks",[]);jt(this,"chunkIndex",0);this.zipBlob=t}async initReadingVault(){this.zipFS=new Kf.FS,await this.zipFS.importBlob(this.zipBlob)}readDirectory(t){return this.zipFS.find(t).children.map(r=>({isDirectory:()=>!!r.directory,getName:()=>r.getFullname()}))}readFile(t){return this.zipFS.find(t).getText("utf-8")}exists(t){return!!this.zipFS.find(t)}resolve(t){return t}resolveInDir(t,n){return t+Fr+n}removeFile(t){}renameFile(t,n){}flushResultsFromInitialProcessing(t){}appendToResultFile(t,n){this.chunks.push(n)}appendToPostProcessingFile(t,n){this.chunks[this.chunkIndex]=n,this.chunkIndex++}initPostProcessingResultFile(t){}chunkIter(){const t=this.chunks;let n=0;return{[Symbol.asyncIterator](){return{async next(){if(n{if(s.forEach((o,l)=>s[l]+=a),r==="seenOne"&&a!=="["&&(r="normal"),r==="seenOneOut"&&a!=="]"&&(r="normal"),a==="["&&(i+=1,r==="seenOne"?(s.push(""),r="normal"):r==="normal"&&(r="seenOne")),a==="]"&&i>0){if(i-=1,r==="seenOneOut"){const o=s.pop();o&&(!t||s.length===0)&&n.push(o.slice(0,-2)),r="normal"}else r==="normal"&&(r="seenOneOut");i===0&&(r="normal")}}),n}function su(e){return Ir(e)!==e}class ci{constructor(){jt(this,"nameWasCalledAsFile",[]);jt(this,"pathMap",new Map);jt(this,"nameMap",new Map)}accessAsFile(t,n,r){const i=this.pathMap.get(n);if(i)return this.nameMap.get(t)||this.nameMap.set(t,i),i;const s=this.nameMap.get(t);if(s&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,s),this.nameWasCalledAsFile.push(t),s;const a=r();return this.pathMap.set(n,a),this.nameMap.get(t)||this.nameMap.set(t,a),this.nameWasCalledAsFile.push(t),a}accessAsLink(t,n){const r=this.findData(t);if(r)return r;const i=su(t),s=n();return i?this.pathMap.set(t,s):this.nameMap.set(t,s),s}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Lr(e){e.totalNodes++,e.leafNodes++}function tl(e){e.leafNodes--,e.topLevelNodes++}function au(e,t,n=ru,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new ci,headingTracker:new ci,dummyHeadingLinkTracker:new Map,blockLinkTracker:new ci,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function vt(e){return Lr(e.summary),e.idGenerator()}function ou(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map);let s=i.get(r);return s||(s={uid:vt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function lu(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map);let a=s.get(i);return a||(a={uid:vt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function cu(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function du(e){let t;return[e.split(` +var uc=Object.defineProperty;var hc=(e,t,n)=>t in e?uc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var jt=(e,t,n)=>(hc(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const In=15,mi=30,pi=19,mc=29,ur=256,Hi=ur+1+mc,Ms=2*Hi+1,yn=256,pc=7,Is=16,Fs=17,Ls=18,$r=8*2,hr=-1,_c=1,qn=2,wc=0,nn=0,Cs=1,gc=3,Le=4,Qe=0,Ya=1,zn=2,et=-2,xc=-3,Jt=-5;function Tr(e){return Or(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function Or(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?Or(n):n),[])}const Ns=[0,1,2,3].concat(...Tr([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function se(){const e=this;function t(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,f=e.stat_desc.max_length;let d,u,p,w,v,h,c=0;for(w=0;w<=In;w++)i.bl_count[w]=0;for(s[i.heap[i.heap_max]*2+1]=0,d=i.heap_max+1;df&&(w=f,c++),s[u*2+1]=w,!(u>e.max_code)&&(i.bl_count[w]++,v=0,u>=l&&(v=o[u-l]),h=s[u*2],i.opt_len+=h*(w+v),a&&(i.static_len+=h*(a[u*2+1]+v)));if(c!==0){do{for(w=f-1;i.bl_count[w]===0;)w--;i.bl_count[w]--,i.bl_count[w+1]+=2,i.bl_count[f]--,c-=2}while(c>0);for(w=f;w!==0;w--)for(u=i.bl_count[w];u!==0;)p=i.heap[--d],!(p>e.max_code)&&(s[p*2+1]!=w&&(i.opt_len+=(w-s[p*2+1])*s[p*2],s[p*2+1]=w),u--)}}function n(i,s){let a=0;do a|=i&1,i>>>=1,a<<=1;while(--s>0);return a>>>1}function r(i,s,a){const o=[];let l=0,f,d,u;for(f=1;f<=In;f++)o[f]=l=l+a[f-1]<<1;for(d=0;d<=s;d++)u=i[d*2+1],u!==0&&(i[d*2]=n(o[u]++,u))}e.build_tree=function(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.elems;let l,f,d=-1,u;for(i.heap_len=0,i.heap_max=Ms,l=0;l=1;l--)i.pqdownheap(s,l);u=o;do l=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(s,1),f=i.heap[1],i.heap[--i.heap_max]=l,i.heap[--i.heap_max]=f,s[u*2]=s[l*2]+s[f*2],i.depth[u]=Math.max(i.depth[l],i.depth[f])+1,s[l*2+1]=s[f*2+1]=u,i.heap[1]=u++,i.pqdownheap(s,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],t(i),r(s,e.max_code,i.bl_count)}}se._length_code=[0,1,2,3,4,5,6,7].concat(...Tr([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));se.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];se.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];se.d_code=function(e){return e<256?Ns[e]:Ns[256+(e>>>7)]};se.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];se.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];se.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];se.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function De(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}const yc=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],bc=Tr([[144,8],[112,9],[24,7],[8,8]]);De.static_ltree=Or(yc.map((e,t)=>[e,bc[t]]));const vc=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],kc=Tr([[30,5]]);De.static_dtree=Or(vc.map((e,t)=>[e,kc[t]]));De.static_l_desc=new De(De.static_ltree,se.extra_lbits,ur+1,Hi,In);De.static_d_desc=new De(De.static_dtree,se.extra_dbits,0,mi,In);De.static_bl_desc=new De(null,se.extra_blbits,0,pi,pc);const Sc=9,Ec=8;function at(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const Wa=0,sr=1,Zt=2,Je=[new at(0,0,0,0,Wa),new at(4,4,8,4,sr),new at(4,5,16,8,sr),new at(4,6,32,32,sr),new at(4,4,16,16,Zt),new at(8,16,32,32,Zt),new at(8,16,128,128,Zt),new at(8,32,128,256,Zt),new at(32,128,258,1024,Zt),new at(32,258,258,4096,Zt)],$n=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ge=0,Kn=1,bn=2,Xn=3,Dc=32,Kr=42,Jn=113,vn=666,Xr=8,Tc=0,Jr=1,Oc=2,ce=3,ar=258,Ye=ar+ce+1;function Ps(e,t,n,r){const i=e[t*2],s=e[n*2];return i=3&&j[se.bl_order[T]*2+1]===0;T--);return e.opt_len+=3*(T+1)+5+5+4,T}function Ve(T){e.pending_buf[e.pending++]=T}function Tt(T){Ve(T&255),Ve(T>>>8&255)}function gn(T){Ve(T>>8&255),Ve(T&255&255)}function Ee(T,R){let A;const I=R;ge>$r-I?(A=T,ue|=A<>>$r-ge,ge+=I-$r):(ue|=T<=8&&(Ve(ue&255),ue>>>=8,ge-=8)}function sc(){Ee(Jr<<1,3),Ue(yn,De.static_ltree),Ss(),1+Se+10-ge<9&&(Ee(Jr<<1,3),Ue(yn,De.static_ltree),Ss()),Se=7}function xn(T,R){let A,I,P;if(e.dist_buf[V]=T,e.lc_buf[V]=R&255,V++,T===0?N[R*2]++:(Z++,T--,N[(se._length_code[R]+ur+1)*2]++,Y[se.d_code(T)*2]++),(V&8191)===0&&O>2){for(A=V*8,I=g-m,P=0;P>>=3,Z8?Tt(ue):ge>0&&Ve(ue&255),ue=0,ge=0}function ac(T,R,A){Ds(),Se=8,A&&(Tt(R),Tt(~R)),e.pending_buf.set(l.subarray(T,T+R),e.pending),e.pending+=R}function Ts(T,R,A){Ee((Tc<<1)+(A?1:0),3),ac(T,R,!0)}function oc(T,R,A){let I,P,G=0;O>0?(q.build_tree(e),we.build_tree(e),G=wn(),I=e.opt_len+3+7>>>3,P=e.static_len+3+7>>>3,P<=I&&(I=P)):I=P=R+5,R+4<=I&&T!=-1?Ts(T,R,A):P==I?(Ee((Jr<<1)+(A?1:0),3),Es(De.static_ltree,De.static_dtree)):(Ee((Oc<<1)+(A?1:0),3),ic(q.max_code+1,we.max_code+1,G+1),Es(N,Y)),Dt(),A&&Ds()}function Ot(T){oc(m>=0?m:-1,g-m,T),m=g,t.flush_pending()}function qr(){let T,R,A,I;do{if(I=f-x-g,I===0&&g===0&&x===0)I=s;else if(I==-1)I--;else if(g>=s+s-Ye){l.set(l.subarray(s,s+s),0),y-=s,g-=s,m-=s,T=w,A=T;do R=u[--A]&65535,u[A]=R>=s?R-s:0;while(--T!==0);T=s,A=T;do R=d[--A]&65535,d[A]=R>=s?R-s:0;while(--T!==0);I+=s}if(t.avail_in===0)return;T=t.read_buf(l,g+x,I),x+=T,x>=ce&&(p=l[g]&255,p=(p<r-5&&(R=r-5);;){if(x<=1){if(qr(),x===0&&T==nn)return Ge;if(x===0)break}if(g+=x,x=0,A=m+R,(g===0||g>=A)&&(x=g-A,g=A,Ot(!1),t.avail_out===0)||g-m>=s-Ye&&(Ot(!1),t.avail_out===0))return Ge}return Ot(T==Le),t.avail_out===0?T==Le?bn:Ge:T==Le?Xn:Kn}function Os(T){let R=S,A=g,I,P,G=D;const K=g>s-Ye?g-(s-Ye):0;let Me=B;const Xe=o,zr=g+ar;let As=l[A+G-1],Rs=l[A+G];D>=F&&(R>>=2),Me>x&&(Me=x);do if(I=T,!(l[I+G]!=Rs||l[I+G-1]!=As||l[I]!=l[A]||l[++I]!=l[A+1])){A+=2,I++;do;while(l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&AG){if(y=T,G=P,P>=Me)break;As=l[A+G-1],Rs=l[A+G]}}while((T=d[T&Xe]&65535)>K&&--R!==0);return G<=x?G:x}function cc(T){let R=0,A;for(;;){if(x=ce&&(p=(p<=ce)if(A=xn(g-y,_-ce),x-=_,_<=E&&x>=ce){_--;do g++,p=(p<=ce&&(p=(p<4096)&&(_=ce-1)),D>=ce&&_<=D){I=g+x-ce,A=xn(g-1-b,D-ce),x-=D-1,D-=2;do++g<=I&&(p=(p<Sc||I!=Xr||A<9||A>15||R<0||R>9||G<0||G>qn?et:(T.dstate=e,a=A,s=1<9||A<0||A>qn?et:(Je[O].func!=Je[R].func&&T.total_in!==0&&(I=T.deflate(Cs)),O!=R&&(O=R,E=Je[O].max_lazy,F=Je[O].good_length,B=Je[O].nice_length,S=Je[O].max_chain),U=A,I)},e.deflateSetDictionary=function(T,R,A){let I=A,P,G=0;if(!R||n!=Kr)return et;if(Is-Ye&&(I=s-Ye,G=A-I),l.set(R.subarray(G,G+I),0),g=I,m=I,p=l[0]&255,p=(p<Le||R<0)return et;if(!T.next_out||!T.next_in&&T.avail_in!==0||n==vn&&R!=Le)return T.msg=$n[zn-et],et;if(T.avail_out===0)return T.msg=$n[zn-Jt],Jt;if(t=T,G=i,i=R,n==Kr&&(I=Xr+(a-8<<4)<<8,P=(O-1&255)>>1,P>3&&(P=3),I|=P<<6,g!==0&&(I|=Dc),I+=31-I%31,n=Jn,gn(I)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,Qe}else if(t.avail_in===0&&R<=G&&R!=Le)return t.msg=$n[zn-Jt],Jt;if(n==vn&&t.avail_in!==0)return T.msg=$n[zn-Jt],Jt;if(t.avail_in!==0||x!==0||R!=nn&&n!=vn){switch(K=-1,Je[O].func){case Wa:K=lc(R);break;case sr:K=cc(R);break;case Zt:K=dc(R);break}if((K==bn||K==Xn)&&(n=vn),K==Ge||K==bn)return t.avail_out===0&&(i=-1),Qe;if(K==Kn){if(R==Cs)sc();else if(Ts(0,0,!1),R==gc)for(A=0;An&&(i=n),i===0?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Rc(e){const t=this,n=new Ha,r=Mc(e&&e.chunkSize?e.chunkSize:64*1024),i=nn,s=new Uint8Array(r);let a=e?e.level:hr;typeof a>"u"&&(a=hr),n.deflateInit(a),n.next_out=s,t.append=function(o,l){let f,d,u=0,p=0,w=0;const v=[];if(!!o.length){n.next_in_index=0,n.next_in=o,n.avail_in=o.length;do{if(n.next_out_index=0,n.avail_out=r,f=n.deflate(i),f!=Qe)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?v.push(new Uint8Array(s)):v.push(s.slice(0,n.next_out_index))),w+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=u&&(l(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return v.length>1?(d=new Uint8Array(w),v.forEach(function(h){d.set(h,p),p+=h.length})):d=v[0]||new Uint8Array,d}},t.flush=function(){let o,l,f=0,d=0;const u=[];do{if(n.next_out_index=0,n.avail_out=r,o=n.deflate(Le),o!=Ya&&o!=Qe)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&u.push(s.slice(0,n.next_out_index)),d+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),l=new Uint8Array(d),u.forEach(function(p){l.set(p,f),f+=p.length}),l}}function Mc(e){return e+5*(Math.floor(e/16383)+1)}const Ic=15,J=0,xt=1,Fc=2,Ne=-2,ae=-3,Us=-4,yt=-5,We=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ja=1440,Lc=0,Cc=4,Nc=9,Pc=5,Uc=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Yc=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Wc=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Hc=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],jc=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Bc=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],At=15;function _i(){const e=this;let t,n,r,i,s,a;function o(f,d,u,p,w,v,h,c,m,_,b){let k,g,y,x,D,S,E,O,U,F,B,N,Y,j,q;F=0,D=u;do r[f[d+F]]++,F++,D--;while(D!==0);if(r[0]==u)return h[0]=-1,c[0]=0,J;for(O=c[0],S=1;S<=At&&r[S]===0;S++);for(E=S,OD&&(O=D),c[0]=O,j=1<N+O;){if(x++,N+=O,q=y-N,q=q>O?O:q,(g=1<<(S=E-N))>k+1&&(g-=k+1,Y=E,Sja)return ae;s[x]=B=_[0],_[0]+=q,x!==0?(a[x]=D,i[0]=S,i[1]=O,S=D>>>N-O,i[2]=B-s[x-1]-S,m.set(i,(s[x-1]+S)*3)):h[0]=B}for(i[1]=E-N,F>=u?i[0]=128+64:b[F]>>N;S>>=1)D^=S;for(D^=S,U=(1<257?(_==ae?m.msg="oversubscribed distance tree":_==yt?(m.msg="incomplete distance tree",_=ae):_!=Us&&(m.msg="empty distance tree with lengths",_=ae),_):J)}}_i.inflate_trees_fixed=function(e,t,n,r){return e[0]=Nc,t[0]=Pc,n[0]=Uc,r[0]=Yc,J};const Qn=0,Ys=1,Ws=2,Hs=3,js=4,Bs=5,Vs=6,Qr=7,Gs=8,er=9;function Vc(){const e=this;let t,n=0,r,i=0,s=0,a=0,o=0,l=0,f=0,d=0,u,p=0,w,v=0;function h(c,m,_,b,k,g,y,x){let D,S,E,O,U,F,B,N,Y,j,q,we,W,he,V,Z;B=x.next_in_index,N=x.avail_in,U=y.bitb,F=y.bitk,Y=y.write,j=Y>=S[Z+1],F-=S[Z+1],y.win[Y++]=S[Z+2],j--;continue}do{if(U>>=S[Z+1],F-=S[Z+1],(O&16)!==0){for(O&=15,W=S[Z+2]+(U&We[O]),U>>=O,F-=O;F<15;)N--,U|=(x.read_byte(B++)&255)<>=S[Z+1],F-=S[Z+1],(O&16)!==0){for(O&=15;F>=O,F-=O,j-=W,Y>=he)V=Y-he,Y-V>0&&2>Y-V?(y.win[Y++]=y.win[V++],y.win[Y++]=y.win[V++],W-=2):(y.win.set(y.win.subarray(V,V+2),Y),Y+=2,V+=2,W-=2);else{V=Y-he;do V+=y.end;while(V<0);if(O=y.end-V,W>O){if(W-=O,Y-V>0&&O>Y-V)do y.win[Y++]=y.win[V++];while(--O!==0);else y.win.set(y.win.subarray(V,V+O),Y),Y+=O,V+=O,O=0;V=0}}if(Y-V>0&&W>Y-V)do y.win[Y++]=y.win[V++];while(--W!==0);else y.win.set(y.win.subarray(V,V+W),Y),Y+=W,V+=W,W=0;break}else if((O&64)===0)D+=S[Z+2],D+=U&We[O],Z=(E+D)*3,O=S[Z];else return x.msg="invalid distance code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae;while(!0);break}if((O&64)===0){if(D+=S[Z+2],D+=U&We[O],Z=(E+D)*3,(O=S[Z])===0){U>>=S[Z+1],F-=S[Z+1],y.win[Y++]=S[Z+2],j--;break}}else return(O&32)!==0?(W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,xt):(x.msg="invalid literal/length code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae)}while(!0)}while(j>=258&&N>=10);return W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,J}e.init=function(c,m,_,b,k,g){t=Qn,f=c,d=m,u=_,p=b,w=k,v=g,r=null},e.proc=function(c,m,_){let b,k,g,y=0,x=0,D=0,S,E,O,U;for(D=m.next_in_index,S=m.avail_in,y=c.bitb,x=c.bitk,E=c.write,O=E=258&&S>=10&&(c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,_=h(f,d,u,p,w,v,c,m),D=m.next_in_index,S=m.avail_in,y=c.bitb,x=c.bitk,E=c.write,O=E>>=r[k+1],x-=r[k+1],g=r[k],g===0){a=r[k+2],t=Vs;break}if((g&16)!==0){o=g&15,n=r[k+2],t=Ws;break}if((g&64)===0){s=g,i=k/3+r[k+2];break}if((g&32)!==0){t=Qr;break}return t=er,m.msg="invalid literal/length code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,c.inflate_flush(m,_);case Ws:for(b=o;x>=b,x-=b,s=d,r=w,i=v,t=Hs;case Hs:for(b=s;x>=r[k+1],x-=r[k+1],g=r[k],(g&16)!==0){o=g&15,l=r[k+2],t=js;break}if((g&64)===0){s=g,i=k/3+r[k+2];break}return t=er,m.msg="invalid distance code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,c.inflate_flush(m,_);case js:for(b=o;x>=b,x-=b,t=Bs;case Bs:for(U=E-l;U<0;)U+=c.end;for(;n!==0;){if(O===0&&(E==c.end&&c.read!==0&&(E=0,O=E7&&(x-=8,S++,D--),c.write=E,_=c.inflate_flush(m,_),E=c.write,O=Eh.avail_out&&(m=h.avail_out),m!==0&&c==yt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m,b==n.end&&(b=0,n.write==n.end&&(n.write=0),m=n.write-b,m>h.avail_out&&(m=h.avail_out),m!==0&&c==yt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m),h.next_out_index=_,n.read=b,c},n.proc=function(h,c){let m,_,b,k,g,y,x,D;for(k=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y>>1){case 0:_>>>=3,b-=3,m=b&7,_>>>=m,b-=m,r=ei;break;case 1:S=[],E=[],O=[[]],U=[[]],_i.inflate_trees_fixed(S,E,O,U),d.init(S[0],E[0],O[0],0,U[0],0),_>>>=3,b-=3,r=tr;break;case 2:_>>>=3,b-=3,r=zs;break;case 3:return _>>>=3,b-=3,r=Bt,h.msg="invalid block type",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c)}break;case ei:for(;b<32;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<>>16&65535)!=(_&65535))return r=Bt,h.msg="invalid stored block lengths",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);i=_&65535,_=b=0,r=i!==0?qs:u!==0?nr:Qt;break;case qs:if(g===0||x===0&&(y==n.end&&n.read!==0&&(y=0,x=yg&&(m=g),m>x&&(m=x),n.win.set(h.read_buf(k,m),y),k+=m,g-=m,y+=m,x-=m,(i-=m)!==0)break;r=u!==0?nr:Qt;break;case zs:for(;b<14;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<29||(m>>5&31)>29)return r=Bt,h.msg="too many length or distance symbols",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);if(m=258+(m&31)+(m>>5&31),!o||o.length>>=14,b-=14,a=0,r=$s;case $s:for(;a<4+(s>>>10);){for(;b<3;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<>>=3,b-=3}for(;a<19;)o[Zs[a++]]=0;if(l[0]=7,m=v.inflate_trees_bits(o,l,f,p,h),m!=J)return c=m,c==ae&&(o=null,r=Bt),n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);a=0,r=Ks;case Ks:for(;m=s,!(a>=258+(m&31)+(m>>5&31));){let j,q;for(m=l[0];b>>=m,b-=m,o[a++]=q;else{for(D=q==18?7:q-14,j=q==18?11:3;b>>=m,b-=m,j+=_&We[D],_>>>=D,b-=D,D=a,m=s,D+j>258+(m&31)+(m>>5&31)||q==16&&D<1)return o=null,r=Bt,h.msg="invalid bit length repeat",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);q=q==16?o[D-1]:0;do o[D++]=q;while(--j!==0);a=D}}if(f[0]=-1,F=[],B=[],N=[],Y=[],F[0]=9,B[0]=6,m=s,m=v.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),o,F,B,N,Y,p,h),m!=J)return m==ae&&(o=null,r=Bt),c=m,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);d.init(F[0],B[0],p,N[0],p,Y[0]),r=tr;case tr:if(n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,(c=d.proc(n,h,c))!=xt)return n.inflate_flush(h,c);if(c=J,d.free(h),k=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y15?(e.inflateEnd(n),Ne):(e.wbits=r,n.istate.blocks=new Gc(n,1<>4)+8>a.wbits){a.mode=Rt,n.msg="invalid win size",a.marker=5;break}a.mode=Js;case Js:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,s=n.read_byte(n.next_in_index++)&255,((a.method<<8)+s)%31!==0){a.mode=Rt,n.msg="incorrect header check",a.marker=5;break}if((s&Zc)===0){a.mode=kn;break}a.mode=Qs;case Qs:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,a.mode=ea;case ea:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,a.mode=ta;case ta:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,a.mode=na;case na:return n.avail_in===0?i:(i=r,n.avail_in--,n.total_in++,a.need+=n.read_byte(n.next_in_index++)&255,a.mode=ti,Fc);case ti:return a.mode=Rt,n.msg="need dictionary",a.marker=0,Ne;case kn:if(i=a.blocks.proc(n,i),i==ae){a.mode=Rt,a.marker=0;break}if(i==J&&(i=r),i!=xt)return i;i=r,a.blocks.reset(n,a.was),a.mode=ra;case ra:return n.avail_in=0,xt;case Rt:return ae;default:return Ne}},e.inflateSetDictionary=function(n,r,i){let s=0,a=i;if(!n||!n.istate||n.istate.mode!=ti)return Ne;const o=n.istate;return a>=1<0&&n.next_in_index!=p&&(l(n.next_in_index),p=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return f.length>1?(u=new Uint8Array(v),f.forEach(function(h){u.set(h,w),w+=h.length})):u=f[0]||new Uint8Array,u}},t.flush=function(){n.inflateEnd()}}const pe=4294967295,ke=65535,wi=8,Va=0,Ga=99,Za=67324752,ji=134695760,Jc=ji,gi=33639248,qa=101010256,xi=101075792,za=117853008,sn=22,On=20,An=56,Qc=sn+On+An,$a=1,Ka=39169,Xa=10,Ja=1,Bi=21589,ed=28789,td=25461,yi=1,nd=6,bi=8,vi=2048,ki=16,rd=20,ia=45,sa=51,or="/",aa=new Date(2107,11,31),oa=new Date(1980,0,1),fe=void 0,mr="undefined",Qa="function";class la{constructor(t){return class extends TransformStream{constructor(n,r){const i=new t(r);super({transform(s,a){a.enqueue(i.append(s))},flush(s){const a=i.flush();a&&s.enqueue(a)}})}}}}const id=64;let eo=2;try{typeof navigator!=mr&&navigator.hardwareConcurrency&&(eo=navigator.hardwareConcurrency)}catch{}const sd={chunkSize:512*1024,maxWorkers:eo,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:fe,CompressionStreamNative:typeof CompressionStream!=mr&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=mr&&DecompressionStream},Ft=Object.assign({},sd);function Vi(){return Ft}function to(e){return Math.max(e.chunkSize,id)}function Gi(e){const{baseURL:t,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:i,useCompressionStream:s,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:f,DecompressionStream:d,workerScripts:u}=e;if(Mt("baseURL",t),Mt("chunkSize",n),Mt("maxWorkers",r),Mt("terminateWorkerTimeout",i),Mt("useCompressionStream",s),Mt("useWebWorkers",a),o&&(Ft.CompressionStream=new la(o)),l&&(Ft.DecompressionStream=new la(l)),Mt("CompressionStream",f),Mt("DecompressionStream",d),u!==fe){const{deflate:p,inflate:w}=u;if((p||w)&&(Ft.workerScripts||(Ft.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");Ft.workerScripts.deflate=p}if(w){if(!Array.isArray(w))throw new Error("workerScripts.inflate must be an array");Ft.workerScripts.inflate=w}}}function Mt(e,t){t!==fe&&(Ft[e]=t)}const Sn={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin",cap:["cap","pcap"],"cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",javascript:"js",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":"odm","vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-debian-package":["deb","udeb"],"x-director":["dcr","dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-koan":["skp","skd","skt","skm"],"x-kpresenter":["kpr","kpt"],"x-kword":["kwd","kwt"],"x-latex":"latex","x-lha":"lha","x-lyx":"lyx","x-lzh":"lzh","x-lzx":"lzx","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-ms-wmd":"wmd","x-ms-wmz":"wmz","x-msdos-program":["com","exe","bat","dll"],"x-msi":"msi","x-netcdf":["nc","cdf"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":"rpm","x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tcl":"tcl","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-troff":["t","tr","roff"],"x-troff-man":"man","x-troff-me":"me","x-troff-ms":"ms","x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix",json:"json","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":"mathml",mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","x-msdownload":["exe","dll","com","bat","msi"],"x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tads":"gam","x-tex":"tex","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-compressed":"tgz","x-gzip":"gz","x-perfmon":["pma","pmc","pml","pmr","pmw"],"x-pkcs7-mime":["p7c","p7m"],"ynd.ms-pkipko":"pko"},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":["aif","aiff","aifc"],"x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2","x-wav":"wav",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":["mmd","mmod"],"x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":["sd","sdf"],"x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","mpc","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":["val","aso"],"x-pdb":["pdb","ent"],"x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-photoshop":"psd","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",pipeg:"jfif"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":["x3d","x3dz"],"x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:["tm","ts"],"tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{avif:".avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","vrml","wrl","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const t in Sn)if(Sn.hasOwnProperty(t)){for(const n in Sn[t])if(Sn[t].hasOwnProperty(n)){const r=Sn[t][n];if(typeof r=="string")e[r]=t+"/"+n;else for(let i=0;i>>1^3988292384:t=t>>>1;no[e]=t}class pr{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let r=0,i=t.length|0;r>>8^no[(n^t[r])&255];this.crc=n}get(){return~this.crc}}class ro extends TransformStream{constructor(){const t=new pr;super({transform(n){t.append(n)},flush(n){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t.get()),n.enqueue(r)}})}}function Si(e){if(typeof TextEncoder>"u"){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n0&&t&&(e[n-1]=Fe.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let a=0;a>>t),n=e[a]<<32-t;const i=e.length?e[e.length-1]:0,s=Fe.getPartial(i);return r.push(Fe.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},_r={bytes:{fromBits(e){const n=Fe.bitLength(e)/8,r=new Uint8Array(n);let i;for(let s=0;s>>24,i<<=8;return r},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let o=t.blockSize+r-(t.blockSize+r&t.blockSize-1);o<=i;o+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=Fe.concat(t,[Fe.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r},_S(e,t){return t<>>32-e},_block(e){const t=this,n=t._h,r=Array(80);for(let f=0;f<16;f++)r[f]=e[f];let i=n[0],s=n[1],a=n[2],o=n[3],l=n[4];for(let f=0;f<=79;f++){f>=16&&(r[f]=t._S(1,r[f-3]^r[f-8]^r[f-14]^r[f-16]));const d=t._S(5,i)+t._f(f,s,a,o)+l+r[f]+t._key[Math.floor(f/20)]|0;l=o,o=a,a=t._S(30,s),s=i,i=d}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+l|0}};const io={};io.aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,o,l=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;s<4*i+28;s++){let f=a[s-1];(s%i===0||i===8&&s%i===4)&&(f=n[f>>>24]<<24^n[f>>16&255]<<16^n[f>>8&255]<<8^n[f&255],s%i===0&&(f=f<<8^f>>>24^l<<24,l=l<<1^(l>>7)*283)),a[s]=a[s-i]^f}for(let f=0;s;f++,s--){const d=a[f&3?s:s-4];s<=4||f<4?o[f]=d:o[f]=r[0][n[d>>>24]]^r[1][n[d>>16&255]]^r[2][n[d>>8&255]]^r[3][n[d&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,o,l,f;for(let d=0;d<256;d++)s[(i[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let u=a^a<<1^a<<2^a<<3^a<<4;u=u>>8^u&255^99,n[d]=u,r[u]=d,f=i[l=i[o=i[d]]];let p=f*16843009^l*65537^o*257^d*16843008,w=i[u]*257^u*16843008;for(let v=0;v<4;v++)e[v][d]=w=w<<24^w>>>8,t[v][u]=p=p<<24^p>>>8}for(let d=0;d<5;d++)e[d]=e[d].slice(0),t[d]=t[d].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],l=s[2],f=s[3],d=s[4];let u=e[0]^n[0],p=e[t?3:1]^n[1],w=e[2]^n[2],v=e[t?1:3]^n[3],h=4,c,m,_;for(let b=0;b>>24]^o[p>>16&255]^l[w>>8&255]^f[v&255]^n[h],m=a[p>>>24]^o[w>>16&255]^l[v>>8&255]^f[u&255]^n[h+1],_=a[w>>>24]^o[v>>16&255]^l[u>>8&255]^f[p&255]^n[h+2],v=a[v>>>24]^o[u>>16&255]^l[p>>8&255]^f[w&255]^n[h+3],h+=4,u=c,p=m,w=_;for(let b=0;b<4;b++)i[t?3&-b:b]=d[u>>>24]<<24^d[p>>16&255]<<16^d[w>>8&255]<<8^d[v&255]^n[h++],c=u,u=p,p=w,w=v,v=c;return i}};const ad={getRandomValues(e){const t=new Uint32Array(e.buffer),n=r=>{let i=987654321;const s=4294967295;return function(){return i=36969*(i&65535)+(i>>16)&s,r=18e3*(r&65535)+(r>>16)&s,(((i<<16)+r&s)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r>24&255)===255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=Fe.bitLength(t);for(let s=0;s>5)+1<<2;let s,a,o,l,f;const d=new ArrayBuffer(i),u=new DataView(d);let p=0;const w=Fe;for(t=_r.bytes.toBits(t),f=1;p<(i||1);f++){for(s=a=e.encrypt(w.concat(t,[f])),o=1;oi&&(e=n.hash(e));for(let s=0;sthis.resolveReady=i),password:t,signed:n,strength:r-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;o?(await bd(a,l,o,qe(i,0,Fn[l]+2)),i=qe(i,Fn[l]+2),f()):await d;const u=new Uint8Array(i.length-It-(i.length-It)%an);s.enqueue(po(a,i,u,0,It,!0))},async flush(i){const{signed:s,ctr:a,hmac:o,pending:l,ready:f}=this;await f;const d=qe(l,0,l.length-It),u=qe(l,l.length-It);let p=new Uint8Array;if(d.length){const w=Cn(lt,d);o.update(w);const v=a.update(w);p=Ln(lt,v)}if(s){const w=qe(Ln(lt,o.digest()),0,It);for(let v=0;vthis.resolveReady=i),password:t,strength:n-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;let u=new Uint8Array;o?(u=await vd(a,l,o),f()):await d;const p=new Uint8Array(u.length+i.length-i.length%an);p.set(u,0),s.enqueue(po(a,i,p,u.length,0))},async flush(i){const{ctr:s,hmac:a,pending:o,ready:l}=this;await l;let f=new Uint8Array;if(o.length){const d=s.update(Cn(lt,o));a.update(d),f=Ln(lt,d)}r.signature=Ln(lt,a.digest()).slice(0,It),i.enqueue(qi(f,r.signature))}}),r=this}}function po(e,t,n,r,i,s){const{ctr:a,hmac:o,pending:l}=e,f=t.length-i;l.length&&(t=qi(l,t),n=Ed(n,f-f%an));let d;for(d=0;d<=f-an;d+=an){const u=Cn(lt,qe(t,d,d+an));s&&o.update(u);const p=a.update(u);s||o.update(p),n.set(Ln(lt,p),d+r)}return e.pending=qe(t,d),n}async function bd(e,t,n,r){const i=await _o(e,t,n,qe(r,0,Fn[t])),s=qe(r,Fn[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new Error(ao)}async function vd(e,t,n){const r=lo(new Uint8Array(Fn[t])),i=await _o(e,t,n,r);return qi(r,i)}async function _o(e,t,n,r){e.password=null;const i=Si(n),s=await kd(ld,i,fd,!1,ud),a=await Sd(Object.assign({salt:r},fo),s,8*(En[t]*2+2)),o=new Uint8Array(a),l=Cn(lt,qe(o,0,En[t])),f=Cn(lt,qe(o,En[t],En[t]*2)),d=qe(o,En[t]*2);return Object.assign(e,{keys:{key:l,authentication:f,passwordVerification:d},ctr:new wd(new _d(l),Array.from(hd)),hmac:new gd(f)}),d}function kd(e,t,n,r,i){return md?Wn.importKey(e,t,n,r,i):Yn.importKey(t)}async function Sd(e,t,n){return pd?await Wn.deriveBits(e,t,n):Yn.pbkdf2(t,e.salt,fo.iterations,n)}function qi(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Ed(e,t){if(t&&t>e.length){const n=e;e=new Uint8Array(t),e.set(n,0)}return e}function qe(e,t,n){return e.subarray(t,n)}function Ln(e,t){return e.fromBits(t)}function Cn(e,t){return e.toBits(t)}const ln=12;class Dd extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),wo(this,t)},transform(r,i){const s=this;if(s.password){const a=ca(s,r.subarray(0,ln));if(s.password=null,a[ln-1]!=s.passwordVerification)throw new Error(ao);r=r.subarray(ln)}i.enqueue(ca(s,r))}})}}class Td extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),wo(this,t)},transform(r,i){const s=this;let a,o;if(s.password){s.password=null;const l=lo(new Uint8Array(ln));l[ln-1]=s.passwordVerification,a=new Uint8Array(r.length+l.length),a.set(da(s,l),0),o=ln}else a=new Uint8Array(r.length),o=0;a.set(da(s,r),o),i.enqueue(a)}})}}function ca(e,t){const n=new Uint8Array(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function go(e){const t=e.keys[2]|2;return xo(Math.imul(t,t^1)>>>8)}function xo(e){return e&255}function fa(e){return e&4294967295}const ua="deflate-raw";class Od extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:r,CompressionStreamNative:i}){super({});const{compressed:s,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:f,level:d}=t,u=this;let p,w,v=yo(super.readable);(!a||l)&&f&&([v,p]=v.tee(),p=ct(p,new ro)),s&&(v=vo(v,o,{level:d,chunkSize:n},i,r)),a&&(l?v=ct(v,new Td(t)):(w=new yd(t),v=ct(v,w))),bo(u,v,async()=>{let h;a&&!l&&(h=w.signature),(!a||l)&&f&&(h=await p.getReader().read(),h=new DataView(h.value.buffer).getUint32(0)),u.signature=h})}}class Ad extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:r,DecompressionStreamNative:i}){super({});const{zipCrypto:s,encrypted:a,signed:o,signature:l,compressed:f,useCompressionStream:d}=t;let u,p,w=yo(super.readable);a&&(s?w=ct(w,new Dd(t)):(p=new xd(t),w=ct(w,p))),f&&(w=vo(w,d,{chunkSize:n},i,r)),(!a||s)&&o&&([w,u]=w.tee(),u=ct(u,new ro)),bo(this,w,async()=>{if((!a||s)&&o){const v=await u.getReader().read(),h=new DataView(v.value.buffer);if(l!=h.getUint32(0,!1))throw new Error(oo)}})}}function yo(e){return ct(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function bo(e,t,n){t=ct(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function vo(e,t,n,r,i){try{const s=t&&r?r:i;e=ct(e,new s(ua,n))}catch(s){if(t)e=ct(e,new i(ua,n));else throw s}return e}function ct(e,t){return e.pipeThrough(t)}const Rd="message",Md="start",Id="pull",ha="data",Fd="ack",Ld="close",ko="deflate",So="inflate";class Cd extends TransformStream{constructor(t,n){super({});const r=this,{codecType:i}=t;let s;i.startsWith(ko)?s=Od:i.startsWith(So)&&(s=Ad);let a=0;const o=new s(t,n),l=super.readable,f=new TransformStream({transform(d,u){d&&d.length&&(a+=d.length,u.enqueue(d))},flush(){const{signature:d}=o;Object.assign(r,{signature:d,size:a})}});Object.defineProperty(r,"readable",{get(){return l.pipeThrough(o).pipeThrough(f)}})}}const Nd=typeof Worker!=mr;class ni{constructor(t,{readable:n,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:f},d){const{signal:u}=a;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new Pd(n,a,s),{signal:u}),writable:r,options:Object.assign({},i),scripts:f,transferStreams:l,terminate(){const{worker:p,busy:w}=t;p&&!w&&(p.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,d(t)}}),(o&&Nd?Yd:Ud)(t,s)}}class Pd extends TransformStream{constructor(t,{onstart:n,onprogress:r,size:i,onend:s},{chunkSize:a}){let o=0;super({start(){n&&ri(n,i)},async transform(l,f){o+=l.length,r&&await ri(r,o,i),f.enqueue(l)},flush(){t.size=o,s&&ri(s,o)}},{highWaterMark:1,size:()=>a})}}async function ri(e,...t){try{await e(...t)}catch{}}function Ud(e,t){return{run:()=>Wd(e,t)}}function Yd(e,{baseURL:t,chunkSize:n}){return e.interface||Object.assign(e,{worker:Bd(e.scripts[0],t,e),interface:{run:()=>Hd(e,{chunkSize:n})}}),e.interface}async function Wd({options:e,readable:t,writable:n,onTaskFinished:r},i){const s=new Cd(e,i);try{await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,size:o}=s;return{signature:a,size:o}}finally{r()}}async function Hd(e,t){let n,r;const i=new Promise((p,w)=>{n=p,r=w});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});const{readable:s,options:a,scripts:o}=e,{writable:l,closed:f}=jd(e.writable);Ei({type:Md,scripts:o.slice(1),options:a,config:t,readable:s,writable:l},e)||Object.assign(e,{reader:s.getReader(),writer:l.getWriter()});const u=await i;try{await l.close()}catch{}return await f,u}function jd(e){const t=e.getWriter();let n;const r=new Promise(s=>n=s);return{writable:new WritableStream({async write(s){await t.ready,await t.write(s)},close(){t.releaseLock(),n()},abort(s){return t.abort(s)}}),closed:r}}let ma=!0,pa=!0;function Bd(e,t,n){const r={type:"module"};let i,s;typeof e==Qa&&(e=e());try{i=new URL(e,t)}catch{i=e}if(ma)try{s=new Worker(i)}catch{ma=!1,s=new Worker(i,r)}else s=new Worker(i,r);return s.addEventListener(Rd,a=>Vd(a,n)),s}function Ei(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:s,readable:a,writable:o}=e;const l=[];if(s){const{buffer:f,length:d}=s;d!=f.byteLength&&(s=new Uint8Array(s)),e.value=s.buffer,l.push(e.value)}if(i&&pa?(a&&l.push(a),o&&l.push(o)):e.readable=e.writable=null,l.length)try{return t.postMessage(e,l),!0}catch{pa=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(s){throw n&&n.releaseLock(),r(),s}}async function Vd({data:e},t){const{type:n,value:r,messageId:i,result:s,error:a}=e,{reader:o,writer:l,resolveResult:f,rejectResult:d,onTaskFinished:u}=t;try{if(a){const{message:w,stack:v,code:h,name:c}=a,m=new Error(w);Object.assign(m,{stack:v,code:h,name:c}),p(m)}else{if(n==Id){const{value:w,done:v}=await o.read();Ei({type:ha,value:w,done:v,messageId:i},t)}n==ha&&(await l.ready,await l.write(new Uint8Array(r)),Ei({type:Fd,messageId:i},t)),n==Ld&&p(null,s)}}catch(w){p(w)}function p(w,v){w?d(w):f(v),l&&l.releaseLock(),u()}}let Vt=[];const ii=[];let _a=0;async function Eo(e,t){const{options:n,config:r}=t,{transferStreams:i,useWebWorkers:s,useCompressionStream:a,codecType:o,compressed:l,signed:f,encrypted:d}=n,{workerScripts:u,maxWorkers:p,terminateWorkerTimeout:w}=r;t.transferStreams=i||i===fe;const v=!l&&!f&&!d&&!t.transferStreams;t.useWebWorkers=!v&&(s||s===fe&&r.useWebWorkers),t.scripts=t.useWebWorkers&&u?u[o]:[],n.useCompressionStream=a||a===fe&&r.useCompressionStream;let h;const c=Vt.find(_=>!_.busy);if(c)wa(c),h=new ni(c,e,t,m);else if(Vt.lengthii.push({resolve:_,stream:e,workerOptions:t}));return h.run();function m(_){if(ii.length){const[{resolve:b,stream:k,workerOptions:g}]=ii.splice(0,1);b(new ni(_,k,g,m))}else _.worker?(wa(_),Number.isFinite(w)&&w>=0&&(_.terminateTimeout=setTimeout(()=>{Vt=Vt.filter(b=>b!=_),_.terminate()},w))):Vt=Vt.filter(b=>b!=_)}}function wa(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function Gd(e){const t=()=>URL.createObjectURL(new Blob([`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:"PBKDF2"},B=t.assign({hash:{name:"HMAC"}},R),E=t.assign({iterations:1e3,hash:{name:"SHA-1"}},R),M=["deriveBits"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&"function"==typeof T.importKey,L=N&&W&&"function"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s("Invalid password")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s("Invalid signature")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey("raw",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s("Invalid password");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s("Invalid signature")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)("deflate-raw",n))}catch(r){if(!t)throw r;e=pe(e,new s("deflate-raw",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=le:s.startsWith("inflate")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:"pull",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:"data",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:"close",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&ke(e),"data"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe="oversubscribed dynamic bit lengths tree":-5!=a&&0!==r[0]||(f.Oe="incomplete dynamic bit lengths tree",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe="oversubscribed literal/length tree":-4!=h&&(w.Oe="incomplete literal/length tree",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe="oversubscribed distance tree":-5==h?(w.Oe="incomplete distance tree",h=-3):-4!=h&&(w.Oe="empty distance tree with lengths",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe="invalid distance code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe="invalid literal/length code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe="invalid literal/length code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe="invalid distance code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe="invalid block type",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe="invalid stored block lengths",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe="too many length or distance symbols",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe="invalid bit length repeat",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe="need dictionary",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye}; +`],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}const Do="HTTP error ",Rr="HTTP Range not supported",Zd="Writer iterator completed too soon",qd="text/plain",zd="Content-Length",$d="Content-Range",Kd="Accept-Ranges",Xd="Range",Jd="Content-Type",Qd="HEAD",$i="GET",To="bytes",ef=64*1024,Ki="writable";class Mr{constructor(){this.size=0}init(){this.initialized=!0}}class Yt extends Mr{get readable(){const t=this,{chunkSize:n=ef}=t,r=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:s=0,size:a,diskNumberStart:o}=r,{chunkOffset:l}=this;i.enqueue(await Ie(t,s+l,Math.min(n,a-l),o)),l+n>a?i.close():this.chunkOffset+=n}});return r}}class Oo extends Mr{constructor(){super();const t=this,n=new WritableStream({write(r){return t.writeUint8Array(r)}});Object.defineProperty(t,Ki,{get(){return n}})}writeUint8Array(){}}class Di extends Yt{constructor(t){super();let n=t.length;for(;t.charAt(n-1)=="=";)n--;const r=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:r,size:Math.floor((n-r)*.75)})}readUint8Array(t,n){const{dataStart:r,dataURI:i}=this,s=new Uint8Array(n),a=Math.floor(t/3)*4,o=atob(i.substring(a+r,Math.ceil((t+n)/3)*4+r)),l=t-Math.floor(a/4)*3;for(let f=l;f2?n.data+=btoa(i):n.pending=i}getData(){return this.data+btoa(this.pending)}}class hn extends Yt{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){const r=this;return new Uint8Array(await r.blob.slice(t,t+n).arrayBuffer())}}class $t extends Mr{constructor(t){super();const n=this,r=new TransformStream,i=[];t&&i.push([Jd,t]),Object.defineProperty(n,Ki,{get(){return r.writable}}),n.blob=new Response(r.readable,{headers:i}).blob()}getData(){return this.blob}}class Ao extends hn{constructor(t){super(new Blob([t],{type:qd}))}}class Ti extends $t{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:n}=this,r=await super.getData();if(r.text&&n)return r.text();{const i=new FileReader;return new Promise((s,a)=>{Object.assign(i,{onload:({target:o})=>s(o.result),onerror:()=>a(i.error)}),i.readAsText(r,t)})}}}class tf extends Yt{constructor(t,n){super(),Ro(this,t,n)}async init(){super.init(),await Mo(this,Oi,ga)}readUint8Array(t,n){return Io(this,t,n,Oi,ga)}}class nf extends Yt{constructor(t,n){super(),Ro(this,t,n)}async init(){super.init(),await Mo(this,Ai,xa)}readUint8Array(t,n){return Io(this,t,n,Ai,xa)}}function Ro(e,t,n){const{preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s}=n;n=Object.assign({},n),delete n.preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.useXHR,Object.assign(e,{url:t,options:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s})}async function Mo(e,t,n){const{url:r,useRangeHeader:i,forceRangeRequests:s}=e;if(sf(r)&&(i||s)){const{headers:a}=await t($i,e,Fo(e));if(!s&&a.get(Kd)!=To)throw new Error(Rr);{let o;const l=a.get($d);if(l){const f=l.trim().split(/\s*\/\s*/);if(f.length){const d=f[1];d&&d!="*"&&(o=Number(d))}}o===fe?await ya(e,t,n):e.size=o}}else await ya(e,t,n)}async function Io(e,t,n,r,i){const{data:s,useRangeHeader:a,forceRangeRequests:o,options:l}=e;if(a||o){const f=await r($i,e,Fo(e,t,n));if(f.status!=206)throw new Error(Rr);return new Uint8Array(await f.arrayBuffer())}else return s||await i(e,l),new Uint8Array(s.subarray(t,t+n))}function Fo(e,t=0,n=1){return Object.assign({},Xi(e),{[Xd]:To+"="+t+"-"+(t+n-1)})}function Xi({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function ga(e){await Lo(e,Oi)}async function xa(e){await Lo(e,Ai)}async function Lo(e,t){const n=await t($i,e,Xi(e));e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function ya(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t(Qd,e,Xi(e))).headers.get(zd);i?e.size=Number(i):await n(e,e.options)}}async function Oi(e,{options:t,url:n},r){const i=await fetch(n,Object.assign({},t,{method:e,headers:r}));if(i.status<400)return i;throw i.status==416?new Error(Rr):new Error(Do+(i.statusText||i.status))}function Ai(e,{url:t},n){return new Promise((r,i)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",()=>{if(s.status<400){const a=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(o=>{const l=o.trim().split(/\s*:\s*/);l[0]=l[0].trim().replace(/^[a-z]|-[a-z]/g,f=>f.toUpperCase()),a.push(l)}),r({status:s.status,arrayBuffer:()=>s.response,headers:new Map(a)})}else i(s.status==416?new Error(Rr):new Error(Do+(s.statusText||s.status)))},!1),s.addEventListener("error",a=>i(a.detail.error),!1),s.open(e,t),n)for(const a of Object.entries(n))s.setRequestHeader(a[0],a[1]);s.responseType="arraybuffer",s.send()})}class ba extends Yt{constructor(t,n={}){super(),Object.assign(this,{url:t,reader:n.useXHR?new nf(t,n):new tf(t,n)})}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(t,n){return this.reader.readUint8Array(t,n)}}class Ri extends Yt{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,n){return this.array.slice(t,t+n)}}class gr extends Oo{init(t=0){super.init(),Object.assign(this,{offset:0,array:new Uint8Array(t)})}writeUint8Array(t){const n=this;if(n.offset+t.length>n.array.length){const r=n.array;n.array=new Uint8Array(r.length+t.length),n.array.set(r)}n.array.set(t,n.offset),n.offset+=t.length}getData(){return this.array}}class rf extends Yt{constructor(t){super(),this.readers=t}async init(){super.init();const t=this,{readers:n}=t;t.lastDiskNumber=0,await Promise.all(n.map(async r=>{await r.init(),t.size+=r.size}))}async readUint8Array(t,n,r=0){const i=this,{readers:s}=this;let a,o=r;o==-1&&(o=s.length-1);let l=t;for(;l>=s[o].size;)l-=s[o].size,o++;const f=s[o],d=f.size;if(l+n<=d)a=await Ie(f,l,n);else{const u=d-l;a=new Uint8Array(n),a.set(await Ie(f,l,u)),a.set(await i.readUint8Array(t+u,n-u,r),u)}return i.lastDiskNumber=Math.max(o,i.lastDiskNumber),a}}class va extends Mr{constructor(t,n=4294967296){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,availableSize:n});let i,s,a;const o=new WritableStream({async write(d){if(a)if(i.size+d.length>=n){const u=n-i.size;await l(d.slice(0,u)),await f(),r.diskOffset+=i.size,r.diskNumber++,a=null,await this.write(d.slice(u))}else d.length&&await l(d),r.availableSize=n-i.size;else{const{value:u,done:p}=await t.next();if(p&&!u)throw new Error(Zd);i=u,i.size=0,s=u.writable,a=s.getWriter(),await this.write(d)}},async close(){await a.ready,await f()}});Object.defineProperty(r,Ki,{get(){return o}});async function l(d){await a.ready,await a.write(d),i.size+=d.length,r.size+=d.length}async function f(){s.size=i.size,await a.close()}}}function sf(e){const{baseURL:t}=Vi(),{protocol:n}=new URL(e,t);return n=="http:"||n=="https:"}async function ze(e,t){e.init&&!e.initialized&&await e.init(t)}function Ie(e,t,n,r){return e.readUint8Array(t,n,r)}const Co="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),af=Co.length==256;function of(e){if(af){let t="";for(let n=0;nthis[n]=t[n])}}const si="File format is not recognized",ff="End of central directory not found",uf="End of Zip64 central directory not found",hf="End of Zip64 central directory locator not found",mf="Central directory header not found",pf="Local file header not found",_f="Zip64 extra field not found",wf="File contains encrypted entry",gf="Encryption method not supported",ka="Compression method not supported",Sa="Split zip file",Ea="utf-8",Da="cp437",xf=[[Wo,pe],[Ho,pe],[jo,pe],[Ii,ke]],yf={[ke]:{getValue:_e,bytes:4},[pe]:{getValue:lr,bytes:8}};class bf{constructor(t,n={}){t instanceof ReadableStream&&(t={readable:t}),Object.assign(this,{reader:t,options:n,config:Vi()})}async*getEntriesGenerator(t={}){const n=this;let{reader:r}=n;const{config:i}=n;if(await ze(r),(r.size===fe||!r.readUint8Array)&&(Array.isArray(r)?r=new rf(r):r=new hn(await new Response(r.readable).blob()),await ze(r)),r.size=r.size)throw new Error(si);let _=0,b=await Ie(r,l,o,v),k=Te(b);if(o){const S=s.offset-o;if(_e(k,_)!=gi&&l!=S){const E=l;l=S,c=l-E,b=await Ie(r,l,o,v),k=Te(b)}}if(l<0||l>=r.size)throw new Error(si);const g=tt(n,t,"filenameEncoding"),y=tt(n,t,"commentEncoding");for(let S=0;SE.getData(ht,Wt,Ht),_=we;const{onprogress:Dt}=t;if(Dt)try{await Dt(S+1,h,new xr(E))}catch{}yield Wt}const x=tt(n,t,"extractPrependedData"),D=tt(n,t,"extractAppendedData");return x&&(n.prependedData=m>0?await Ie(r,0,m):new Uint8Array),n.comment=d?await Ie(r,f+sn,d):new Uint8Array,D&&(n.appendedData=u>>8&255:p>>>24&255),signature:p,compressed:f!=0,encrypted:k,useWebWorkers:tt(i,r,"useWebWorkers"),useCompressionStream:tt(i,r,"useCompressionStream"),transferStreams:tt(i,r,"transferStreams")},config:d,streamOptions:{signal:E,size:D,onstart:O,onprogress:U,onend:F}};return S.size+=(await Eo({readable:x,writable:S},B)).size,tt(i,r,"preventClose")||await S.close(),t.getData?t.getData():S}}function zo(e,t,n){const r=e.rawBitFlag=be(t,n+2),i=(r&yi)==yi,s=_e(t,n+6);Object.assign(e,{encrypted:i,version:be(t,n),bitFlag:{level:(r&nd)>>1,dataDescriptor:(r&bi)==bi,languageEncodingFlag:(r&vi)==vi},rawLastModDate:s,lastModDate:Of(s),filenameLength:be(t,n+22),extraFieldLength:be(t,n+24)})}async function $o(e,t,n,r){const{rawExtraField:i}=t,s=t.extraField=new Map,a=Te(new Uint8Array(i));let o=0;try{for(;ot[i]==s);for(let i=0,s=0;i{if(e.data.length>=a+4){const f=_e(n,a);t[o]=e[o]=new Date(f*1e3);const d=s[l];e[d]=f}a+=4})}async function Tf(e,t,n,r,i){const s=new Uint8Array(4),a=Te(s);Af(a,0,t);const o=r+i;return await l(r)||await l(Math.min(o,n));async function l(f){const d=n-f,u=await Ie(e,d,f);for(let p=u.length-r;p>=0;p--)if(u[p]==s[0]&&u[p+1]==s[1]&&u[p+2]==s[2]&&u[p+3]==s[3])return{offset:d+p,buffer:u.slice(p,p+r).buffer}}}function tt(e,t,n){return t[n]===fe?e.options[n]:t[n]}function Of(e){const t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function ai(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function cn(e,t){return e.getUint8(t)}function be(e,t){return e.getUint16(t,!0)}function _e(e,t){return e.getUint32(t,!0)}function lr(e,t){return Number(e.getBigUint64(t,!0))}function Af(e,t,n){e.setUint32(t,n,!0)}function Te(e){return new DataView(e.buffer)}const Rf="File already exists",Mf="Zip file comment exceeds 64KB",If="File entry comment exceeds 64KB",Ff="File entry name exceeds 64KB",Oa="Version exceeds 65535",Lf="The strength must equal 1, 2, or 3",Cf="Extra field type exceeds 65535",Nf="Extra field data exceeds 64KB",ts="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Aa=new Uint8Array([7,0,2,0,65,69,3,0,0]),Ko=28;let oi=0;const Ra=[];class Pf{constructor(t,n={}){t.writable===fe&&typeof t.next==Qa&&(t=new va(t)),t instanceof WritableStream&&(t={writable:t}),t.writable.size===fe&&(t.writable.size=0);const r=t instanceof va;r||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0}),Object.assign(this,{writer:t,addSplitZipSignature:r,options:n,config:Vi(),files:new Map,filenames:new Set,offset:t.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set})}async add(t="",n,r={}){const i=this,{pendingAddFileCalls:s,config:a}=i;oiRa.push(l));let o;try{if(t=t.trim(),i.filenames.has(t))throw new Error(Rf);return i.filenames.add(t),o=Uf(i,t,n,r),s.add(o),await o}catch(l){throw i.filenames.delete(t),l}finally{s.delete(o);const l=Ra.shift();l?l():oi--}}async close(t=new Uint8Array,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:s}=i;for(;r.size;)await Promise.all(Array.from(r));return await Zf(this,t,n),!i.preventClose&&!n.preventClose&&await s.close(),i.getData?i.getData():s}}async function Uf(e,t,n,r){t=t.trim(),r.directory&&!t.endsWith(or)?t+=or:r.directory=t.endsWith(or);const i=Si(t);if(ee(i)>ke)throw new Error(Ff);const s=r.comment||"",a=Si(s);if(ee(a)>ke)throw new Error(If);const o=e.options.version||r.version||0;if(o>ke)throw new Error(Oa);const l=e.options.versionMadeBy||r.versionMadeBy||20;if(l>ke)throw new Error(Oa);const f=xe(e,r,Ji)||new Date,d=xe(e,r,Qi),u=xe(e,r,es),p=xe(e,r,"password"),w=xe(e,r,"encryptionStrength")||3,v=xe(e,r,"zipCrypto");if(p!==fe&&w!==fe&&(w<1||w>3))throw new Error(Lf);let h=new Uint8Array;const{extraField:c}=r;if(c){let he=0,V=0;c.forEach(Z=>he+=4+ee(Z)),h=new Uint8Array(he),c.forEach((Z,Se)=>{if(Se>ke)throw new Error(Cf);if(ee(Z)>ke)throw new Error(Nf);ve(h,new Uint16Array([Se]),V),ve(h,new Uint16Array([ee(Z)]),V+2),ve(h,Z,V+4),V+=4+ee(Z)})}let m=xe(e,r,"extendedTimestamp");m===fe&&(m=!0);let _=0,b=0,k=xe(e,r,"keepOrder");k===fe&&(k=!0);let g=0,y=xe(e,r,Zo);y===fe&&(y=!0);const x=xe(e,r,Vo)||0,D=xe(e,r,Go)||0;let S=xe(e,r,qo);n&&(n instanceof ReadableStream&&(n={readable:n}),await ze(n),n.size===fe?(r.dataDescriptor=!0,(S||S===fe)&&(S=!0,_=pe)):(g=n.size,_=zf(g)));const{diskOffset:E}=e.writer;if(e.offset+e.pendingEntriesSize-E>=pe||g>=pe||_>=pe){if(S===!1||!k)throw new Error(ts);S=!0}S=S||!1;const O=xe(e,r,"level"),U=xe(e,r,"useWebWorkers"),F=xe(e,r,"bufferedWrite");let B=xe(e,r,"dataDescriptor"),N=xe(e,r,"dataDescriptorSignature");const Y=xe(e,r,"signal"),j=xe(e,r,"useCompressionStream");B===fe&&(B=!0),B&&N===fe&&(N=!1),r=Object.assign({},r,{rawFilename:i,rawComment:a,version:o,versionMadeBy:l,lastModDate:f,lastAccessDate:d,creationDate:u,rawExtraField:h,zip64:S,password:p,level:O,useWebWorkers:U,encryptionStrength:w,extendedTimestamp:m,zipCrypto:v,bufferedWrite:F,keepOrder:k,dataDescriptor:B,dataDescriptorSignature:N,signal:Y,msDosCompatible:y,internalFileAttribute:x,externalFileAttribute:D,useCompressionStream:j});const q=Hf(r),we=jf(r);b=ee(q.localHeaderArray,we.dataDescriptorArray)+_,e.pendingEntriesSize+=b;let W;try{W=await Yf(e,t,n,{headerInfo:q,dataDescriptorInfo:we},r)}finally{e.pendingEntriesSize-=b}return Object.assign(W,{name:t,comment:s,extraField:c}),new xr(W)}async function Yf(e,t,n,r,i){const{files:s,writer:a}=e,{keepOrder:o,dataDescriptor:l,signal:f}=i,d=Array.from(s.values()).pop();let u={},p,w,v,h,c,m;s.set(t,u);try{let k;o&&(k=d&&d.lock,_()),i.bufferedWrite||e.lockWriter||!l?(m=new $t,m.writable.size=0,p=!0,await ze(a)):(m=a,e.lockWriter=Promise.resolve(),w=()=>delete e.lockWriter),await ze(m);const{writable:g,diskNumber:y}=a;let{diskOffset:x}=a;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const D=new Uint8Array(4),S=He(D);Q(S,0,ji),await Nt(g,D),e.offset+=4}if(p||await k,c=!0,u.diskNumberStart=y,u=await Wf(n,m,u,r,e.config,i),c=!1,s.set(t,u),u.filename=t,p){await m.writable.close();let D=await m.getData();await k,await b(),h=!0,l||(D=await Vf(u,D,g,i)),u.diskNumberStart=a.diskNumber,x=a.diskOffset,await D.stream().pipeTo(g,{preventClose:!0,signal:f}),g.size+=D.size,h=!1}if(u.offset=e.offset-x,u.zip64)Gf(u);else if(u.offset>=pe)throw new Error(ts);return e.offset+=u.length,u}catch(k){throw(p&&h||!p&&c)&&(e.hasCorruptedEntries=!0,k&&(k.corruptedEntry=!0),p?e.offset+=m.writable.size:e.offset=m.writable.size),s.delete(t),k}finally{v&&v(),w&&w()}function _(){u.lock=new Promise(k=>v=k)}async function b(){const{lockWriter:k}=e;if(k)return await k.then(()=>delete e.lockWriter),b();e.lockWriter=new Promise(g=>w=g)}}async function Wf(e,t,{diskNumberStart:n,lock:r},i,s,a){const{headerInfo:o,dataDescriptorInfo:l}=i,{localHeaderArray:f,headerArray:d,lastModDate:u,rawLastModDate:p,encrypted:w,compressed:v,version:h,compressionMethod:c,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b}=o,{dataDescriptorArray:k}=l,{rawFilename:g,lastAccessDate:y,creationDate:x,password:D,level:S,zip64:E,zipCrypto:O,dataDescriptor:U,directory:F,versionMadeBy:B,rawComment:N,rawExtraField:Y,useWebWorkers:j,onstart:q,onprogress:we,onend:W,signal:he,encryptionStrength:V,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,useCompressionStream:Wt}=a,Dt={lock:r,versionMadeBy:B,zip64:E,directory:Boolean(F),filenameUTF8:!0,rawFilename:g,commentUTF8:!0,rawComment:N,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b,rawExtraField:Y,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,diskNumberStart:n};let ht=0,Ht=0,wn;const{writable:Ve}=t;if(e){e.chunkSize=to(s),await Nt(Ve,f);const gn=e.readable,Ee=gn.size=e.size,Ue={options:{codecType:ko,level:S,password:D,encryptionStrength:V,zipCrypto:w&&O,passwordVerification:w&&O&&p>>8&255,signed:!0,compressed:v,encrypted:w,useWebWorkers:j,useCompressionStream:Wt,transferStreams:!1},config:s,streamOptions:{signal:he,size:Ee,onstart:q,onprogress:we,onend:W}},Xt=await Eo({readable:gn,writable:Ve},Ue);Ve.size+=Xt.size,wn=Xt.signature,Ht=e.size=gn.size,ht=Xt.size}else await Nt(Ve,f);const Tt=E?new Uint8Array(Ko+4):new Uint8Array;return e&&Bf({signature:wn,rawExtraFieldZip64:Tt,compressedSize:ht,uncompressedSize:Ht,headerInfo:o,dataDescriptorInfo:l},a),U&&await Nt(Ve,k),Object.assign(Dt,{compressedSize:ht,lastModDate:u,rawLastModDate:p,creationDate:x,lastAccessDate:y,encrypted:w,length:ee(f,k)+ht,compressionMethod:c,version:h,headerArray:d,signature:wn,rawExtraFieldZip64:Tt}),Dt}function Hf(e){const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,password:s,level:a,zip64:o,zipCrypto:l,dataDescriptor:f,directory:d,rawExtraField:u,encryptionStrength:p,extendedTimestamp:w}=e,v=a!==0&&!d,h=Boolean(s&&ee(s));let c;if(h&&!l){c=new Uint8Array(ee(Aa)+2);const N=He(c);re(N,0,Ka),ve(c,Aa,2),yr(N,8,p)}else c=new Uint8Array;let m,_;if(w){_=new Uint8Array(9+(r?4:0)+(i?4:0));const N=He(_);re(N,0,Bi),re(N,2,ee(_)-4);const Y=1+(r?2:0)+(i?4:0);yr(N,4,Y),Q(N,5,Math.floor(n.getTime()/1e3)),r&&Q(N,9,Math.floor(r.getTime()/1e3)),i&&Q(N,13,Math.floor(i.getTime()/1e3));try{m=new Uint8Array(36);const j=He(m),q=li(n);re(j,0,Xa),re(j,2,32),re(j,8,Ja),re(j,10,24),Pe(j,12,q),Pe(j,20,li(r)||q),Pe(j,28,li(i)||q)}catch{m=new Uint8Array}}else m=_=new Uint8Array;let b=vi;f&&(b=b|bi);let k=Va;v&&(k=wi);let g=e.version||rd;o&&(g=g>ia?g:ia),h&&(b=b|yi,l||(g=g>sa?g:sa,k=Ga,v&&(c[9]=wi)));const y=new Uint8Array(26),x=He(y);re(x,0,g),re(x,2,b),re(x,4,k);const D=new Uint32Array(1),S=He(D);let E;naa?E=aa:E=n,re(S,0,(E.getHours()<<6|E.getMinutes())<<5|E.getSeconds()/2),re(S,2,(E.getFullYear()-1980<<4|E.getMonth()+1)<<5|E.getDate());const O=D[0];Q(x,6,O),re(x,22,ee(t));const U=ee(c,_,m,u);re(x,24,U);const F=new Uint8Array(30+ee(t)+U),B=He(F);return Q(B,0,Za),ve(F,y,4),ve(F,t,30),ve(F,c,30+ee(t)),ve(F,_,30+ee(t,c)),ve(F,m,30+ee(t,c,_)),ve(F,u,30+ee(t,c,_,m)),{localHeaderArray:F,headerArray:y,headerView:x,lastModDate:n,rawLastModDate:O,encrypted:h,compressed:v,version:g,compressionMethod:k,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:m,rawExtraFieldAES:c}}function jf(e){const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i=new Uint8Array,s,a=0;return n&&(i=new Uint8Array(t?r?24:20:r?16:12),s=He(i),r&&(a=4,Q(s,0,Jc))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}}function Bf(e,t){const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:s,headerInfo:a,dataDescriptorInfo:o}=e,{headerView:l,encrypted:f}=a,{dataDescriptorView:d,dataDescriptorOffset:u}=o,{zip64:p,zipCrypto:w,dataDescriptor:v}=t;if((!f||w)&&n!==fe&&(Q(l,10,n),v&&Q(d,u,n)),p){const h=He(r);re(h,0,$a),re(h,2,Ko),Q(l,14,pe),Pe(h,12,BigInt(i)),Q(l,18,pe),Pe(h,4,BigInt(s)),v&&(Pe(d,u+4,BigInt(i)),Pe(d,u+12,BigInt(s)))}else Q(l,14,i),Q(l,18,s),v&&(Q(d,u+4,i),Q(d,u+8,s))}async function Vf(e,t,n,{zipCrypto:r}){const i=await qf(t,0,26),s=new DataView(i);return(!e.encrypted||r)&&Q(s,14,e.signature),e.zip64?(Q(s,18,pe),Q(s,22,pe)):(Q(s,18,e.compressedSize),Q(s,22,e.uncompressedSize)),await Nt(n,new Uint8Array(i)),t.slice(i.byteLength)}function Gf(e){const{rawExtraFieldZip64:t,offset:n,diskNumberStart:r}=e,i=He(t);Pe(i,20,BigInt(n)),Q(i,28,r)}async function Zf(e,t,n){const{files:r,writer:i}=e;let s=0,a=0;const{diskOffset:o,writable:l}=i;let{diskNumber:f}=i,d=e.offset-o,u=r.size;for(const[,{rawFilename:k,rawExtraFieldZip64:g,rawExtraFieldAES:y,rawExtraField:x,rawComment:D,rawExtraFieldExtendedTimestamp:S,rawExtraFieldNTFS:E}]of r)a+=46+ee(k,D,g,y,S,E,x);let p=n.zip64||e.options.zip64||!1;if(d>=pe||a>=pe||u>=ke){if(n.zip64===!1||e.options.zip64===!1)throw new Error(ts);p=!0}const w=new Uint8Array(a),v=He(w);for(const[k,g]of Array.from(r.values()).entries()){const{offset:y,rawFilename:x,rawExtraFieldZip64:D,rawExtraFieldAES:S,rawExtraFieldNTFS:E,rawExtraField:O,rawComment:U,versionMadeBy:F,headerArray:B,directory:N,zip64:Y,msDosCompatible:j,internalFileAttribute:q,externalFileAttribute:we,extendedTimestamp:W,lastModDate:he,diskNumberStart:V}=g;let Z;if(W){Z=new Uint8Array(9);const ue=He(Z);re(ue,0,Bi),re(ue,2,ee(Z)-4),yr(ue,4,1),Q(ue,5,Math.floor(he.getTime()/1e3))}else Z=new Uint8Array;const Se=ee(D,S,Z,E,O);if(Q(v,s,gi),re(v,s+4,F),ve(w,B,s+6),re(v,s+30,Se),re(v,s+32,ee(U)),re(v,s+34,Y?ke:V),re(v,s+36,q),we?Q(v,s+38,we):N&&j&&yr(v,s+38,ki),Q(v,s+42,Y?pe:y),ve(w,x,s+46),ve(w,D,s+46+ee(x)),ve(w,S,s+46+ee(x,D)),ve(w,Z,s+46+ee(x,D,S)),ve(w,E,s+46+ee(x,D,S,Z)),ve(w,O,s+46+ee(x,D,S,Z,E)),ve(w,U,s+46+ee(x)+Se),s+=46+ee(x,U)+Se,n.onprogress)try{await n.onprogress(k+1,r.size,new xr(g))}catch{}}await ze(i),await Nt(l,w);const h=new Uint8Array(p?Qc:sn),c=He(h);let m=i.diskNumber;const{availableSize:_}=i;_n&&(t+=n.length)),t}class Xo{constructor(t,n,r,i){const s=this;if(t.root&&i&&i.getChildByName(n))throw new Error("Entry filename already exists");r||(r={}),Object.assign(s,{fs:t,name:n,data:r.data,id:t.entries.length,parent:i,children:[],uncompressedSize:0}),t.entries.push(s),i&&s.parent.children.push(s)}moveTo(t){const n=this;n.fs.move(n,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){const n=this;let r=n.name,i=n.parent;for(;i&&i!=t;)r=(i.name?i.name+"/":"")+r,i=i.parent;return r}isDescendantOf(t){let n=this.parent;for(;n&&n.id!=t.id;)n=n.parent;return Boolean(n)}}class Jo extends Xo{constructor(t,n,r,i){super(t,n,r,i);const s=this;s.Reader=r.Reader,s.Writer=r.Writer,r.getData&&(s.getData=r.getData)}async getData(t,n={}){const r=this;if(!t||t.constructor==r.Writer&&r.data)return r.data;{const i=r.reader=new r.Reader(r.data,n);await Promise.all([ze(i),ze(t,r.data.uncompressedSize)]);const s=i.readable;return s.size=r.uncompressedSize=i.size,await s.pipeTo(t.writable),t.getData?t.getData():t.writable}}getText(t,n){return this.getData(new Ti(t),n)}getBlob(t,n){return this.getData(new $t(t),n)}getData64URI(t,n){return this.getData(new wr(t),n)}getUint8Array(t){return this.getData(new gr,t)}getWritable(t=new WritableStream,n){return this.getData({writable:t},n)}replaceBlob(t){Object.assign(this,{data:t,Reader:hn,Writer:$t,reader:null})}replaceText(t){Object.assign(this,{data:t,Reader:Ao,Writer:Ti,reader:null})}replaceData64URI(t){Object.assign(this,{data:t,Reader:Di,Writer:wr,reader:null})}replaceUint8Array(t){Object.assign(this,{data:t,Reader:Ri,Writer:gr,reader:null})}replaceReadable(t){Object.assign(this,{data:null,Reader:function(){return{readable:t}},Writer:null,reader:null})}}class Hn extends Xo{constructor(t,n,r,i){super(t,n,r,i),this.directory=!0}addDirectory(t){return mt(this,t,null,!0)}addText(t,n){return mt(this,t,{data:n,Reader:Ao,Writer:Ti})}addBlob(t,n){return mt(this,t,{data:n,Reader:hn,Writer:$t})}addData64URI(t,n){return mt(this,t,{data:n,Reader:Di,Writer:wr})}addUint8Array(t,n){return mt(this,t,{data:n,Reader:Ri,Writer:gr})}addHttpContent(t,n,r={}){return mt(this,t,{data:n,Reader:class extends ba{constructor(i){super(i,r)}}})}addReadable(t,n){return mt(this,t,{Reader:function(){return{readable:n}}})}addFileSystemEntry(t){return eu(this,t)}addData(t,n){return mt(this,t,n)}async importBlob(t,n={}){await this.importZip(new hn(t),n)}async importData64URI(t,n={}){await this.importZip(new Di(t),n)}async importUint8Array(t,n={}){await this.importZip(new Ri(t),n)}async importHttpContent(t,n={}){await this.importZip(new ba(t,n),n)}async importReadable(t,n={}){await this.importZip({readable:t},n)}exportBlob(t={}){return this.exportZip(new $t("application/zip"),t)}exportData64URI(t={}){return this.exportZip(new wr("application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new gr,t)}async exportWritable(t=new WritableStream,n={}){return await this.exportZip({writable:t},n),t}async importZip(t,n){await ze(t),(await new bf(t,n).getEntries()).forEach(s=>{let a=this;const o=s.filename.split("/"),l=o.pop();o.forEach(f=>a=a.getChildByName(f)||new Hn(this.fs,f,null,a)),s.directory||mt(a,l,{data:s,Reader:Jf(Object.assign({},n))})})}async exportZip(t,n){const r=this;await Promise.all([Qo(r),ze(t)]);const i=new Pf(t,n);return await Qf(i,r,Xf([r],"uncompressedSize"),n),await i.close(),t.getData?t.getData():t.writable}getChildByName(t){const n=this.children;for(let r=0;r{n.id==e.id&&t.splice(r,1)})}async function Qf(e,t,n,r){const i=t,s=new Map;await a(e,t);async function a(o,l){await f();async function f(){if(r.bufferedWrite)await Promise.all(l.children.map(d));else for(const u of l.children)await d(u)}async function d(u){const p=r.relativePath?u.getRelativeName(i):u.getFullname();await o.add(p,u.reader,Object.assign({directory:u.directory},Object.assign({},r,{onprogress:async w=>{if(r.onprogress){s.set(p,w);try{await r.onprogress(Array.from(s.values()).reduce((v,h)=>v+h),n)}catch{}}}}))),await a(o,u)}}}async function eu(e,t){if(t.isDirectory){const i=e.addDirectory(t.name);return await n(i,t),i}else return new Promise((i,s)=>t.file(a=>i(e.addBlob(t.name,a)),s));async function n(i,s){const a=await r(s);for(const o of a)o.isDirectory?await n(i.addDirectory(o.name),o):await new Promise((l,f)=>{o.file(d=>{const u=i.addBlob(o.name,d);u.uncompressedSize=d.size,l(u)},f)})}function r(i){return new Promise((s,a)=>{let o=[];i.isDirectory&&l(i.createReader()),i.isFile&&s(o);function l(f){f.readEntries(d=>{d.length?(o=o.concat(d),l(f)):s(o)},a)}})}}function en(e){e.entries=[],e.root=new Hn(e)}function mt(e,t,n,r){if(e.directory)return r?new Hn(e.fs,t,n,e):new Jo(e.fs,t,n,e);throw new Error("Parent entry is not a directory")}let el;try{el=import.meta.url}catch{}Gi({baseURL:el});Gd(Gi);Gi({Deflate:Rc,Inflate:Xc});function Ir(e){return e.slice(e.lastIndexOf(Fr)+1)}const Fr="/";async function tu(e,t,n){const r=e.vaultPath+"/.obsidian/"+t+".json";let i;return e.adapter.exists(r)&&(i=JSON.parse(await e.adapter.readFile(r))),n(i)}class nu{constructor(t){jt(this,"zipFS");jt(this,"chunks",[]);jt(this,"chunkIndex",0);this.zipBlob=t}async initReadingVault(){this.zipFS=new Kf.FS,await this.zipFS.importBlob(this.zipBlob)}readDirectory(t){return this.zipFS.find(t).children.map(r=>({isDirectory:()=>!!r.directory,getName:()=>r.getFullname()}))}readFile(t){return this.zipFS.find(t).getText("utf-8")}exists(t){return!!this.zipFS.find(t)}resolve(t){return t}resolveInDir(t,n){return t+Fr+n}removeFile(t){}renameFile(t,n){}flushResultsFromInitialProcessing(t){}appendToResultFile(t,n){this.chunks.push(n)}appendToPostProcessingFile(t,n){this.chunks[this.chunkIndex]=n,this.chunkIndex++}initPostProcessingResultFile(t){}chunkIter(){const t=this.chunks;let n=0;return{[Symbol.asyncIterator](){return{async next(){if(n{if(s.forEach((o,l)=>s[l]+=a),r==="seenOne"&&a!=="["&&(r="normal"),r==="seenOneOut"&&a!=="]"&&(r="normal"),a==="["&&(i+=1,r==="seenOne"?(s.push(""),r="normal"):r==="normal"&&(r="seenOne")),a==="]"&&i>0){if(i-=1,r==="seenOneOut"){const o=s.pop();o&&(!t||s.length===0)&&n.push(o.slice(0,-2)),r="normal"}else r==="normal"&&(r="seenOneOut");i===0&&(r="normal")}}),n}function su(e){return Ir(e)!==e}class ci{constructor(){jt(this,"nameWasCalledAsFile",[]);jt(this,"pathMap",new Map);jt(this,"nameMap",new Map)}accessAsFile(t,n,r){const i=this.pathMap.get(n);if(i)return this.nameMap.get(t)||this.nameMap.set(t,i),i;const s=this.nameMap.get(t);if(s&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,s),this.nameWasCalledAsFile.push(t),s;const a=r();return this.pathMap.set(n,a),this.nameMap.get(t)||this.nameMap.set(t,a),this.nameWasCalledAsFile.push(t),a}accessAsLink(t,n){const r=this.findData(t);if(r)return r;const i=su(t),s=n();return i?this.pathMap.set(t,s):this.nameMap.set(t,s),s}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Lr(e){e.totalNodes++,e.leafNodes++}function tl(e){e.leafNodes--,e.topLevelNodes++}function au(e,t,n=ru,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new ci,headingTracker:new ci,dummyHeadingLinkTracker:new Map,blockLinkTracker:new ci,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function vt(e){return Lr(e.summary),e.idGenerator()}function ou(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map);let s=i.get(r);return s||(s={uid:vt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function lu(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map);let a=s.get(i);return a||(a={uid:vt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function cu(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function du(e){let t;return[e.split(` `).map(r=>{const i=r.split(" "),s=i[i.length-1];if(s.startsWith("^"))return t=s,i.slice(0,-1).join(" ")}).join(` -`),t]}function nl(e,t,n,r,i,s){const a=[t],o=[e];for(const l of n){const f=i(l);fu(f,l,a,o,r),s==null||s(f,l)}}function fu(e,t,n,r,i){var o;uu(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(o=a.children)!=null?o:[],a.children.push(e)),n.push(t),r.push(e)}function uu(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function rl(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=rl(n.children,r);if(i)return i}}return null}function hu(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function mu(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const o=t.findData(s);if(o){const l={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};nl(f,l,o,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=rl(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function pu(e,t){const[n,r]=mu(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Lr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let o=a;s.forEach(l=>{o=o.replace(l.old,l.new)}),await t.adapter.appendToPostProcessingFile(i,o)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var il=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(il||{});function _u(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function wu(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function gu(e,t){const n=_u(e);switch(wu(n)){case 0:return xu(n[0],t);case 2:return ou(n,t);case 1:return hu(n,t);default:throw"Invalid link type detected: "+n}}function xu(e,t){return t.defaultLinkTracker.accessAsLink(e,()=>(Lr(t.summary),{uid:t.idGenerator(),obsidianLink:e,type:1})).uid}function yu(e,t,n,r){const[i,s]=du(n);return s?[lu([e,s],t,r),i]:[vt(r),n]}function bu(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,()=>(Lr(n.summary),{uid:n.idGenerator(),obsidianLink:r,type:0}));return i.type=0,i.uid}function vu(e){const t=[];for(const n of e.getData())n.type===il.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function ku(e){return[...e.invalidLinks,...vu(e.defaultLinkTracker),...cu(e.blockLinkTracker)]}function Su(e,t,n){const r=ku(n).sort((a,o)=>a.link.localeCompare(o.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:vt(n),name:i,createdAt:t,editedAt:t,type:"node"};return tl(n.summary),s.children=r,s}function sl(e){return e===" "||e===" "}function pn(e,t,n=0){return sl(e[t])?pn(e,t+1,n+1):n}function Eu(e,t){let n=t,r=e[t];for(;sl(r);)n--,r=e[n];return n+1}function Kt(e,t,n=0){const r=e[t+n];return ns(r)?t+n:Kt(e,t,n+1)}function al(e,t){const n=e[t-1];return ns(n)}function ns(e){return e===void 0||e===` -`}function ol(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function rs(e,t){let n=!0;const r=t+pn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ol(e,r));const a=Eu(e,r-1)-1,o=e[a];return ns(o)&&n?{type:Ut.BULLET,level:r-a-1}:null}function Du(e,t,n){let r=t+n.level;if(ol(e,r))return r;r+=1+1;const i=pn(e,r);return r+i}function Tu(e,t,n){let r=Kt(e,t+n.level+1+1),i=e[r];for(;;){const s=pn(e,r+1);if(s==n.level+2&&!rs(e,r+1+s))r=Kt(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Ou(e,t){return e+t.level}function Au(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=pn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function ll(e,t){if(!al(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=Kt(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],o=e[i+2];for(;[s,a,o].every(d=>d!==void 0)&&[s,a,o].join("")!=="```";)i++,s=e[i],a=e[i+1],o=e[i+2];if([s,a,o].some(d=>d===void 0))return null;const l=Kt(e,i+3);return e.slice(i+3,l).trim()!==""?null:{type:Ut.CODEBLOCK,level:l-t+(e[l]===` -`?1:0),codeLanguage:r!==""?r:void 0}}return null}function cl(e,t){if(!al(e,t))return null;const n=Ru(e,t);return n>0&&e[t+n]===" "?{type:Ut.HEADING,level:n}:null}function Ru(e,t){let n=t,r=0;for(;e[n]==="#";)n++,r++;return r}function Mu(e,t,n){const r=t+n.level+1,i=pn(e,r);return r+i}function Iu(e,t,n){return Kt(e,t+n.level+1)}function Fu(e,t){let n=Kt(e,t),r=e[n],i=r;for(n++,r=e[n];;){if(r===void 0)return[n];if(r===` +`),t]}function nl(e,t,n,r,i,s){const a=[t],o=[e];for(const l of n){const f=i(l);fu(f,l,a,o,r),s==null||s(f,l)}}function fu(e,t,n,r,i){var o;uu(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(o=a.children)!=null?o:[],a.children.push(e)),n.push(t),r.push(e)}function uu(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function rl(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=rl(n.children,r);if(i)return i}}return null}function hu(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function mu(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const o=t.findData(s);if(o){const l={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};nl(f,l,o,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=rl(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function pu(e,t){const[n,r]=mu(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Lr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let o=a;s.forEach(l=>{o=o.replace(l.old,l.new)}),await t.adapter.appendToPostProcessingFile(i,o)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var il=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(il||{});function _u(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function wu(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function gu(e,t){const n=_u(e);switch(wu(n)){case 0:return xu(n[0],t);case 2:return ou(n,t);case 1:return hu(n,t);default:throw"Invalid link type detected: "+n}}function xu(e,t){return t.defaultLinkTracker.accessAsLink(e,()=>(Lr(t.summary),{uid:t.idGenerator(),obsidianLink:e,type:1})).uid}function yu(e,t,n,r){const[i,s]=du(n);return s?[lu([e,s],t,r),i]:[vt(r),n]}function bu(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,()=>(Lr(n.summary),{uid:n.idGenerator(),obsidianLink:r,type:0}));return i.type=0,i.uid}function vu(e){const t=[];for(const n of e.getData())n.type===il.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function ku(e){return[...e.invalidLinks,...vu(e.defaultLinkTracker),...cu(e.blockLinkTracker)]}function Su(e,t,n){const r=ku(n).sort((a,o)=>a.link.localeCompare(o.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:vt(n),name:i,createdAt:t,editedAt:t,type:"node"};return tl(n.summary),s.children=r,s}function sl(e){return e===" "||e===" "}function jn(e,t){let n=0;for(;sl(e[t+n]);)n++;return n}function Eu(e,t){let n=t,r=e[t];for(;sl(r);)n--,r=e[n];return n+1}function mn(e,t){let n=0;for(;!ns(e[t+n]);)n++;return t+n}function al(e,t){const n=e[t-1];return ns(n)}function ns(e){return e===void 0||e===` +`}function ol(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function rs(e,t){let n=!0;const r=t+jn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ol(e,r));const a=Eu(e,r-1)-1,o=e[a];return ns(o)&&n?{type:Ut.BULLET,level:r-a-1}:null}function Du(e,t,n){let r=t+n.level;if(ol(e,r))return r;r+=1+1;const i=jn(e,r);return r+i}function Tu(e,t,n){let r=mn(e,t+n.level+1+1),i=e[r];for(;;){const s=jn(e,r+1);if(s==n.level+2&&!rs(e,r+1+s))r=mn(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Ou(e,t){return e+t.level}function Au(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=jn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function ll(e,t){if(!al(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=mn(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],o=e[i+2];for(;[s,a,o].every(d=>d!==void 0)&&[s,a,o].join("")!=="```";)i++,s=e[i],a=e[i+1],o=e[i+2];if([s,a,o].some(d=>d===void 0))return null;const l=mn(e,i+3);return e.slice(i+3,l).trim()!==""?null:{type:Ut.CODEBLOCK,level:l-t+(e[l]===` +`?1:0),codeLanguage:r!==""?r:void 0}}return null}function cl(e,t){if(!al(e,t))return null;const n=Ru(e,t);return n>0&&e[t+n]===" "?{type:Ut.HEADING,level:n}:null}function Ru(e,t){let n=t,r=0;for(;e[n]==="#";)n++,r++;return r}function Mu(e,t,n){const r=t+n.level+1,i=jn(e,r);return r+i}function Iu(e,t,n){return mn(e,t+n.level+1)}function Fu(e,t){let n=mn(e,t),r=e[n],i=r;for(n++,r=e[n];;){if(r===void 0)return[n];if(r===` `&&i===` `)return[n-1];{const s=Lu(e,n);if(s)return[n-1,s]}i=r,n++,r=e[n]}}function Lu(e,t){let n=cl(e,t);return n||(n=rs(e,t),n)||(n=ll(e,t),n)?n:null}var Ut=(e=>(e.ROOT="Root",e.HEADING="Heading",e.BULLET="Bullet Node",e.PARAGRAPH="Paragraph",e.CODEBLOCK="Code Block",e))(Ut||{});function Cu(e,t=0){const n=[];for(let r=t;rt in e?uc(e,t,{enumerable:!0,config var ul;function L(){return ul.apply(null,arguments)}function e0(e){ul=e}function rt(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function zt(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function te(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function is(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(te(e,t))return!1;return!0}function Ce(e){return e===void 0}function kt(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Bn(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function hl(e,t){var n=[],r,i=e.length;for(r=0;r>>0,r;for(r=0;r0)for(n=0;n=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var ls=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,fi={},fn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(fn[e]=i),t&&(fn[t[0]]=function(){return dt(i.apply(this,arguments),t[1],t[2])}),n&&(fn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function s0(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function a0(e){var t=e.match(ls),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var o0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function l0(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(ls).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var c0="Invalid date";function d0(){return this._invalidDate}var f0="%d",u0=/\d{1,2}/;function h0(e){return this._ordinal.replace("%d",e)}var m0={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function p0(e,t,n,r){var i=this._relativeTime[n];return ut(i)?i(e,t,n,r):i.replace(/%d/i,e)}function _0(e,t){var n=this._relativeTime[e>0?"future":"past"];return ut(n)?n(t):n.replace(/%s/i,t)}var Mn={};function Ae(e,t){var n=e.toLowerCase();Mn[n]=Mn[n+"s"]=Mn[t]=e}function Ke(e){return typeof e=="string"?Mn[e]||Mn[e.toLowerCase()]:void 0}function cs(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var wl={};function Re(e,t){wl[e]=t}function w0(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:wl[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Nr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function _n(e,t){return function(n){return n!=null?(gl(this,e,n),L.updateOffset(this,t),this):br(this,e)}}function br(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function gl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Nr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),jr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function g0(e){return e=Ke(e),ut(this[e])?this[e]():this}function x0(e,t){if(typeof e=="object"){e=cs(e);var n=w0(e),r,i=n.length;for(r=0;r68?1900:2e3)};var Ol=_n("FullYear",!0);function U0(){return Nr(this.year())}function Y0(e,t,n,r,i,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function Pn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Pn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Al(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),o=1+7*(t-1)+s+a,l,f;return o<=0?(l=e-1,f=In(l)+o):o>In(e)?(l=e+1,f=o-In(e)):(l=e,f=o),{year:l,dayOfYear:f}}function Un(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+bt(a,t,n)):i>bt(e.year(),t,n)?(s=i-bt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function bt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(In(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Ae("week","w");Ae("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Zn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function W0(e){return Un(e,this._week.dow,this._week.doy).week}var H0={dow:0,doy:6};function j0(){return this._week.dow}function B0(){return this._week.doy}function V0(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function G0(e){var t=Un(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Ae("day","d");Ae("weekday","e");Ae("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Zn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Zn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function Z0(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function q0(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function us(e,t){return e.slice(t,7).concat(e.slice(0,t))}var z0="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Rl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$0="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),K0=Gn,X0=Gn,J0=Gn;function Q0(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?us(n,this._week.dow):e?n[e.day()]:n}function eh(e){return e===!0?us(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function th(e){return e===!0?us(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function nh(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ft([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function rh(e,t,n){var r,i,s;if(this._weekdaysParseExact)return nh.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ft([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function ih(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=Z0(e,this.localeData()),this.add(e-t,"d")):t}function sh(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function ah(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=q0(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function oh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=K0),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function lh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=X0),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ch(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=J0),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function hs(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,o,l,f;for(s=0;s<7;s++)a=ft([2e3,1]).day(s),o=je(this.weekdaysMin(a,"")),l=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(o),n.push(l),r.push(f),i.push(o),i.push(l),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ms(){return this.hours()%12||12}function dh(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,ms);H("k",["kk",2],0,dh);H("hmm",0,0,function(){return""+ms.apply(this)+dt(this.minutes(),2)});H("hmmss",0,0,function(){return""+ms.apply(this)+dt(this.minutes(),2)+dt(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+dt(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+dt(this.minutes(),2)+dt(this.seconds(),2)});function Ml(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Ml("a",!0);Ml("A",!1);Ae("hour","h");Re("hour",13);function Il(e,t){return t._meridiemParse}C("a",Il);C("A",Il);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",bl);C("hmmss",vl);C("Hmm",bl);C("Hmmss",vl);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[gt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[gt]=$(e.substr(i))});function fh(e){return(e+"").toLowerCase().charAt(0)==="p"}var uh=/[ap]\.?m?\.?/i,hh=_n("Hours",!0);function mh(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Fl={calendar:r0,longDateFormat:o0,invalidDate:c0,ordinal:f0,dayOfMonthOrdinalParse:u0,relativeTime:m0,months:O0,monthsShort:kl,week:H0,weekdays:z0,weekdaysMin:$0,weekdaysShort:Rl,meridiemParse:uh},de={},Tn={},Yn;function ph(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=Br(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&ph(s,r)>=n-1)break;n--}t++}return Yn}function wh(e){return e.match("^[^/\\\\]*$")!=null}function Br(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&wh(e))try{t=Yn._abbr,n=require,n("./locale/"+e),Pt(t)}catch{de[e]=null}return de[e]}function Pt(e,t){var n;return e&&(Ce(t)?n=St(e):n=ps(e,t),n?Yn=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Yn._abbr}function ps(e,t){if(t!==null){var n,r=Fl;if(t.abbr=e,de[e]!=null)pl("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=Br(t.parentLocale),n!=null)r=n._config;else return Tn[t.parentLocale]||(Tn[t.parentLocale]=[]),Tn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new os(Ci(r,t)),Tn[e]&&Tn[e].forEach(function(i){ps(i.name,i.config)}),Pt(e),de[e]}else return delete de[e],null}function gh(e,t){if(t!=null){var n,r,i=Fl;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Ci(de[e]._config,t)):(r=Br(e),r!=null&&(i=r._config),t=Ci(i,t),r==null&&(t.abbr=e),n=new os(t),n.parentLocale=de[e],de[e]=n),Pt(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Pt()&&Pt(e)):de[e]!=null&&delete de[e]);return de[e]}function St(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Yn;if(!rt(e)){if(t=Br(e),t)return t;e=[e]}return _h(e)}function xh(){return Ni(de)}function _s(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[wt]<0||n[wt]>11?wt:n[ot]<1||n[ot]>jr(n[Oe],n[wt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[gt]!==0||n[qt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[gt]<0||n[gt]>59?gt:n[qt]<0||n[qt]>999?qt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=E0),z(e)._overflowWeekday&&t===-1&&(t=D0),z(e).overflow=t),e}var yh=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,bh=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vh=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ui=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],kh=/^\/?Date\((-?\d+)/i,Sh=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Eh={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Ll(e){var t,n,r=e._i,i=yh.exec(r)||bh.exec(r),s,a,o,l,f=ir.length,d=ui.length;if(i){for(z(e).iso=!0,t=0,n=f;tIn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Pn(a,0,e._dayOfYear),e._a[wt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[gt]===0&&e._a[qt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Pn:Y0).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function Fh(e){var t,n,r,i,s,a,o,l,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=sn(t.GG,e._a[Oe],Un(oe(),1,4).year),r=sn(t.W,1),i=sn(t.E,1),(i<1||i>7)&&(l=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Un(oe(),s,a),n=sn(t.gg,e._a[Oe],f.year),r=sn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>bt(n,s,a)?z(e)._overflowWeeks=!0:l!=null?z(e)._overflowWeekday=!0:(o=Al(n,r,i,s,a),e._a[Oe]=o.year,e._dayOfYear=o.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function gs(e){if(e._f===L.ISO_8601){Ll(e);return}if(e._f===L.RFC_2822){Cl(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,o=t.length,l=0,f,d;for(i=_l(e._f,e._locale).match(ls)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),l+=r.length),fn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),S0(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=o-l,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=Lh(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Oe]=e._locale.erasConvertYear(f,e._a[Oe])),ws(e),_s(e)}function Lh(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Ch(e){var t,n,r,i,s,a,o=!1,l=e._f.length;if(l===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Cr()});function Ul(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function n1(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return as(e,this),e=Nl(e),e._a?(t=e._isUTC?ft(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&qh(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function r1(){return this.isValid()?!this._isUTC:!1}function i1(){return this.isValid()?this._isUTC:!1}function Wl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var s1=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,a1=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:kt(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=s1.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[gt])*i,ms:$(Ui(r[qt]*1e3))*i}):(r=a1.exec(e))?(i=r[1]==="-"?-1:1,n={y:Gt(r[2],i),M:Gt(r[3],i),w:Gt(r[4],i),d:Gt(r[5],i),h:Gt(r[6],i),m:Gt(r[7],i),s:Gt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=o1(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Vr(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Vr.prototype;st.invalid=Zh;function Gt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Na(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function o1(e,t){var n;return e.isValid()&&t.isValid()?(t=ys(t,e),e.isBefore(t)?n=Na(e,t):(n=Na(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Hl(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(pl(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),jl(this,i,e),this}}function jl(e,t,n,r){var i=t._milliseconds,s=Ui(t._days),a=Ui(t._months);!e.isValid()||(r=r==null?!0:r,a&&El(e,br(e,"Month")+a*n),s&&gl(e,"Date",br(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var l1=Hl(1,"add"),c1=Hl(-1,"subtract");function Bl(e){return typeof e=="string"||e instanceof String}function d1(e){return it(e)||Bn(e)||Bl(e)||kt(e)||u1(e)||f1(e)||e===null||e===void 0}function f1(e){var t=zt(e)&&!is(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ut(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function D1(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function T1(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function O1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function A1(e){return this.from(oe(),e)}function R1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function M1(e){return this.to(oe(),e)}function Vl(e){var t;return e===void 0?this._locale._abbr:(t=St(e),t!=null&&(this._locale=t),this)}var Gl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Zl(){return this._locale}var Sr=1e3,un=60*Sr,Er=60*un,ql=(365*400+97)*24*Er;function hn(e,t){return(e%t+t)%t}function zl(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-ql:new Date(e,t,n).valueOf()}function $l(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-ql:Date.UTC(e,t,n)}function I1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?$l:zl,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hn(t+(this._isUTC?0:this.utcOffset()*un),Er);break;case"minute":t=this._d.valueOf(),t-=hn(t,un);break;case"second":t=this._d.valueOf(),t-=hn(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function F1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?$l:zl,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-hn(t+(this._isUTC?0:this.utcOffset()*un),Er)-1;break;case"minute":t=this._d.valueOf(),t+=un-hn(t,un)-1;break;case"second":t=this._d.valueOf(),t+=Sr-hn(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function L1(){return this._d.valueOf()-(this._offset||0)*6e4}function C1(){return Math.floor(this.valueOf()/1e3)}function N1(){return new Date(this.valueOf())}function P1(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function U1(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Y1(){return this.isValid()?this.toISOString():null}function W1(){return ss(this)}function H1(){return Lt({},z(this))}function j1(){return z(this).overflow}function B1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",bs);C("NN",bs);C("NNN",bs);C("NNNN",em);C("NNNNN",tm);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",wn);C("yy",wn);C("yyy",wn);C("yyyy",wn);C("yo",nm);ie(["y","yy","yyy","yyyy"],Oe);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Oe]=n._locale.eraYearOrdinalParse(e,i):t[Oe]=parseInt(e,10)});function V1(e,t){var n,r,i,s=this._eras||St("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function Z1(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function q1(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),cm.call(this,e,t,n,r,i))}function cm(e,t,n,r,i){var s=Al(e,t,n,r,i),a=Pn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Ae("quarter","Q");Re("quarter",7);C("Q",xl);ie("Q",function(e,t){t[wt]=($(e)-1)*3});function dm(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Ae("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var Xl=_n("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Ae("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Ur);C("DDDD",yl);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function fm(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Ae("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var um=_n("Minutes",!1);H("s",["ss",2],0,"second");Ae("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],gt);var hm=_n("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Ae("millisecond","ms");Re("millisecond",16);C("S",Ur,xl);C("SS",Ur,Be);C("SSS",Ur,yl);var Ct,Jl;for(Ct="SSSS";Ct.length<=9;Ct+="S")C(Ct,wn);function mm(e,t){t[qt]=$(("0."+e)*1e3)}for(Ct="S";Ct.length<=9;Ct+="S")ie(Ct,mm);Jl=_n("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function pm(){return this._isUTC?"UTC":""}function _m(){return this._isUTC?"Coordinated Universal Time":""}var M=Vn.prototype;M.add=l1;M.calendar=p1;M.clone=_1;M.diff=k1;M.endOf=F1;M.format=T1;M.from=O1;M.fromNow=A1;M.to=R1;M.toNow=M1;M.get=g0;M.invalidAt=j1;M.isAfter=w1;M.isBefore=g1;M.isBetween=x1;M.isSame=y1;M.isSameOrAfter=b1;M.isSameOrBefore=v1;M.isValid=W1;M.lang=Gl;M.locale=Vl;M.localeData=Zl;M.max=Wh;M.min=Yh;M.parsingFlags=H1;M.set=x0;M.startOf=I1;M.subtract=c1;M.toArray=P1;M.toObject=U1;M.toDate=N1;M.toISOString=E1;M.inspect=D1;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=Y1;M.toString=S1;M.unix=C1;M.valueOf=L1;M.creationData=B1;M.eraName=q1;M.eraNarrow=z1;M.eraAbbr=$1;M.eraYear=K1;M.year=Ol;M.isLeapYear=U0;M.weekYear=rm;M.isoWeekYear=im;M.quarter=M.quarters=dm;M.month=Dl;M.daysInMonth=C0;M.week=M.weeks=V0;M.isoWeek=M.isoWeeks=G0;M.weeksInYear=om;M.weeksInWeekYear=lm;M.isoWeeksInYear=sm;M.isoWeeksInISOWeekYear=am;M.date=Xl;M.day=M.days=ih;M.weekday=sh;M.isoWeekday=ah;M.dayOfYear=fm;M.hour=M.hours=hh;M.minute=M.minutes=um;M.second=M.seconds=hm;M.millisecond=M.milliseconds=Jl;M.utcOffset=$h;M.utc=Xh;M.local=Jh;M.parseZone=Qh;M.hasAlignedHourOffset=e1;M.isDST=t1;M.isLocal=r1;M.isUtcOffset=i1;M.isUtc=Wl;M.isUTC=Wl;M.zoneAbbr=pm;M.zoneName=_m;M.dates=$e("dates accessor is deprecated. Use date instead.",Xl);M.months=$e("months accessor is deprecated. Use month instead",Dl);M.years=$e("years accessor is deprecated. Use year instead",Ol);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Kh);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",n1);function wm(e){return oe(e*1e3)}function gm(){return oe.apply(null,arguments).parseZone()}function Ql(e){return e}var ne=os.prototype;ne.calendar=i0;ne.longDateFormat=l0;ne.invalidDate=d0;ne.ordinal=h0;ne.preparse=Ql;ne.postformat=Ql;ne.relativeTime=p0;ne.pastFuture=_0;ne.set=n0;ne.eras=V1;ne.erasParse=G1;ne.erasConvertYear=Z1;ne.erasAbbrRegex=J1;ne.erasNameRegex=X1;ne.erasNarrowRegex=Q1;ne.months=M0;ne.monthsShort=I0;ne.monthsParse=L0;ne.monthsRegex=P0;ne.monthsShortRegex=N0;ne.week=W0;ne.firstDayOfYear=B0;ne.firstDayOfWeek=j0;ne.weekdays=Q0;ne.weekdaysMin=th;ne.weekdaysShort=eh;ne.weekdaysParse=rh;ne.weekdaysRegex=oh;ne.weekdaysShortRegex=lh;ne.weekdaysMinRegex=ch;ne.isPM=fh;ne.meridiem=mh;function Dr(e,t,n,r){var i=St(),s=ft().set(r,t);return i[n](s,e)}function ec(e,t,n){if(kt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function ks(e,t,n,r){typeof e=="boolean"?(kt(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,kt(t)&&(n=t,t=void 0),t=t||"");var i=St(),s=e?i._week.dow:0,a,o=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)o[a]=Dr(t,(a+s)%7,r,"day");return o}function xm(e,t){return ec(e,t,"months")}function ym(e,t){return ec(e,t,"monthsShort")}function bm(e,t,n){return ks(e,t,n,"weekdays")}function vm(e,t,n){return ks(e,t,n,"weekdaysShort")}function km(e,t,n){return ks(e,t,n,"weekdaysMin")}Pt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Pt);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",St);var pt=Math.abs;function Sm(){var e=this._data;return this._milliseconds=pt(this._milliseconds),this._days=pt(this._days),this._months=pt(this._months),e.milliseconds=pt(e.milliseconds),e.seconds=pt(e.seconds),e.minutes=pt(e.minutes),e.hours=pt(e.hours),e.months=pt(e.months),e.years=pt(e.years),this}function tc(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Em(e,t){return tc(this,e,t,1)}function Dm(e,t){return tc(this,e,t,-1)}function Pa(e){return e<0?Math.floor(e):Math.ceil(e)}function Tm(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,o,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Pa(Wi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),l=Ze(nc(t)),n+=l,t-=Pa(Wi(l)),o=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=o,this}function nc(e){return e*4800/146097}function Wi(e){return e*146097/4800}function Om(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+nc(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Wi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Am(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Et(e){return function(){return this.as(e)}}var Rm=Et("ms"),Mm=Et("s"),Im=Et("m"),Fm=Et("h"),Lm=Et("d"),Cm=Et("w"),Nm=Et("M"),Pm=Et("Q"),Um=Et("y");function Ym(){return st(this)}function Wm(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Xt(e){return function(){return this.isValid()?this._data[e]:NaN}}var Hm=Xt("milliseconds"),jm=Xt("seconds"),Bm=Xt("minutes"),Vm=Xt("hours"),Gm=Xt("days"),Zm=Xt("months"),qm=Xt("years");function zm(){return Ze(this.days()/7)}var _t=Math.round,ln={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function $m(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function Km(e,t,n,r){var i=st(e).abs(),s=_t(i.as("s")),a=_t(i.as("m")),o=_t(i.as("h")),l=_t(i.as("d")),f=_t(i.as("M")),d=_t(i.as("w")),u=_t(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,$m.apply(null,p)}function Xm(e){return e===void 0?_t:typeof e=="function"?(_t=e,!0):!1}function Jm(e,t){return ln[e]===void 0?!1:t===void 0?ln[e]:(ln[e]=t,e==="s"&&(ln.ss=t-1),!0)}function Qm(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ln,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ln,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=Km(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var hi=Math.abs;function nn(e){return(e>0)-(e<0)||+e}function Zr(){if(!this.isValid())return this.localeData().invalidDate();var e=hi(this._milliseconds)/1e3,t=hi(this._days),n=hi(this._months),r,i,s,a,o=this.asSeconds(),l,f,d,u;return o?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",f=nn(this._months)!==nn(o)?"-":"",d=nn(this._days)!==nn(o)?"-":"",u=nn(this._milliseconds)!==nn(o)?"-":"",l+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Vr.prototype;X.isValid=Gh;X.abs=Sm;X.add=Em;X.subtract=Dm;X.as=Om;X.asMilliseconds=Rm;X.asSeconds=Mm;X.asMinutes=Im;X.asHours=Fm;X.asDays=Lm;X.asWeeks=Cm;X.asMonths=Nm;X.asQuarters=Pm;X.asYears=Um;X.valueOf=Am;X._bubble=Tm;X.clone=Ym;X.get=Wm;X.milliseconds=Hm;X.seconds=jm;X.minutes=Bm;X.hours=Vm;X.days=Gm;X.weeks=zm;X.months=Zm;X.years=qm;X.humanize=Qm;X.toISOString=Zr;X.toString=Zr;X.toJSON=Zr;X.locale=Vl;X.localeData=Zl;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zr);X.lang=Gl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Wr);C("X",b0);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js +`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var La={};function pl(e,t){L.deprecationHandler!=null&&L.deprecationHandler(e,t),La[e]||(ml(t),La[e]=!0)}L.suppressDeprecationWarnings=!1;L.deprecationHandler=null;function ut(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function n0(e){var t,n;for(n in e)te(e,n)&&(t=e[n],ut(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Ci(e,t){var n=Lt({},e),r;for(r in t)te(t,r)&&(zt(e[r])&&zt(t[r])?(n[r]={},Lt(n[r],e[r]),Lt(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)te(e,r)&&!te(t,r)&&zt(e[r])&&(n[r]=Lt({},n[r]));return n}function os(e){e!=null&&this.set(e)}var Ni;Object.keys?Ni=Object.keys:Ni=function(e){var t,n=[];for(t in e)te(e,t)&&n.push(t);return n};var r0={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function i0(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return ut(r)?r.call(t,n):r}function dt(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var ls=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,fi={},dn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(dn[e]=i),t&&(dn[t[0]]=function(){return dt(i.apply(this,arguments),t[1],t[2])}),n&&(dn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function s0(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function a0(e){var t=e.match(ls),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var o0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function l0(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(ls).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var c0="Invalid date";function d0(){return this._invalidDate}var f0="%d",u0=/\d{1,2}/;function h0(e){return this._ordinal.replace("%d",e)}var m0={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function p0(e,t,n,r){var i=this._relativeTime[n];return ut(i)?i(e,t,n,r):i.replace(/%d/i,e)}function _0(e,t){var n=this._relativeTime[e>0?"future":"past"];return ut(n)?n(t):n.replace(/%s/i,t)}var Rn={};function Ae(e,t){var n=e.toLowerCase();Rn[n]=Rn[n+"s"]=Rn[t]=e}function Ke(e){return typeof e=="string"?Rn[e]||Rn[e.toLowerCase()]:void 0}function cs(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var wl={};function Re(e,t){wl[e]=t}function w0(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:wl[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Nr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function pn(e,t){return function(n){return n!=null?(gl(this,e,n),L.updateOffset(this,t),this):br(this,e)}}function br(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function gl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Nr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),jr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function g0(e){return e=Ke(e),ut(this[e])?this[e]():this}function x0(e,t){if(typeof e=="object"){e=cs(e);var n=w0(e),r,i=n.length;for(r=0;r68?1900:2e3)};var Ol=pn("FullYear",!0);function U0(){return Nr(this.year())}function Y0(e,t,n,r,i,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function Nn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Nn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Al(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),o=1+7*(t-1)+s+a,l,f;return o<=0?(l=e-1,f=Mn(l)+o):o>Mn(e)?(l=e+1,f=o-Mn(e)):(l=e,f=o),{year:l,dayOfYear:f}}function Pn(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+bt(a,t,n)):i>bt(e.year(),t,n)?(s=i-bt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function bt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(Mn(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Ae("week","w");Ae("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Zn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function W0(e){return Pn(e,this._week.dow,this._week.doy).week}var H0={dow:0,doy:6};function j0(){return this._week.dow}function B0(){return this._week.doy}function V0(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function G0(e){var t=Pn(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Ae("day","d");Ae("weekday","e");Ae("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Zn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Zn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function Z0(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function q0(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function us(e,t){return e.slice(t,7).concat(e.slice(0,t))}var z0="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Rl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$0="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),K0=Gn,X0=Gn,J0=Gn;function Q0(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?us(n,this._week.dow):e?n[e.day()]:n}function eh(e){return e===!0?us(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function th(e){return e===!0?us(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function nh(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ft([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function rh(e,t,n){var r,i,s;if(this._weekdaysParseExact)return nh.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ft([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function ih(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=Z0(e,this.localeData()),this.add(e-t,"d")):t}function sh(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function ah(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=q0(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function oh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=K0),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function lh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=X0),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ch(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=J0),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function hs(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,o,l,f;for(s=0;s<7;s++)a=ft([2e3,1]).day(s),o=je(this.weekdaysMin(a,"")),l=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(o),n.push(l),r.push(f),i.push(o),i.push(l),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ms(){return this.hours()%12||12}function dh(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,ms);H("k",["kk",2],0,dh);H("hmm",0,0,function(){return""+ms.apply(this)+dt(this.minutes(),2)});H("hmmss",0,0,function(){return""+ms.apply(this)+dt(this.minutes(),2)+dt(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+dt(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+dt(this.minutes(),2)+dt(this.seconds(),2)});function Ml(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Ml("a",!0);Ml("A",!1);Ae("hour","h");Re("hour",13);function Il(e,t){return t._meridiemParse}C("a",Il);C("A",Il);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",bl);C("hmmss",vl);C("Hmm",bl);C("Hmmss",vl);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[gt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[gt]=$(e.substr(i))});function fh(e){return(e+"").toLowerCase().charAt(0)==="p"}var uh=/[ap]\.?m?\.?/i,hh=pn("Hours",!0);function mh(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Fl={calendar:r0,longDateFormat:o0,invalidDate:c0,ordinal:f0,dayOfMonthOrdinalParse:u0,relativeTime:m0,months:O0,monthsShort:kl,week:H0,weekdays:z0,weekdaysMin:$0,weekdaysShort:Rl,meridiemParse:uh},de={},Dn={},Un;function ph(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=Br(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&ph(s,r)>=n-1)break;n--}t++}return Un}function wh(e){return e.match("^[^/\\\\]*$")!=null}function Br(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&wh(e))try{t=Un._abbr,n=require,n("./locale/"+e),Pt(t)}catch{de[e]=null}return de[e]}function Pt(e,t){var n;return e&&(Ce(t)?n=St(e):n=ps(e,t),n?Un=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Un._abbr}function ps(e,t){if(t!==null){var n,r=Fl;if(t.abbr=e,de[e]!=null)pl("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=Br(t.parentLocale),n!=null)r=n._config;else return Dn[t.parentLocale]||(Dn[t.parentLocale]=[]),Dn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new os(Ci(r,t)),Dn[e]&&Dn[e].forEach(function(i){ps(i.name,i.config)}),Pt(e),de[e]}else return delete de[e],null}function gh(e,t){if(t!=null){var n,r,i=Fl;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Ci(de[e]._config,t)):(r=Br(e),r!=null&&(i=r._config),t=Ci(i,t),r==null&&(t.abbr=e),n=new os(t),n.parentLocale=de[e],de[e]=n),Pt(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Pt()&&Pt(e)):de[e]!=null&&delete de[e]);return de[e]}function St(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Un;if(!rt(e)){if(t=Br(e),t)return t;e=[e]}return _h(e)}function xh(){return Ni(de)}function _s(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[wt]<0||n[wt]>11?wt:n[ot]<1||n[ot]>jr(n[Oe],n[wt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[gt]!==0||n[qt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[gt]<0||n[gt]>59?gt:n[qt]<0||n[qt]>999?qt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=E0),z(e)._overflowWeekday&&t===-1&&(t=D0),z(e).overflow=t),e}var yh=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,bh=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vh=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ui=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],kh=/^\/?Date\((-?\d+)/i,Sh=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Eh={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Ll(e){var t,n,r=e._i,i=yh.exec(r)||bh.exec(r),s,a,o,l,f=ir.length,d=ui.length;if(i){for(z(e).iso=!0,t=0,n=f;tMn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Nn(a,0,e._dayOfYear),e._a[wt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[gt]===0&&e._a[qt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Nn:Y0).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function Fh(e){var t,n,r,i,s,a,o,l,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=rn(t.GG,e._a[Oe],Pn(oe(),1,4).year),r=rn(t.W,1),i=rn(t.E,1),(i<1||i>7)&&(l=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Pn(oe(),s,a),n=rn(t.gg,e._a[Oe],f.year),r=rn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>bt(n,s,a)?z(e)._overflowWeeks=!0:l!=null?z(e)._overflowWeekday=!0:(o=Al(n,r,i,s,a),e._a[Oe]=o.year,e._dayOfYear=o.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function gs(e){if(e._f===L.ISO_8601){Ll(e);return}if(e._f===L.RFC_2822){Cl(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,o=t.length,l=0,f,d;for(i=_l(e._f,e._locale).match(ls)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),l+=r.length),dn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),S0(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=o-l,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=Lh(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Oe]=e._locale.erasConvertYear(f,e._a[Oe])),ws(e),_s(e)}function Lh(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Ch(e){var t,n,r,i,s,a,o=!1,l=e._f.length;if(l===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Cr()});function Ul(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function n1(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return as(e,this),e=Nl(e),e._a?(t=e._isUTC?ft(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&qh(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function r1(){return this.isValid()?!this._isUTC:!1}function i1(){return this.isValid()?this._isUTC:!1}function Wl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var s1=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,a1=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:kt(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=s1.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[gt])*i,ms:$(Ui(r[qt]*1e3))*i}):(r=a1.exec(e))?(i=r[1]==="-"?-1:1,n={y:Gt(r[2],i),M:Gt(r[3],i),w:Gt(r[4],i),d:Gt(r[5],i),h:Gt(r[6],i),m:Gt(r[7],i),s:Gt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=o1(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Vr(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Vr.prototype;st.invalid=Zh;function Gt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Na(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function o1(e,t){var n;return e.isValid()&&t.isValid()?(t=ys(t,e),e.isBefore(t)?n=Na(e,t):(n=Na(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Hl(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(pl(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),jl(this,i,e),this}}function jl(e,t,n,r){var i=t._milliseconds,s=Ui(t._days),a=Ui(t._months);!e.isValid()||(r=r==null?!0:r,a&&El(e,br(e,"Month")+a*n),s&&gl(e,"Date",br(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var l1=Hl(1,"add"),c1=Hl(-1,"subtract");function Bl(e){return typeof e=="string"||e instanceof String}function d1(e){return it(e)||Bn(e)||Bl(e)||kt(e)||u1(e)||f1(e)||e===null||e===void 0}function f1(e){var t=zt(e)&&!is(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ut(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function D1(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function T1(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function O1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function A1(e){return this.from(oe(),e)}function R1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function M1(e){return this.to(oe(),e)}function Vl(e){var t;return e===void 0?this._locale._abbr:(t=St(e),t!=null&&(this._locale=t),this)}var Gl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Zl(){return this._locale}var Sr=1e3,fn=60*Sr,Er=60*fn,ql=(365*400+97)*24*Er;function un(e,t){return(e%t+t)%t}function zl(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-ql:new Date(e,t,n).valueOf()}function $l(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-ql:Date.UTC(e,t,n)}function I1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?$l:zl,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=un(t+(this._isUTC?0:this.utcOffset()*fn),Er);break;case"minute":t=this._d.valueOf(),t-=un(t,fn);break;case"second":t=this._d.valueOf(),t-=un(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function F1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?$l:zl,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-un(t+(this._isUTC?0:this.utcOffset()*fn),Er)-1;break;case"minute":t=this._d.valueOf(),t+=fn-un(t,fn)-1;break;case"second":t=this._d.valueOf(),t+=Sr-un(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function L1(){return this._d.valueOf()-(this._offset||0)*6e4}function C1(){return Math.floor(this.valueOf()/1e3)}function N1(){return new Date(this.valueOf())}function P1(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function U1(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Y1(){return this.isValid()?this.toISOString():null}function W1(){return ss(this)}function H1(){return Lt({},z(this))}function j1(){return z(this).overflow}function B1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",bs);C("NN",bs);C("NNN",bs);C("NNNN",em);C("NNNNN",tm);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",_n);C("yy",_n);C("yyy",_n);C("yyyy",_n);C("yo",nm);ie(["y","yy","yyy","yyyy"],Oe);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Oe]=n._locale.eraYearOrdinalParse(e,i):t[Oe]=parseInt(e,10)});function V1(e,t){var n,r,i,s=this._eras||St("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function Z1(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function q1(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),cm.call(this,e,t,n,r,i))}function cm(e,t,n,r,i){var s=Al(e,t,n,r,i),a=Nn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Ae("quarter","Q");Re("quarter",7);C("Q",xl);ie("Q",function(e,t){t[wt]=($(e)-1)*3});function dm(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Ae("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var Xl=pn("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Ae("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Ur);C("DDDD",yl);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function fm(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Ae("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var um=pn("Minutes",!1);H("s",["ss",2],0,"second");Ae("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],gt);var hm=pn("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Ae("millisecond","ms");Re("millisecond",16);C("S",Ur,xl);C("SS",Ur,Be);C("SSS",Ur,yl);var Ct,Jl;for(Ct="SSSS";Ct.length<=9;Ct+="S")C(Ct,_n);function mm(e,t){t[qt]=$(("0."+e)*1e3)}for(Ct="S";Ct.length<=9;Ct+="S")ie(Ct,mm);Jl=pn("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function pm(){return this._isUTC?"UTC":""}function _m(){return this._isUTC?"Coordinated Universal Time":""}var M=Vn.prototype;M.add=l1;M.calendar=p1;M.clone=_1;M.diff=k1;M.endOf=F1;M.format=T1;M.from=O1;M.fromNow=A1;M.to=R1;M.toNow=M1;M.get=g0;M.invalidAt=j1;M.isAfter=w1;M.isBefore=g1;M.isBetween=x1;M.isSame=y1;M.isSameOrAfter=b1;M.isSameOrBefore=v1;M.isValid=W1;M.lang=Gl;M.locale=Vl;M.localeData=Zl;M.max=Wh;M.min=Yh;M.parsingFlags=H1;M.set=x0;M.startOf=I1;M.subtract=c1;M.toArray=P1;M.toObject=U1;M.toDate=N1;M.toISOString=E1;M.inspect=D1;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=Y1;M.toString=S1;M.unix=C1;M.valueOf=L1;M.creationData=B1;M.eraName=q1;M.eraNarrow=z1;M.eraAbbr=$1;M.eraYear=K1;M.year=Ol;M.isLeapYear=U0;M.weekYear=rm;M.isoWeekYear=im;M.quarter=M.quarters=dm;M.month=Dl;M.daysInMonth=C0;M.week=M.weeks=V0;M.isoWeek=M.isoWeeks=G0;M.weeksInYear=om;M.weeksInWeekYear=lm;M.isoWeeksInYear=sm;M.isoWeeksInISOWeekYear=am;M.date=Xl;M.day=M.days=ih;M.weekday=sh;M.isoWeekday=ah;M.dayOfYear=fm;M.hour=M.hours=hh;M.minute=M.minutes=um;M.second=M.seconds=hm;M.millisecond=M.milliseconds=Jl;M.utcOffset=$h;M.utc=Xh;M.local=Jh;M.parseZone=Qh;M.hasAlignedHourOffset=e1;M.isDST=t1;M.isLocal=r1;M.isUtcOffset=i1;M.isUtc=Wl;M.isUTC=Wl;M.zoneAbbr=pm;M.zoneName=_m;M.dates=$e("dates accessor is deprecated. Use date instead.",Xl);M.months=$e("months accessor is deprecated. Use month instead",Dl);M.years=$e("years accessor is deprecated. Use year instead",Ol);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Kh);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",n1);function wm(e){return oe(e*1e3)}function gm(){return oe.apply(null,arguments).parseZone()}function Ql(e){return e}var ne=os.prototype;ne.calendar=i0;ne.longDateFormat=l0;ne.invalidDate=d0;ne.ordinal=h0;ne.preparse=Ql;ne.postformat=Ql;ne.relativeTime=p0;ne.pastFuture=_0;ne.set=n0;ne.eras=V1;ne.erasParse=G1;ne.erasConvertYear=Z1;ne.erasAbbrRegex=J1;ne.erasNameRegex=X1;ne.erasNarrowRegex=Q1;ne.months=M0;ne.monthsShort=I0;ne.monthsParse=L0;ne.monthsRegex=P0;ne.monthsShortRegex=N0;ne.week=W0;ne.firstDayOfYear=B0;ne.firstDayOfWeek=j0;ne.weekdays=Q0;ne.weekdaysMin=th;ne.weekdaysShort=eh;ne.weekdaysParse=rh;ne.weekdaysRegex=oh;ne.weekdaysShortRegex=lh;ne.weekdaysMinRegex=ch;ne.isPM=fh;ne.meridiem=mh;function Dr(e,t,n,r){var i=St(),s=ft().set(r,t);return i[n](s,e)}function ec(e,t,n){if(kt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function ks(e,t,n,r){typeof e=="boolean"?(kt(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,kt(t)&&(n=t,t=void 0),t=t||"");var i=St(),s=e?i._week.dow:0,a,o=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)o[a]=Dr(t,(a+s)%7,r,"day");return o}function xm(e,t){return ec(e,t,"months")}function ym(e,t){return ec(e,t,"monthsShort")}function bm(e,t,n){return ks(e,t,n,"weekdays")}function vm(e,t,n){return ks(e,t,n,"weekdaysShort")}function km(e,t,n){return ks(e,t,n,"weekdaysMin")}Pt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Pt);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",St);var pt=Math.abs;function Sm(){var e=this._data;return this._milliseconds=pt(this._milliseconds),this._days=pt(this._days),this._months=pt(this._months),e.milliseconds=pt(e.milliseconds),e.seconds=pt(e.seconds),e.minutes=pt(e.minutes),e.hours=pt(e.hours),e.months=pt(e.months),e.years=pt(e.years),this}function tc(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Em(e,t){return tc(this,e,t,1)}function Dm(e,t){return tc(this,e,t,-1)}function Pa(e){return e<0?Math.floor(e):Math.ceil(e)}function Tm(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,o,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Pa(Wi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),l=Ze(nc(t)),n+=l,t-=Pa(Wi(l)),o=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=o,this}function nc(e){return e*4800/146097}function Wi(e){return e*146097/4800}function Om(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+nc(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Wi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Am(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Et(e){return function(){return this.as(e)}}var Rm=Et("ms"),Mm=Et("s"),Im=Et("m"),Fm=Et("h"),Lm=Et("d"),Cm=Et("w"),Nm=Et("M"),Pm=Et("Q"),Um=Et("y");function Ym(){return st(this)}function Wm(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Kt(e){return function(){return this.isValid()?this._data[e]:NaN}}var Hm=Kt("milliseconds"),jm=Kt("seconds"),Bm=Kt("minutes"),Vm=Kt("hours"),Gm=Kt("days"),Zm=Kt("months"),qm=Kt("years");function zm(){return Ze(this.days()/7)}var _t=Math.round,on={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function $m(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function Km(e,t,n,r){var i=st(e).abs(),s=_t(i.as("s")),a=_t(i.as("m")),o=_t(i.as("h")),l=_t(i.as("d")),f=_t(i.as("M")),d=_t(i.as("w")),u=_t(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,$m.apply(null,p)}function Xm(e){return e===void 0?_t:typeof e=="function"?(_t=e,!0):!1}function Jm(e,t){return on[e]===void 0?!1:t===void 0?on[e]:(on[e]=t,e==="s"&&(on.ss=t-1),!0)}function Qm(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=on,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},on,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=Km(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var hi=Math.abs;function tn(e){return(e>0)-(e<0)||+e}function Zr(){if(!this.isValid())return this.localeData().invalidDate();var e=hi(this._milliseconds)/1e3,t=hi(this._days),n=hi(this._months),r,i,s,a,o=this.asSeconds(),l,f,d,u;return o?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",f=tn(this._months)!==tn(o)?"-":"",d=tn(this._days)!==tn(o)?"-":"",u=tn(this._milliseconds)!==tn(o)?"-":"",l+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Vr.prototype;X.isValid=Gh;X.abs=Sm;X.add=Em;X.subtract=Dm;X.as=Om;X.asMilliseconds=Rm;X.asSeconds=Mm;X.asMinutes=Im;X.asHours=Fm;X.asDays=Lm;X.asWeeks=Cm;X.asMonths=Nm;X.asQuarters=Pm;X.asYears=Um;X.valueOf=Am;X._bubble=Tm;X.clone=Ym;X.get=Wm;X.milliseconds=Hm;X.seconds=jm;X.minutes=Bm;X.hours=Vm;X.days=Gm;X.weeks=zm;X.months=Zm;X.years=qm;X.humanize=Qm;X.toISOString=Zr;X.toString=Zr;X.toJSON=Zr;X.locale=Vl;X.localeData=Zl;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zr);X.lang=Gl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Wr);C("X",b0);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js L.version="2.29.4";e0(oe);L.fn=M;L.min=Hh;L.max=jh;L.now=Bh;L.utc=ft;L.unix=wm;L.months=xm;L.isDate=Bn;L.locale=Pt;L.invalid=Cr;L.duration=st;L.isMoment=it;L.weekdays=bm;L.parseZone=gm;L.localeData=St;L.isDuration=dr;L.monthsShort=ym;L.weekdaysMin=km;L.defineLocale=ps;L.updateLocale=gh;L.locales=xh;L.weekdaysShort=vm;L.normalizeUnits=Ke;L.relativeTimeRounding=Xm;L.relativeTimeThreshold=Jm;L.calendarFormat=m1;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function ep(e,t,n){let r;return e.values&&e.values.length>0&&(r=e.values.map(i=>({uid:vt(n),name:i,type:"node",createdAt:t,editedAt:t}))),tp(e.key,n.attributes),n.summary.fields++,{uid:vt(n),name:e.key,type:"field",createdAt:t,editedAt:t,children:r}}function tp(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function np(e,t,n,r,i=Date.now()){var p;const[s,a]=(p=Ju(n))!=null?p:[[],0];let o=Cu(n,a),l=e;const f=o[0]&&o[0].content.match(/^title::(.+)$/);f&&(l=f[1],o=o.slice(1)),o[0]&&o[0].content.replace(/^#+/,"").trim()===l.trim()&&(o=o.slice(1));const d=[],u=rp(l,t,i,r,s);return nl(u,{type:Ut.ROOT,level:-1},o,Yu,w=>Xu(e,t,w,i,r),(w,v)=>{v.type===Ut.HEADING&&d.push({...v,uid:w.uid})}),o=null,r.headingTracker.pathMap.set(t,d),r.headingTracker.nameMap.get(e)||r.headingTracker.nameMap.set(e,d),u}function rp(e,t,n,r,i){let s;const a=[];i.forEach(d=>{d.key==="tags"?s=dl(d.values,r.superTagTracker,r.idGenerator):a.push(ep(d,n,r))});let o=bu(e,t,r),l="node";const f=ip(e,r.dailyNoteFormat);return f&&(o=f,l="date",e=f,r.summary.calendarNodes++),{uid:o,name:e,createdAt:n,editedAt:n,type:l,supertags:s,children:a.length>0?a:void 0}}function ip(e,t){const n=L(e,t,!0);return n.isValid()?n.format("MM-DD-YYYY"):null}function Ua(e,t){return e===t.length-1?"LAST":"NOT_LAST"}function sp(e,t){return e.adapter.readDirectory(t).filter(n=>{const r=t+Fr+n.getName();return n.isDirectory()&&!r.endsWith(".github")&&!r.endsWith(".obsidian")||!n.isDirectory()&&r.endsWith(".md")}).sort((n,r)=>Number(n.isDirectory())-Number(r.isDirectory()))}async function rc(e,t,n,r,i,s="LAST"){n(t);const a=sp(e,t);for(let o=0;o{const i=Ir(r),s=vt(n);n.adapter.appendToResultFile(e,`{ "uid": "${s}", "name": "${i}", @@ -46,4 +46,4 @@ L.version="2.29.4";e0(oe);L.fn=M;L.min=Hh;L.max=jh;L.now=Bh;L.utc=ft;L.unix=wm;L Please check the text at the top again.`,document.body.appendChild(o)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack): `+i,document.body.appendChild(a)}}); -//# sourceMappingURL=index.17b16c1c.js.map +//# sourceMappingURL=index.3adbdeaf.js.map diff --git a/docs/assets/index.17b16c1c.js.map b/docs/assets/index.3adbdeaf.js.map similarity index 50% rename from docs/assets/index.17b16c1c.js.map rename to docs/assets/index.3adbdeaf.js.map index 84e17ac..41edf87 100644 --- a/docs/assets/index.17b16c1c.js.map +++ b/docs/assets/index.3adbdeaf.js.map @@ -1 +1 @@ -{"version":3,"file":"index.17b16c1c.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: () => Data) {\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData();\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: () => Data) {\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData();\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(fileName, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(fileName, filePath, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n //20 secs!\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(obsidianLink, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n });\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(obsidianLink, filePath, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n });\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number, count = 0): number {\n //we count tab as one empty space\n if (!isEmptySpace(content[curPosition])) {\n return count;\n }\n return countEmptySpace(content, curPosition + 1, count + 1);\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number, count = 0): number {\n const curChar = content[curPosition + count];\n if (isNewLine(curChar)) {\n return curPosition + count;\n }\n return nextNewLine(content, curPosition, count + 1);\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: tags are too naive! ()\nexport function detectTags(content: string) {\n return content.match(tagRegex);\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { Hierarchy, HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchy: Hierarchy): [string, 'todo' | 'done'] | null {\n if (hierarchy.type === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags } from '../markdown/tags';\nimport { handleImages } from '../tanafeatures/imageNodes';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode, requestUidForLink } from '../links/internalLinks';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\n//30 sec\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n //1 sec\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const tanaNode: TanaIntermediateNode = {\n uid,\n name: content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n\n const [updatedContent, todoState] = removeTodo(content, obsidianNode) ?? [content, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tag without losing meaning because it will show up as a super tag anyways\n const lastTag = tags[tags.length - 1];\n if (tanaNode.name.endsWith(lastTag)) {\n tanaNode.name = tanaNode.name.slice(0, -lastTag.length);\n }\n\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n const foundUIDs = getBracketLinks(tanaNode.name, true)\n .filter((bracketLink) => bracketLink.trim() !== '')\n .map((bracketLink) => {\n //handling aliases\n const aliasArr = bracketLink.split('|');\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [bracketLink, foundUid, result];\n });\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n\n handleImages(tanaNode, today, context);\n\n return tanaNode;\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import { TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function frontMatterToFieldNode(\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n let children: TanaIntermediateNode[] | undefined;\n\n if (data.values && data.values.length > 0) {\n children = data.values.map((value) => ({\n uid: untrackedUidRequest(context),\n name: value,\n type: 'node',\n createdAt: today,\n editedAt: today,\n }));\n }\n addAttribute(data.key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: untrackedUidRequest(context),\n name: data.key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children,\n };\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport moment from 'moment';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n let nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeUid = dateDisplayName;\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n\nfunction dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return null;\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","dailyNoteFormat","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","cleanUpLink","detectLinkType","requestUidForLink","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","pos","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","detectTags","cleanUpTag","tag","superTagUidRequests","tags","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","tanaNode","image","childImageNodes","oldLink","convertCodeBlock","convertMarkdownNode","updatedContent","todoState","lastTag","foundUIDs","bracketLink","aliasArr","alias","foundUid","refSet","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","frontMatterToFieldNode","addAttribute","attributes","foundAttr","attr","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","displayName","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","dateStringToDateUID","moment","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAAU,YAAc,OAExBA,EAAU,YAAc,cACrBA,CACV,CACD,SAASN,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Ac,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file +{"version":3,"file":"index.3adbdeaf.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: () => Data) {\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData();\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: () => Data) {\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData();\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(fileName, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(fileName, filePath, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n //20 secs!\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(obsidianLink, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n });\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(obsidianLink, filePath, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n });\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: tags are too naive! ()\nexport function detectTags(content: string) {\n return content.match(tagRegex);\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { Hierarchy, HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchy: Hierarchy): [string, 'todo' | 'done'] | null {\n if (hierarchy.type === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags } from '../markdown/tags';\nimport { handleImages } from '../tanafeatures/imageNodes';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode, requestUidForLink } from '../links/internalLinks';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\n//30 sec\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n //1 sec\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const tanaNode: TanaIntermediateNode = {\n uid,\n name: content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n\n const [updatedContent, todoState] = removeTodo(content, obsidianNode) ?? [content, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tag without losing meaning because it will show up as a super tag anyways\n const lastTag = tags[tags.length - 1];\n if (tanaNode.name.endsWith(lastTag)) {\n tanaNode.name = tanaNode.name.slice(0, -lastTag.length);\n }\n\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n const foundUIDs = getBracketLinks(tanaNode.name, true)\n .filter((bracketLink) => bracketLink.trim() !== '')\n .map((bracketLink) => {\n //handling aliases\n const aliasArr = bracketLink.split('|');\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [bracketLink, foundUid, result];\n });\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n\n handleImages(tanaNode, today, context);\n\n return tanaNode;\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import { TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function frontMatterToFieldNode(\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n let children: TanaIntermediateNode[] | undefined;\n\n if (data.values && data.values.length > 0) {\n children = data.values.map((value) => ({\n uid: untrackedUidRequest(context),\n name: value,\n type: 'node',\n createdAt: today,\n editedAt: today,\n }));\n }\n addAttribute(data.key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: untrackedUidRequest(context),\n name: data.key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children,\n };\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport moment from 'moment';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n let nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeUid = dateDisplayName;\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n\nfunction dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return null;\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","dailyNoteFormat","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","cleanUpLink","detectLinkType","requestUidForLink","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","pos","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","detectTags","cleanUpTag","tag","superTagUidRequests","tags","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","tanaNode","image","childImageNodes","oldLink","convertCodeBlock","convertMarkdownNode","updatedContent","todoState","lastTag","foundUIDs","bracketLink","aliasArr","alias","foundUid","refSet","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","frontMatterToFieldNode","addAttribute","attributes","foundAttr","attr","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","displayName","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","dateStringToDateUID","moment","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,Y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AC,EAChD,MAAA+zC,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index c25c41a..57a6a35 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

From c21fd7c85f35bddbe9fbab1d187a4c3aee31ee55 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 17 Oct 2022 22:37:14 +0200 Subject: [PATCH 78/94] Obsidian: added basic dataview attribute support --- .../{index.3adbdeaf.js => index.2b2a3e87.js} | 42 +++++++-------- docs/assets/index.2b2a3e87.js.map | 1 + docs/assets/index.3adbdeaf.js.map | 1 - docs/index.html | 2 +- .../obsidian/hierarchy/dataviewattributes.ts | 34 ++++++++++++ .../obsidian/hierarchy/markdownNodes.ts | 24 +++++++++ .../obsidian/hierarchy/paragraphs.ts | 6 +++ .../obsidian/links/internalLinks.ts | 20 ++++++- .../obsidian/tanaconversion/nodeConversion.ts | 42 ++++++++------- .../obsidian/tanafeatures/fields.ts | 46 ++++++++++------ .../obsidian/tests/fixtures/full.tif.json | 51 ++++++++++++------ .../obsidian/tests/fixtures/vault.zip | Bin 2900 -> 2922 bytes .../tests/fixtures/vault/folder/test.md | 4 ++ 13 files changed, 198 insertions(+), 75 deletions(-) rename docs/assets/{index.3adbdeaf.js => index.2b2a3e87.js} (65%) create mode 100644 docs/assets/index.2b2a3e87.js.map delete mode 100644 docs/assets/index.3adbdeaf.js.map create mode 100644 src/converters/obsidian/hierarchy/dataviewattributes.ts diff --git a/docs/assets/index.3adbdeaf.js b/docs/assets/index.2b2a3e87.js similarity index 65% rename from docs/assets/index.3adbdeaf.js rename to docs/assets/index.2b2a3e87.js index ab98988..ce83b58 100644 --- a/docs/assets/index.3adbdeaf.js +++ b/docs/assets/index.2b2a3e87.js @@ -1,49 +1,49 @@ -var uc=Object.defineProperty;var hc=(e,t,n)=>t in e?uc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var jt=(e,t,n)=>(hc(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const In=15,mi=30,pi=19,mc=29,ur=256,Hi=ur+1+mc,Ms=2*Hi+1,yn=256,pc=7,Is=16,Fs=17,Ls=18,$r=8*2,hr=-1,_c=1,qn=2,wc=0,nn=0,Cs=1,gc=3,Le=4,Qe=0,Ya=1,zn=2,et=-2,xc=-3,Jt=-5;function Tr(e){return Or(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function Or(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?Or(n):n),[])}const Ns=[0,1,2,3].concat(...Tr([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function se(){const e=this;function t(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,f=e.stat_desc.max_length;let d,u,p,w,v,h,c=0;for(w=0;w<=In;w++)i.bl_count[w]=0;for(s[i.heap[i.heap_max]*2+1]=0,d=i.heap_max+1;df&&(w=f,c++),s[u*2+1]=w,!(u>e.max_code)&&(i.bl_count[w]++,v=0,u>=l&&(v=o[u-l]),h=s[u*2],i.opt_len+=h*(w+v),a&&(i.static_len+=h*(a[u*2+1]+v)));if(c!==0){do{for(w=f-1;i.bl_count[w]===0;)w--;i.bl_count[w]--,i.bl_count[w+1]+=2,i.bl_count[f]--,c-=2}while(c>0);for(w=f;w!==0;w--)for(u=i.bl_count[w];u!==0;)p=i.heap[--d],!(p>e.max_code)&&(s[p*2+1]!=w&&(i.opt_len+=(w-s[p*2+1])*s[p*2],s[p*2+1]=w),u--)}}function n(i,s){let a=0;do a|=i&1,i>>>=1,a<<=1;while(--s>0);return a>>>1}function r(i,s,a){const o=[];let l=0,f,d,u;for(f=1;f<=In;f++)o[f]=l=l+a[f-1]<<1;for(d=0;d<=s;d++)u=i[d*2+1],u!==0&&(i[d*2]=n(o[u]++,u))}e.build_tree=function(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.elems;let l,f,d=-1,u;for(i.heap_len=0,i.heap_max=Ms,l=0;l=1;l--)i.pqdownheap(s,l);u=o;do l=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(s,1),f=i.heap[1],i.heap[--i.heap_max]=l,i.heap[--i.heap_max]=f,s[u*2]=s[l*2]+s[f*2],i.depth[u]=Math.max(i.depth[l],i.depth[f])+1,s[l*2+1]=s[f*2+1]=u,i.heap[1]=u++,i.pqdownheap(s,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],t(i),r(s,e.max_code,i.bl_count)}}se._length_code=[0,1,2,3,4,5,6,7].concat(...Tr([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));se.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];se.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];se.d_code=function(e){return e<256?Ns[e]:Ns[256+(e>>>7)]};se.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];se.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];se.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];se.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function De(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}const yc=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],bc=Tr([[144,8],[112,9],[24,7],[8,8]]);De.static_ltree=Or(yc.map((e,t)=>[e,bc[t]]));const vc=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],kc=Tr([[30,5]]);De.static_dtree=Or(vc.map((e,t)=>[e,kc[t]]));De.static_l_desc=new De(De.static_ltree,se.extra_lbits,ur+1,Hi,In);De.static_d_desc=new De(De.static_dtree,se.extra_dbits,0,mi,In);De.static_bl_desc=new De(null,se.extra_blbits,0,pi,pc);const Sc=9,Ec=8;function at(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const Wa=0,sr=1,Zt=2,Je=[new at(0,0,0,0,Wa),new at(4,4,8,4,sr),new at(4,5,16,8,sr),new at(4,6,32,32,sr),new at(4,4,16,16,Zt),new at(8,16,32,32,Zt),new at(8,16,128,128,Zt),new at(8,32,128,256,Zt),new at(32,128,258,1024,Zt),new at(32,258,258,4096,Zt)],$n=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ge=0,Kn=1,bn=2,Xn=3,Dc=32,Kr=42,Jn=113,vn=666,Xr=8,Tc=0,Jr=1,Oc=2,ce=3,ar=258,Ye=ar+ce+1;function Ps(e,t,n,r){const i=e[t*2],s=e[n*2];return i=3&&j[se.bl_order[T]*2+1]===0;T--);return e.opt_len+=3*(T+1)+5+5+4,T}function Ve(T){e.pending_buf[e.pending++]=T}function Tt(T){Ve(T&255),Ve(T>>>8&255)}function gn(T){Ve(T>>8&255),Ve(T&255&255)}function Ee(T,R){let A;const I=R;ge>$r-I?(A=T,ue|=A<>>$r-ge,ge+=I-$r):(ue|=T<=8&&(Ve(ue&255),ue>>>=8,ge-=8)}function sc(){Ee(Jr<<1,3),Ue(yn,De.static_ltree),Ss(),1+Se+10-ge<9&&(Ee(Jr<<1,3),Ue(yn,De.static_ltree),Ss()),Se=7}function xn(T,R){let A,I,P;if(e.dist_buf[V]=T,e.lc_buf[V]=R&255,V++,T===0?N[R*2]++:(Z++,T--,N[(se._length_code[R]+ur+1)*2]++,Y[se.d_code(T)*2]++),(V&8191)===0&&O>2){for(A=V*8,I=g-m,P=0;P>>=3,Z8?Tt(ue):ge>0&&Ve(ue&255),ue=0,ge=0}function ac(T,R,A){Ds(),Se=8,A&&(Tt(R),Tt(~R)),e.pending_buf.set(l.subarray(T,T+R),e.pending),e.pending+=R}function Ts(T,R,A){Ee((Tc<<1)+(A?1:0),3),ac(T,R,!0)}function oc(T,R,A){let I,P,G=0;O>0?(q.build_tree(e),we.build_tree(e),G=wn(),I=e.opt_len+3+7>>>3,P=e.static_len+3+7>>>3,P<=I&&(I=P)):I=P=R+5,R+4<=I&&T!=-1?Ts(T,R,A):P==I?(Ee((Jr<<1)+(A?1:0),3),Es(De.static_ltree,De.static_dtree)):(Ee((Oc<<1)+(A?1:0),3),ic(q.max_code+1,we.max_code+1,G+1),Es(N,Y)),Dt(),A&&Ds()}function Ot(T){oc(m>=0?m:-1,g-m,T),m=g,t.flush_pending()}function qr(){let T,R,A,I;do{if(I=f-x-g,I===0&&g===0&&x===0)I=s;else if(I==-1)I--;else if(g>=s+s-Ye){l.set(l.subarray(s,s+s),0),y-=s,g-=s,m-=s,T=w,A=T;do R=u[--A]&65535,u[A]=R>=s?R-s:0;while(--T!==0);T=s,A=T;do R=d[--A]&65535,d[A]=R>=s?R-s:0;while(--T!==0);I+=s}if(t.avail_in===0)return;T=t.read_buf(l,g+x,I),x+=T,x>=ce&&(p=l[g]&255,p=(p<r-5&&(R=r-5);;){if(x<=1){if(qr(),x===0&&T==nn)return Ge;if(x===0)break}if(g+=x,x=0,A=m+R,(g===0||g>=A)&&(x=g-A,g=A,Ot(!1),t.avail_out===0)||g-m>=s-Ye&&(Ot(!1),t.avail_out===0))return Ge}return Ot(T==Le),t.avail_out===0?T==Le?bn:Ge:T==Le?Xn:Kn}function Os(T){let R=S,A=g,I,P,G=D;const K=g>s-Ye?g-(s-Ye):0;let Me=B;const Xe=o,zr=g+ar;let As=l[A+G-1],Rs=l[A+G];D>=F&&(R>>=2),Me>x&&(Me=x);do if(I=T,!(l[I+G]!=Rs||l[I+G-1]!=As||l[I]!=l[A]||l[++I]!=l[A+1])){A+=2,I++;do;while(l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&l[++A]==l[++I]&&AG){if(y=T,G=P,P>=Me)break;As=l[A+G-1],Rs=l[A+G]}}while((T=d[T&Xe]&65535)>K&&--R!==0);return G<=x?G:x}function cc(T){let R=0,A;for(;;){if(x=ce&&(p=(p<=ce)if(A=xn(g-y,_-ce),x-=_,_<=E&&x>=ce){_--;do g++,p=(p<=ce&&(p=(p<4096)&&(_=ce-1)),D>=ce&&_<=D){I=g+x-ce,A=xn(g-1-b,D-ce),x-=D-1,D-=2;do++g<=I&&(p=(p<Sc||I!=Xr||A<9||A>15||R<0||R>9||G<0||G>qn?et:(T.dstate=e,a=A,s=1<9||A<0||A>qn?et:(Je[O].func!=Je[R].func&&T.total_in!==0&&(I=T.deflate(Cs)),O!=R&&(O=R,E=Je[O].max_lazy,F=Je[O].good_length,B=Je[O].nice_length,S=Je[O].max_chain),U=A,I)},e.deflateSetDictionary=function(T,R,A){let I=A,P,G=0;if(!R||n!=Kr)return et;if(Is-Ye&&(I=s-Ye,G=A-I),l.set(R.subarray(G,G+I),0),g=I,m=I,p=l[0]&255,p=(p<Le||R<0)return et;if(!T.next_out||!T.next_in&&T.avail_in!==0||n==vn&&R!=Le)return T.msg=$n[zn-et],et;if(T.avail_out===0)return T.msg=$n[zn-Jt],Jt;if(t=T,G=i,i=R,n==Kr&&(I=Xr+(a-8<<4)<<8,P=(O-1&255)>>1,P>3&&(P=3),I|=P<<6,g!==0&&(I|=Dc),I+=31-I%31,n=Jn,gn(I)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,Qe}else if(t.avail_in===0&&R<=G&&R!=Le)return t.msg=$n[zn-Jt],Jt;if(n==vn&&t.avail_in!==0)return T.msg=$n[zn-Jt],Jt;if(t.avail_in!==0||x!==0||R!=nn&&n!=vn){switch(K=-1,Je[O].func){case Wa:K=lc(R);break;case sr:K=cc(R);break;case Zt:K=dc(R);break}if((K==bn||K==Xn)&&(n=vn),K==Ge||K==bn)return t.avail_out===0&&(i=-1),Qe;if(K==Kn){if(R==Cs)sc();else if(Ts(0,0,!1),R==gc)for(A=0;An&&(i=n),i===0?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Rc(e){const t=this,n=new Ha,r=Mc(e&&e.chunkSize?e.chunkSize:64*1024),i=nn,s=new Uint8Array(r);let a=e?e.level:hr;typeof a>"u"&&(a=hr),n.deflateInit(a),n.next_out=s,t.append=function(o,l){let f,d,u=0,p=0,w=0;const v=[];if(!!o.length){n.next_in_index=0,n.next_in=o,n.avail_in=o.length;do{if(n.next_out_index=0,n.avail_out=r,f=n.deflate(i),f!=Qe)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?v.push(new Uint8Array(s)):v.push(s.slice(0,n.next_out_index))),w+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=u&&(l(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return v.length>1?(d=new Uint8Array(w),v.forEach(function(h){d.set(h,p),p+=h.length})):d=v[0]||new Uint8Array,d}},t.flush=function(){let o,l,f=0,d=0;const u=[];do{if(n.next_out_index=0,n.avail_out=r,o=n.deflate(Le),o!=Ya&&o!=Qe)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&u.push(s.slice(0,n.next_out_index)),d+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),l=new Uint8Array(d),u.forEach(function(p){l.set(p,f),f+=p.length}),l}}function Mc(e){return e+5*(Math.floor(e/16383)+1)}const Ic=15,J=0,xt=1,Fc=2,Ne=-2,ae=-3,Us=-4,yt=-5,We=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ja=1440,Lc=0,Cc=4,Nc=9,Pc=5,Uc=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Yc=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Wc=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Hc=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],jc=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Bc=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],At=15;function _i(){const e=this;let t,n,r,i,s,a;function o(f,d,u,p,w,v,h,c,m,_,b){let k,g,y,x,D,S,E,O,U,F,B,N,Y,j,q;F=0,D=u;do r[f[d+F]]++,F++,D--;while(D!==0);if(r[0]==u)return h[0]=-1,c[0]=0,J;for(O=c[0],S=1;S<=At&&r[S]===0;S++);for(E=S,OD&&(O=D),c[0]=O,j=1<N+O;){if(x++,N+=O,q=y-N,q=q>O?O:q,(g=1<<(S=E-N))>k+1&&(g-=k+1,Y=E,Sja)return ae;s[x]=B=_[0],_[0]+=q,x!==0?(a[x]=D,i[0]=S,i[1]=O,S=D>>>N-O,i[2]=B-s[x-1]-S,m.set(i,(s[x-1]+S)*3)):h[0]=B}for(i[1]=E-N,F>=u?i[0]=128+64:b[F]>>N;S>>=1)D^=S;for(D^=S,U=(1<257?(_==ae?m.msg="oversubscribed distance tree":_==yt?(m.msg="incomplete distance tree",_=ae):_!=Us&&(m.msg="empty distance tree with lengths",_=ae),_):J)}}_i.inflate_trees_fixed=function(e,t,n,r){return e[0]=Nc,t[0]=Pc,n[0]=Uc,r[0]=Yc,J};const Qn=0,Ys=1,Ws=2,Hs=3,js=4,Bs=5,Vs=6,Qr=7,Gs=8,er=9;function Vc(){const e=this;let t,n=0,r,i=0,s=0,a=0,o=0,l=0,f=0,d=0,u,p=0,w,v=0;function h(c,m,_,b,k,g,y,x){let D,S,E,O,U,F,B,N,Y,j,q,we,W,he,V,Z;B=x.next_in_index,N=x.avail_in,U=y.bitb,F=y.bitk,Y=y.write,j=Y>=S[Z+1],F-=S[Z+1],y.win[Y++]=S[Z+2],j--;continue}do{if(U>>=S[Z+1],F-=S[Z+1],(O&16)!==0){for(O&=15,W=S[Z+2]+(U&We[O]),U>>=O,F-=O;F<15;)N--,U|=(x.read_byte(B++)&255)<>=S[Z+1],F-=S[Z+1],(O&16)!==0){for(O&=15;F>=O,F-=O,j-=W,Y>=he)V=Y-he,Y-V>0&&2>Y-V?(y.win[Y++]=y.win[V++],y.win[Y++]=y.win[V++],W-=2):(y.win.set(y.win.subarray(V,V+2),Y),Y+=2,V+=2,W-=2);else{V=Y-he;do V+=y.end;while(V<0);if(O=y.end-V,W>O){if(W-=O,Y-V>0&&O>Y-V)do y.win[Y++]=y.win[V++];while(--O!==0);else y.win.set(y.win.subarray(V,V+O),Y),Y+=O,V+=O,O=0;V=0}}if(Y-V>0&&W>Y-V)do y.win[Y++]=y.win[V++];while(--W!==0);else y.win.set(y.win.subarray(V,V+W),Y),Y+=W,V+=W,W=0;break}else if((O&64)===0)D+=S[Z+2],D+=U&We[O],Z=(E+D)*3,O=S[Z];else return x.msg="invalid distance code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae;while(!0);break}if((O&64)===0){if(D+=S[Z+2],D+=U&We[O],Z=(E+D)*3,(O=S[Z])===0){U>>=S[Z+1],F-=S[Z+1],y.win[Y++]=S[Z+2],j--;break}}else return(O&32)!==0?(W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,xt):(x.msg="invalid literal/length code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae)}while(!0)}while(j>=258&&N>=10);return W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,J}e.init=function(c,m,_,b,k,g){t=Qn,f=c,d=m,u=_,p=b,w=k,v=g,r=null},e.proc=function(c,m,_){let b,k,g,y=0,x=0,D=0,S,E,O,U;for(D=m.next_in_index,S=m.avail_in,y=c.bitb,x=c.bitk,E=c.write,O=E=258&&S>=10&&(c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,_=h(f,d,u,p,w,v,c,m),D=m.next_in_index,S=m.avail_in,y=c.bitb,x=c.bitk,E=c.write,O=E>>=r[k+1],x-=r[k+1],g=r[k],g===0){a=r[k+2],t=Vs;break}if((g&16)!==0){o=g&15,n=r[k+2],t=Ws;break}if((g&64)===0){s=g,i=k/3+r[k+2];break}if((g&32)!==0){t=Qr;break}return t=er,m.msg="invalid literal/length code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,c.inflate_flush(m,_);case Ws:for(b=o;x>=b,x-=b,s=d,r=w,i=v,t=Hs;case Hs:for(b=s;x>=r[k+1],x-=r[k+1],g=r[k],(g&16)!==0){o=g&15,l=r[k+2],t=js;break}if((g&64)===0){s=g,i=k/3+r[k+2];break}return t=er,m.msg="invalid distance code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,c.inflate_flush(m,_);case js:for(b=o;x>=b,x-=b,t=Bs;case Bs:for(U=E-l;U<0;)U+=c.end;for(;n!==0;){if(O===0&&(E==c.end&&c.read!==0&&(E=0,O=E7&&(x-=8,S++,D--),c.write=E,_=c.inflate_flush(m,_),E=c.write,O=Eh.avail_out&&(m=h.avail_out),m!==0&&c==yt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m,b==n.end&&(b=0,n.write==n.end&&(n.write=0),m=n.write-b,m>h.avail_out&&(m=h.avail_out),m!==0&&c==yt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m),h.next_out_index=_,n.read=b,c},n.proc=function(h,c){let m,_,b,k,g,y,x,D;for(k=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y>>1){case 0:_>>>=3,b-=3,m=b&7,_>>>=m,b-=m,r=ei;break;case 1:S=[],E=[],O=[[]],U=[[]],_i.inflate_trees_fixed(S,E,O,U),d.init(S[0],E[0],O[0],0,U[0],0),_>>>=3,b-=3,r=tr;break;case 2:_>>>=3,b-=3,r=zs;break;case 3:return _>>>=3,b-=3,r=Bt,h.msg="invalid block type",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c)}break;case ei:for(;b<32;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<>>16&65535)!=(_&65535))return r=Bt,h.msg="invalid stored block lengths",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);i=_&65535,_=b=0,r=i!==0?qs:u!==0?nr:Qt;break;case qs:if(g===0||x===0&&(y==n.end&&n.read!==0&&(y=0,x=yg&&(m=g),m>x&&(m=x),n.win.set(h.read_buf(k,m),y),k+=m,g-=m,y+=m,x-=m,(i-=m)!==0)break;r=u!==0?nr:Qt;break;case zs:for(;b<14;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<29||(m>>5&31)>29)return r=Bt,h.msg="too many length or distance symbols",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);if(m=258+(m&31)+(m>>5&31),!o||o.length>>=14,b-=14,a=0,r=$s;case $s:for(;a<4+(s>>>10);){for(;b<3;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<>>=3,b-=3}for(;a<19;)o[Zs[a++]]=0;if(l[0]=7,m=v.inflate_trees_bits(o,l,f,p,h),m!=J)return c=m,c==ae&&(o=null,r=Bt),n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);a=0,r=Ks;case Ks:for(;m=s,!(a>=258+(m&31)+(m>>5&31));){let j,q;for(m=l[0];b>>=m,b-=m,o[a++]=q;else{for(D=q==18?7:q-14,j=q==18?11:3;b>>=m,b-=m,j+=_&We[D],_>>>=D,b-=D,D=a,m=s,D+j>258+(m&31)+(m>>5&31)||q==16&&D<1)return o=null,r=Bt,h.msg="invalid bit length repeat",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);q=q==16?o[D-1]:0;do o[D++]=q;while(--j!==0);a=D}}if(f[0]=-1,F=[],B=[],N=[],Y=[],F[0]=9,B[0]=6,m=s,m=v.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),o,F,B,N,Y,p,h),m!=J)return m==ae&&(o=null,r=Bt),c=m,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);d.init(F[0],B[0],p,N[0],p,Y[0]),r=tr;case tr:if(n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,(c=d.proc(n,h,c))!=xt)return n.inflate_flush(h,c);if(c=J,d.free(h),k=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y15?(e.inflateEnd(n),Ne):(e.wbits=r,n.istate.blocks=new Gc(n,1<>4)+8>a.wbits){a.mode=Rt,n.msg="invalid win size",a.marker=5;break}a.mode=Js;case Js:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,s=n.read_byte(n.next_in_index++)&255,((a.method<<8)+s)%31!==0){a.mode=Rt,n.msg="incorrect header check",a.marker=5;break}if((s&Zc)===0){a.mode=kn;break}a.mode=Qs;case Qs:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,a.mode=ea;case ea:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,a.mode=ta;case ta:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,a.mode=na;case na:return n.avail_in===0?i:(i=r,n.avail_in--,n.total_in++,a.need+=n.read_byte(n.next_in_index++)&255,a.mode=ti,Fc);case ti:return a.mode=Rt,n.msg="need dictionary",a.marker=0,Ne;case kn:if(i=a.blocks.proc(n,i),i==ae){a.mode=Rt,a.marker=0;break}if(i==J&&(i=r),i!=xt)return i;i=r,a.blocks.reset(n,a.was),a.mode=ra;case ra:return n.avail_in=0,xt;case Rt:return ae;default:return Ne}},e.inflateSetDictionary=function(n,r,i){let s=0,a=i;if(!n||!n.istate||n.istate.mode!=ti)return Ne;const o=n.istate;return a>=1<0&&n.next_in_index!=p&&(l(n.next_in_index),p=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return f.length>1?(u=new Uint8Array(v),f.forEach(function(h){u.set(h,w),w+=h.length})):u=f[0]||new Uint8Array,u}},t.flush=function(){n.inflateEnd()}}const pe=4294967295,ke=65535,wi=8,Va=0,Ga=99,Za=67324752,ji=134695760,Jc=ji,gi=33639248,qa=101010256,xi=101075792,za=117853008,sn=22,On=20,An=56,Qc=sn+On+An,$a=1,Ka=39169,Xa=10,Ja=1,Bi=21589,ed=28789,td=25461,yi=1,nd=6,bi=8,vi=2048,ki=16,rd=20,ia=45,sa=51,or="/",aa=new Date(2107,11,31),oa=new Date(1980,0,1),fe=void 0,mr="undefined",Qa="function";class la{constructor(t){return class extends TransformStream{constructor(n,r){const i=new t(r);super({transform(s,a){a.enqueue(i.append(s))},flush(s){const a=i.flush();a&&s.enqueue(a)}})}}}}const id=64;let eo=2;try{typeof navigator!=mr&&navigator.hardwareConcurrency&&(eo=navigator.hardwareConcurrency)}catch{}const sd={chunkSize:512*1024,maxWorkers:eo,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:fe,CompressionStreamNative:typeof CompressionStream!=mr&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=mr&&DecompressionStream},Ft=Object.assign({},sd);function Vi(){return Ft}function to(e){return Math.max(e.chunkSize,id)}function Gi(e){const{baseURL:t,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:i,useCompressionStream:s,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:f,DecompressionStream:d,workerScripts:u}=e;if(Mt("baseURL",t),Mt("chunkSize",n),Mt("maxWorkers",r),Mt("terminateWorkerTimeout",i),Mt("useCompressionStream",s),Mt("useWebWorkers",a),o&&(Ft.CompressionStream=new la(o)),l&&(Ft.DecompressionStream=new la(l)),Mt("CompressionStream",f),Mt("DecompressionStream",d),u!==fe){const{deflate:p,inflate:w}=u;if((p||w)&&(Ft.workerScripts||(Ft.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");Ft.workerScripts.deflate=p}if(w){if(!Array.isArray(w))throw new Error("workerScripts.inflate must be an array");Ft.workerScripts.inflate=w}}}function Mt(e,t){t!==fe&&(Ft[e]=t)}const Sn={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin",cap:["cap","pcap"],"cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",javascript:"js",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":"odm","vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-debian-package":["deb","udeb"],"x-director":["dcr","dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-koan":["skp","skd","skt","skm"],"x-kpresenter":["kpr","kpt"],"x-kword":["kwd","kwt"],"x-latex":"latex","x-lha":"lha","x-lyx":"lyx","x-lzh":"lzh","x-lzx":"lzx","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-ms-wmd":"wmd","x-ms-wmz":"wmz","x-msdos-program":["com","exe","bat","dll"],"x-msi":"msi","x-netcdf":["nc","cdf"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":"rpm","x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tcl":"tcl","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-troff":["t","tr","roff"],"x-troff-man":"man","x-troff-me":"me","x-troff-ms":"ms","x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix",json:"json","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":"mathml",mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","x-msdownload":["exe","dll","com","bat","msi"],"x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tads":"gam","x-tex":"tex","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-compressed":"tgz","x-gzip":"gz","x-perfmon":["pma","pmc","pml","pmr","pmw"],"x-pkcs7-mime":["p7c","p7m"],"ynd.ms-pkipko":"pko"},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":["aif","aiff","aifc"],"x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2","x-wav":"wav",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":["mmd","mmod"],"x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":["sd","sdf"],"x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","mpc","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":["val","aso"],"x-pdb":["pdb","ent"],"x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-photoshop":"psd","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",pipeg:"jfif"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":["x3d","x3dz"],"x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:["tm","ts"],"tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{avif:".avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","vrml","wrl","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const t in Sn)if(Sn.hasOwnProperty(t)){for(const n in Sn[t])if(Sn[t].hasOwnProperty(n)){const r=Sn[t][n];if(typeof r=="string")e[r]=t+"/"+n;else for(let i=0;i>>1^3988292384:t=t>>>1;no[e]=t}class pr{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let r=0,i=t.length|0;r>>8^no[(n^t[r])&255];this.crc=n}get(){return~this.crc}}class ro extends TransformStream{constructor(){const t=new pr;super({transform(n){t.append(n)},flush(n){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t.get()),n.enqueue(r)}})}}function Si(e){if(typeof TextEncoder>"u"){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n0&&t&&(e[n-1]=Fe.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let a=0;a>>t),n=e[a]<<32-t;const i=e.length?e[e.length-1]:0,s=Fe.getPartial(i);return r.push(Fe.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},_r={bytes:{fromBits(e){const n=Fe.bitLength(e)/8,r=new Uint8Array(n);let i;for(let s=0;s>>24,i<<=8;return r},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let o=t.blockSize+r-(t.blockSize+r&t.blockSize-1);o<=i;o+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=Fe.concat(t,[Fe.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r},_S(e,t){return t<>>32-e},_block(e){const t=this,n=t._h,r=Array(80);for(let f=0;f<16;f++)r[f]=e[f];let i=n[0],s=n[1],a=n[2],o=n[3],l=n[4];for(let f=0;f<=79;f++){f>=16&&(r[f]=t._S(1,r[f-3]^r[f-8]^r[f-14]^r[f-16]));const d=t._S(5,i)+t._f(f,s,a,o)+l+r[f]+t._key[Math.floor(f/20)]|0;l=o,o=a,a=t._S(30,s),s=i,i=d}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+l|0}};const io={};io.aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,o,l=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;s<4*i+28;s++){let f=a[s-1];(s%i===0||i===8&&s%i===4)&&(f=n[f>>>24]<<24^n[f>>16&255]<<16^n[f>>8&255]<<8^n[f&255],s%i===0&&(f=f<<8^f>>>24^l<<24,l=l<<1^(l>>7)*283)),a[s]=a[s-i]^f}for(let f=0;s;f++,s--){const d=a[f&3?s:s-4];s<=4||f<4?o[f]=d:o[f]=r[0][n[d>>>24]]^r[1][n[d>>16&255]]^r[2][n[d>>8&255]]^r[3][n[d&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,o,l,f;for(let d=0;d<256;d++)s[(i[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let u=a^a<<1^a<<2^a<<3^a<<4;u=u>>8^u&255^99,n[d]=u,r[u]=d,f=i[l=i[o=i[d]]];let p=f*16843009^l*65537^o*257^d*16843008,w=i[u]*257^u*16843008;for(let v=0;v<4;v++)e[v][d]=w=w<<24^w>>>8,t[v][u]=p=p<<24^p>>>8}for(let d=0;d<5;d++)e[d]=e[d].slice(0),t[d]=t[d].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],l=s[2],f=s[3],d=s[4];let u=e[0]^n[0],p=e[t?3:1]^n[1],w=e[2]^n[2],v=e[t?1:3]^n[3],h=4,c,m,_;for(let b=0;b>>24]^o[p>>16&255]^l[w>>8&255]^f[v&255]^n[h],m=a[p>>>24]^o[w>>16&255]^l[v>>8&255]^f[u&255]^n[h+1],_=a[w>>>24]^o[v>>16&255]^l[u>>8&255]^f[p&255]^n[h+2],v=a[v>>>24]^o[u>>16&255]^l[p>>8&255]^f[w&255]^n[h+3],h+=4,u=c,p=m,w=_;for(let b=0;b<4;b++)i[t?3&-b:b]=d[u>>>24]<<24^d[p>>16&255]<<16^d[w>>8&255]<<8^d[v&255]^n[h++],c=u,u=p,p=w,w=v,v=c;return i}};const ad={getRandomValues(e){const t=new Uint32Array(e.buffer),n=r=>{let i=987654321;const s=4294967295;return function(){return i=36969*(i&65535)+(i>>16)&s,r=18e3*(r&65535)+(r>>16)&s,(((i<<16)+r&s)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r>24&255)===255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=Fe.bitLength(t);for(let s=0;s>5)+1<<2;let s,a,o,l,f;const d=new ArrayBuffer(i),u=new DataView(d);let p=0;const w=Fe;for(t=_r.bytes.toBits(t),f=1;p<(i||1);f++){for(s=a=e.encrypt(w.concat(t,[f])),o=1;oi&&(e=n.hash(e));for(let s=0;sthis.resolveReady=i),password:t,signed:n,strength:r-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;o?(await bd(a,l,o,qe(i,0,Fn[l]+2)),i=qe(i,Fn[l]+2),f()):await d;const u=new Uint8Array(i.length-It-(i.length-It)%an);s.enqueue(po(a,i,u,0,It,!0))},async flush(i){const{signed:s,ctr:a,hmac:o,pending:l,ready:f}=this;await f;const d=qe(l,0,l.length-It),u=qe(l,l.length-It);let p=new Uint8Array;if(d.length){const w=Cn(lt,d);o.update(w);const v=a.update(w);p=Ln(lt,v)}if(s){const w=qe(Ln(lt,o.digest()),0,It);for(let v=0;vthis.resolveReady=i),password:t,strength:n-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;let u=new Uint8Array;o?(u=await vd(a,l,o),f()):await d;const p=new Uint8Array(u.length+i.length-i.length%an);p.set(u,0),s.enqueue(po(a,i,p,u.length,0))},async flush(i){const{ctr:s,hmac:a,pending:o,ready:l}=this;await l;let f=new Uint8Array;if(o.length){const d=s.update(Cn(lt,o));a.update(d),f=Ln(lt,d)}r.signature=Ln(lt,a.digest()).slice(0,It),i.enqueue(qi(f,r.signature))}}),r=this}}function po(e,t,n,r,i,s){const{ctr:a,hmac:o,pending:l}=e,f=t.length-i;l.length&&(t=qi(l,t),n=Ed(n,f-f%an));let d;for(d=0;d<=f-an;d+=an){const u=Cn(lt,qe(t,d,d+an));s&&o.update(u);const p=a.update(u);s||o.update(p),n.set(Ln(lt,p),d+r)}return e.pending=qe(t,d),n}async function bd(e,t,n,r){const i=await _o(e,t,n,qe(r,0,Fn[t])),s=qe(r,Fn[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new Error(ao)}async function vd(e,t,n){const r=lo(new Uint8Array(Fn[t])),i=await _o(e,t,n,r);return qi(r,i)}async function _o(e,t,n,r){e.password=null;const i=Si(n),s=await kd(ld,i,fd,!1,ud),a=await Sd(Object.assign({salt:r},fo),s,8*(En[t]*2+2)),o=new Uint8Array(a),l=Cn(lt,qe(o,0,En[t])),f=Cn(lt,qe(o,En[t],En[t]*2)),d=qe(o,En[t]*2);return Object.assign(e,{keys:{key:l,authentication:f,passwordVerification:d},ctr:new wd(new _d(l),Array.from(hd)),hmac:new gd(f)}),d}function kd(e,t,n,r,i){return md?Wn.importKey(e,t,n,r,i):Yn.importKey(t)}async function Sd(e,t,n){return pd?await Wn.deriveBits(e,t,n):Yn.pbkdf2(t,e.salt,fo.iterations,n)}function qi(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Ed(e,t){if(t&&t>e.length){const n=e;e=new Uint8Array(t),e.set(n,0)}return e}function qe(e,t,n){return e.subarray(t,n)}function Ln(e,t){return e.fromBits(t)}function Cn(e,t){return e.toBits(t)}const ln=12;class Dd extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),wo(this,t)},transform(r,i){const s=this;if(s.password){const a=ca(s,r.subarray(0,ln));if(s.password=null,a[ln-1]!=s.passwordVerification)throw new Error(ao);r=r.subarray(ln)}i.enqueue(ca(s,r))}})}}class Td extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),wo(this,t)},transform(r,i){const s=this;let a,o;if(s.password){s.password=null;const l=lo(new Uint8Array(ln));l[ln-1]=s.passwordVerification,a=new Uint8Array(r.length+l.length),a.set(da(s,l),0),o=ln}else a=new Uint8Array(r.length),o=0;a.set(da(s,r),o),i.enqueue(a)}})}}function ca(e,t){const n=new Uint8Array(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function go(e){const t=e.keys[2]|2;return xo(Math.imul(t,t^1)>>>8)}function xo(e){return e&255}function fa(e){return e&4294967295}const ua="deflate-raw";class Od extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:r,CompressionStreamNative:i}){super({});const{compressed:s,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:f,level:d}=t,u=this;let p,w,v=yo(super.readable);(!a||l)&&f&&([v,p]=v.tee(),p=ct(p,new ro)),s&&(v=vo(v,o,{level:d,chunkSize:n},i,r)),a&&(l?v=ct(v,new Td(t)):(w=new yd(t),v=ct(v,w))),bo(u,v,async()=>{let h;a&&!l&&(h=w.signature),(!a||l)&&f&&(h=await p.getReader().read(),h=new DataView(h.value.buffer).getUint32(0)),u.signature=h})}}class Ad extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:r,DecompressionStreamNative:i}){super({});const{zipCrypto:s,encrypted:a,signed:o,signature:l,compressed:f,useCompressionStream:d}=t;let u,p,w=yo(super.readable);a&&(s?w=ct(w,new Dd(t)):(p=new xd(t),w=ct(w,p))),f&&(w=vo(w,d,{chunkSize:n},i,r)),(!a||s)&&o&&([w,u]=w.tee(),u=ct(u,new ro)),bo(this,w,async()=>{if((!a||s)&&o){const v=await u.getReader().read(),h=new DataView(v.value.buffer);if(l!=h.getUint32(0,!1))throw new Error(oo)}})}}function yo(e){return ct(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function bo(e,t,n){t=ct(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function vo(e,t,n,r,i){try{const s=t&&r?r:i;e=ct(e,new s(ua,n))}catch(s){if(t)e=ct(e,new i(ua,n));else throw s}return e}function ct(e,t){return e.pipeThrough(t)}const Rd="message",Md="start",Id="pull",ha="data",Fd="ack",Ld="close",ko="deflate",So="inflate";class Cd extends TransformStream{constructor(t,n){super({});const r=this,{codecType:i}=t;let s;i.startsWith(ko)?s=Od:i.startsWith(So)&&(s=Ad);let a=0;const o=new s(t,n),l=super.readable,f=new TransformStream({transform(d,u){d&&d.length&&(a+=d.length,u.enqueue(d))},flush(){const{signature:d}=o;Object.assign(r,{signature:d,size:a})}});Object.defineProperty(r,"readable",{get(){return l.pipeThrough(o).pipeThrough(f)}})}}const Nd=typeof Worker!=mr;class ni{constructor(t,{readable:n,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:f},d){const{signal:u}=a;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new Pd(n,a,s),{signal:u}),writable:r,options:Object.assign({},i),scripts:f,transferStreams:l,terminate(){const{worker:p,busy:w}=t;p&&!w&&(p.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,d(t)}}),(o&&Nd?Yd:Ud)(t,s)}}class Pd extends TransformStream{constructor(t,{onstart:n,onprogress:r,size:i,onend:s},{chunkSize:a}){let o=0;super({start(){n&&ri(n,i)},async transform(l,f){o+=l.length,r&&await ri(r,o,i),f.enqueue(l)},flush(){t.size=o,s&&ri(s,o)}},{highWaterMark:1,size:()=>a})}}async function ri(e,...t){try{await e(...t)}catch{}}function Ud(e,t){return{run:()=>Wd(e,t)}}function Yd(e,{baseURL:t,chunkSize:n}){return e.interface||Object.assign(e,{worker:Bd(e.scripts[0],t,e),interface:{run:()=>Hd(e,{chunkSize:n})}}),e.interface}async function Wd({options:e,readable:t,writable:n,onTaskFinished:r},i){const s=new Cd(e,i);try{await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,size:o}=s;return{signature:a,size:o}}finally{r()}}async function Hd(e,t){let n,r;const i=new Promise((p,w)=>{n=p,r=w});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});const{readable:s,options:a,scripts:o}=e,{writable:l,closed:f}=jd(e.writable);Ei({type:Md,scripts:o.slice(1),options:a,config:t,readable:s,writable:l},e)||Object.assign(e,{reader:s.getReader(),writer:l.getWriter()});const u=await i;try{await l.close()}catch{}return await f,u}function jd(e){const t=e.getWriter();let n;const r=new Promise(s=>n=s);return{writable:new WritableStream({async write(s){await t.ready,await t.write(s)},close(){t.releaseLock(),n()},abort(s){return t.abort(s)}}),closed:r}}let ma=!0,pa=!0;function Bd(e,t,n){const r={type:"module"};let i,s;typeof e==Qa&&(e=e());try{i=new URL(e,t)}catch{i=e}if(ma)try{s=new Worker(i)}catch{ma=!1,s=new Worker(i,r)}else s=new Worker(i,r);return s.addEventListener(Rd,a=>Vd(a,n)),s}function Ei(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:s,readable:a,writable:o}=e;const l=[];if(s){const{buffer:f,length:d}=s;d!=f.byteLength&&(s=new Uint8Array(s)),e.value=s.buffer,l.push(e.value)}if(i&&pa?(a&&l.push(a),o&&l.push(o)):e.readable=e.writable=null,l.length)try{return t.postMessage(e,l),!0}catch{pa=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(s){throw n&&n.releaseLock(),r(),s}}async function Vd({data:e},t){const{type:n,value:r,messageId:i,result:s,error:a}=e,{reader:o,writer:l,resolveResult:f,rejectResult:d,onTaskFinished:u}=t;try{if(a){const{message:w,stack:v,code:h,name:c}=a,m=new Error(w);Object.assign(m,{stack:v,code:h,name:c}),p(m)}else{if(n==Id){const{value:w,done:v}=await o.read();Ei({type:ha,value:w,done:v,messageId:i},t)}n==ha&&(await l.ready,await l.write(new Uint8Array(r)),Ei({type:Fd,messageId:i},t)),n==Ld&&p(null,s)}}catch(w){p(w)}function p(w,v){w?d(w):f(v),l&&l.releaseLock(),u()}}let Vt=[];const ii=[];let _a=0;async function Eo(e,t){const{options:n,config:r}=t,{transferStreams:i,useWebWorkers:s,useCompressionStream:a,codecType:o,compressed:l,signed:f,encrypted:d}=n,{workerScripts:u,maxWorkers:p,terminateWorkerTimeout:w}=r;t.transferStreams=i||i===fe;const v=!l&&!f&&!d&&!t.transferStreams;t.useWebWorkers=!v&&(s||s===fe&&r.useWebWorkers),t.scripts=t.useWebWorkers&&u?u[o]:[],n.useCompressionStream=a||a===fe&&r.useCompressionStream;let h;const c=Vt.find(_=>!_.busy);if(c)wa(c),h=new ni(c,e,t,m);else if(Vt.lengthii.push({resolve:_,stream:e,workerOptions:t}));return h.run();function m(_){if(ii.length){const[{resolve:b,stream:k,workerOptions:g}]=ii.splice(0,1);b(new ni(_,k,g,m))}else _.worker?(wa(_),Number.isFinite(w)&&w>=0&&(_.terminateTimeout=setTimeout(()=>{Vt=Vt.filter(b=>b!=_),_.terminate()},w))):Vt=Vt.filter(b=>b!=_)}}function wa(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function Gd(e){const t=()=>URL.createObjectURL(new Blob([`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:"PBKDF2"},B=t.assign({hash:{name:"HMAC"}},R),E=t.assign({iterations:1e3,hash:{name:"SHA-1"}},R),M=["deriveBits"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&"function"==typeof T.importKey,L=N&&W&&"function"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s("Invalid password")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s("Invalid signature")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey("raw",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s("Invalid password");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s("Invalid signature")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)("deflate-raw",n))}catch(r){if(!t)throw r;e=pe(e,new s("deflate-raw",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=le:s.startsWith("inflate")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:"pull",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:"data",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:"close",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&ke(e),"data"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe="oversubscribed dynamic bit lengths tree":-5!=a&&0!==r[0]||(f.Oe="incomplete dynamic bit lengths tree",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe="oversubscribed literal/length tree":-4!=h&&(w.Oe="incomplete literal/length tree",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe="oversubscribed distance tree":-5==h?(w.Oe="incomplete distance tree",h=-3):-4!=h&&(w.Oe="empty distance tree with lengths",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe="invalid distance code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe="invalid literal/length code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe="invalid literal/length code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe="invalid distance code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe="invalid block type",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe="invalid stored block lengths",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe="too many length or distance symbols",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe="invalid bit length repeat",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe="need dictionary",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye}; -`],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}const Do="HTTP error ",Rr="HTTP Range not supported",Zd="Writer iterator completed too soon",qd="text/plain",zd="Content-Length",$d="Content-Range",Kd="Accept-Ranges",Xd="Range",Jd="Content-Type",Qd="HEAD",$i="GET",To="bytes",ef=64*1024,Ki="writable";class Mr{constructor(){this.size=0}init(){this.initialized=!0}}class Yt extends Mr{get readable(){const t=this,{chunkSize:n=ef}=t,r=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:s=0,size:a,diskNumberStart:o}=r,{chunkOffset:l}=this;i.enqueue(await Ie(t,s+l,Math.min(n,a-l),o)),l+n>a?i.close():this.chunkOffset+=n}});return r}}class Oo extends Mr{constructor(){super();const t=this,n=new WritableStream({write(r){return t.writeUint8Array(r)}});Object.defineProperty(t,Ki,{get(){return n}})}writeUint8Array(){}}class Di extends Yt{constructor(t){super();let n=t.length;for(;t.charAt(n-1)=="=";)n--;const r=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:r,size:Math.floor((n-r)*.75)})}readUint8Array(t,n){const{dataStart:r,dataURI:i}=this,s=new Uint8Array(n),a=Math.floor(t/3)*4,o=atob(i.substring(a+r,Math.ceil((t+n)/3)*4+r)),l=t-Math.floor(a/4)*3;for(let f=l;f2?n.data+=btoa(i):n.pending=i}getData(){return this.data+btoa(this.pending)}}class hn extends Yt{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){const r=this;return new Uint8Array(await r.blob.slice(t,t+n).arrayBuffer())}}class $t extends Mr{constructor(t){super();const n=this,r=new TransformStream,i=[];t&&i.push([Jd,t]),Object.defineProperty(n,Ki,{get(){return r.writable}}),n.blob=new Response(r.readable,{headers:i}).blob()}getData(){return this.blob}}class Ao extends hn{constructor(t){super(new Blob([t],{type:qd}))}}class Ti extends $t{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:n}=this,r=await super.getData();if(r.text&&n)return r.text();{const i=new FileReader;return new Promise((s,a)=>{Object.assign(i,{onload:({target:o})=>s(o.result),onerror:()=>a(i.error)}),i.readAsText(r,t)})}}}class tf extends Yt{constructor(t,n){super(),Ro(this,t,n)}async init(){super.init(),await Mo(this,Oi,ga)}readUint8Array(t,n){return Io(this,t,n,Oi,ga)}}class nf extends Yt{constructor(t,n){super(),Ro(this,t,n)}async init(){super.init(),await Mo(this,Ai,xa)}readUint8Array(t,n){return Io(this,t,n,Ai,xa)}}function Ro(e,t,n){const{preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s}=n;n=Object.assign({},n),delete n.preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.useXHR,Object.assign(e,{url:t,options:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s})}async function Mo(e,t,n){const{url:r,useRangeHeader:i,forceRangeRequests:s}=e;if(sf(r)&&(i||s)){const{headers:a}=await t($i,e,Fo(e));if(!s&&a.get(Kd)!=To)throw new Error(Rr);{let o;const l=a.get($d);if(l){const f=l.trim().split(/\s*\/\s*/);if(f.length){const d=f[1];d&&d!="*"&&(o=Number(d))}}o===fe?await ya(e,t,n):e.size=o}}else await ya(e,t,n)}async function Io(e,t,n,r,i){const{data:s,useRangeHeader:a,forceRangeRequests:o,options:l}=e;if(a||o){const f=await r($i,e,Fo(e,t,n));if(f.status!=206)throw new Error(Rr);return new Uint8Array(await f.arrayBuffer())}else return s||await i(e,l),new Uint8Array(s.subarray(t,t+n))}function Fo(e,t=0,n=1){return Object.assign({},Xi(e),{[Xd]:To+"="+t+"-"+(t+n-1)})}function Xi({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function ga(e){await Lo(e,Oi)}async function xa(e){await Lo(e,Ai)}async function Lo(e,t){const n=await t($i,e,Xi(e));e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function ya(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t(Qd,e,Xi(e))).headers.get(zd);i?e.size=Number(i):await n(e,e.options)}}async function Oi(e,{options:t,url:n},r){const i=await fetch(n,Object.assign({},t,{method:e,headers:r}));if(i.status<400)return i;throw i.status==416?new Error(Rr):new Error(Do+(i.statusText||i.status))}function Ai(e,{url:t},n){return new Promise((r,i)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",()=>{if(s.status<400){const a=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(o=>{const l=o.trim().split(/\s*:\s*/);l[0]=l[0].trim().replace(/^[a-z]|-[a-z]/g,f=>f.toUpperCase()),a.push(l)}),r({status:s.status,arrayBuffer:()=>s.response,headers:new Map(a)})}else i(s.status==416?new Error(Rr):new Error(Do+(s.statusText||s.status)))},!1),s.addEventListener("error",a=>i(a.detail.error),!1),s.open(e,t),n)for(const a of Object.entries(n))s.setRequestHeader(a[0],a[1]);s.responseType="arraybuffer",s.send()})}class ba extends Yt{constructor(t,n={}){super(),Object.assign(this,{url:t,reader:n.useXHR?new nf(t,n):new tf(t,n)})}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(t,n){return this.reader.readUint8Array(t,n)}}class Ri extends Yt{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,n){return this.array.slice(t,t+n)}}class gr extends Oo{init(t=0){super.init(),Object.assign(this,{offset:0,array:new Uint8Array(t)})}writeUint8Array(t){const n=this;if(n.offset+t.length>n.array.length){const r=n.array;n.array=new Uint8Array(r.length+t.length),n.array.set(r)}n.array.set(t,n.offset),n.offset+=t.length}getData(){return this.array}}class rf extends Yt{constructor(t){super(),this.readers=t}async init(){super.init();const t=this,{readers:n}=t;t.lastDiskNumber=0,await Promise.all(n.map(async r=>{await r.init(),t.size+=r.size}))}async readUint8Array(t,n,r=0){const i=this,{readers:s}=this;let a,o=r;o==-1&&(o=s.length-1);let l=t;for(;l>=s[o].size;)l-=s[o].size,o++;const f=s[o],d=f.size;if(l+n<=d)a=await Ie(f,l,n);else{const u=d-l;a=new Uint8Array(n),a.set(await Ie(f,l,u)),a.set(await i.readUint8Array(t+u,n-u,r),u)}return i.lastDiskNumber=Math.max(o,i.lastDiskNumber),a}}class va extends Mr{constructor(t,n=4294967296){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,availableSize:n});let i,s,a;const o=new WritableStream({async write(d){if(a)if(i.size+d.length>=n){const u=n-i.size;await l(d.slice(0,u)),await f(),r.diskOffset+=i.size,r.diskNumber++,a=null,await this.write(d.slice(u))}else d.length&&await l(d),r.availableSize=n-i.size;else{const{value:u,done:p}=await t.next();if(p&&!u)throw new Error(Zd);i=u,i.size=0,s=u.writable,a=s.getWriter(),await this.write(d)}},async close(){await a.ready,await f()}});Object.defineProperty(r,Ki,{get(){return o}});async function l(d){await a.ready,await a.write(d),i.size+=d.length,r.size+=d.length}async function f(){s.size=i.size,await a.close()}}}function sf(e){const{baseURL:t}=Vi(),{protocol:n}=new URL(e,t);return n=="http:"||n=="https:"}async function ze(e,t){e.init&&!e.initialized&&await e.init(t)}function Ie(e,t,n,r){return e.readUint8Array(t,n,r)}const Co="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),af=Co.length==256;function of(e){if(af){let t="";for(let n=0;nthis[n]=t[n])}}const si="File format is not recognized",ff="End of central directory not found",uf="End of Zip64 central directory not found",hf="End of Zip64 central directory locator not found",mf="Central directory header not found",pf="Local file header not found",_f="Zip64 extra field not found",wf="File contains encrypted entry",gf="Encryption method not supported",ka="Compression method not supported",Sa="Split zip file",Ea="utf-8",Da="cp437",xf=[[Wo,pe],[Ho,pe],[jo,pe],[Ii,ke]],yf={[ke]:{getValue:_e,bytes:4},[pe]:{getValue:lr,bytes:8}};class bf{constructor(t,n={}){t instanceof ReadableStream&&(t={readable:t}),Object.assign(this,{reader:t,options:n,config:Vi()})}async*getEntriesGenerator(t={}){const n=this;let{reader:r}=n;const{config:i}=n;if(await ze(r),(r.size===fe||!r.readUint8Array)&&(Array.isArray(r)?r=new rf(r):r=new hn(await new Response(r.readable).blob()),await ze(r)),r.size=r.size)throw new Error(si);let _=0,b=await Ie(r,l,o,v),k=Te(b);if(o){const S=s.offset-o;if(_e(k,_)!=gi&&l!=S){const E=l;l=S,c=l-E,b=await Ie(r,l,o,v),k=Te(b)}}if(l<0||l>=r.size)throw new Error(si);const g=tt(n,t,"filenameEncoding"),y=tt(n,t,"commentEncoding");for(let S=0;SE.getData(ht,Wt,Ht),_=we;const{onprogress:Dt}=t;if(Dt)try{await Dt(S+1,h,new xr(E))}catch{}yield Wt}const x=tt(n,t,"extractPrependedData"),D=tt(n,t,"extractAppendedData");return x&&(n.prependedData=m>0?await Ie(r,0,m):new Uint8Array),n.comment=d?await Ie(r,f+sn,d):new Uint8Array,D&&(n.appendedData=u>>8&255:p>>>24&255),signature:p,compressed:f!=0,encrypted:k,useWebWorkers:tt(i,r,"useWebWorkers"),useCompressionStream:tt(i,r,"useCompressionStream"),transferStreams:tt(i,r,"transferStreams")},config:d,streamOptions:{signal:E,size:D,onstart:O,onprogress:U,onend:F}};return S.size+=(await Eo({readable:x,writable:S},B)).size,tt(i,r,"preventClose")||await S.close(),t.getData?t.getData():S}}function zo(e,t,n){const r=e.rawBitFlag=be(t,n+2),i=(r&yi)==yi,s=_e(t,n+6);Object.assign(e,{encrypted:i,version:be(t,n),bitFlag:{level:(r&nd)>>1,dataDescriptor:(r&bi)==bi,languageEncodingFlag:(r&vi)==vi},rawLastModDate:s,lastModDate:Of(s),filenameLength:be(t,n+22),extraFieldLength:be(t,n+24)})}async function $o(e,t,n,r){const{rawExtraField:i}=t,s=t.extraField=new Map,a=Te(new Uint8Array(i));let o=0;try{for(;ot[i]==s);for(let i=0,s=0;i{if(e.data.length>=a+4){const f=_e(n,a);t[o]=e[o]=new Date(f*1e3);const d=s[l];e[d]=f}a+=4})}async function Tf(e,t,n,r,i){const s=new Uint8Array(4),a=Te(s);Af(a,0,t);const o=r+i;return await l(r)||await l(Math.min(o,n));async function l(f){const d=n-f,u=await Ie(e,d,f);for(let p=u.length-r;p>=0;p--)if(u[p]==s[0]&&u[p+1]==s[1]&&u[p+2]==s[2]&&u[p+3]==s[3])return{offset:d+p,buffer:u.slice(p,p+r).buffer}}}function tt(e,t,n){return t[n]===fe?e.options[n]:t[n]}function Of(e){const t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function ai(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function cn(e,t){return e.getUint8(t)}function be(e,t){return e.getUint16(t,!0)}function _e(e,t){return e.getUint32(t,!0)}function lr(e,t){return Number(e.getBigUint64(t,!0))}function Af(e,t,n){e.setUint32(t,n,!0)}function Te(e){return new DataView(e.buffer)}const Rf="File already exists",Mf="Zip file comment exceeds 64KB",If="File entry comment exceeds 64KB",Ff="File entry name exceeds 64KB",Oa="Version exceeds 65535",Lf="The strength must equal 1, 2, or 3",Cf="Extra field type exceeds 65535",Nf="Extra field data exceeds 64KB",ts="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Aa=new Uint8Array([7,0,2,0,65,69,3,0,0]),Ko=28;let oi=0;const Ra=[];class Pf{constructor(t,n={}){t.writable===fe&&typeof t.next==Qa&&(t=new va(t)),t instanceof WritableStream&&(t={writable:t}),t.writable.size===fe&&(t.writable.size=0);const r=t instanceof va;r||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0}),Object.assign(this,{writer:t,addSplitZipSignature:r,options:n,config:Vi(),files:new Map,filenames:new Set,offset:t.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set})}async add(t="",n,r={}){const i=this,{pendingAddFileCalls:s,config:a}=i;oiRa.push(l));let o;try{if(t=t.trim(),i.filenames.has(t))throw new Error(Rf);return i.filenames.add(t),o=Uf(i,t,n,r),s.add(o),await o}catch(l){throw i.filenames.delete(t),l}finally{s.delete(o);const l=Ra.shift();l?l():oi--}}async close(t=new Uint8Array,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:s}=i;for(;r.size;)await Promise.all(Array.from(r));return await Zf(this,t,n),!i.preventClose&&!n.preventClose&&await s.close(),i.getData?i.getData():s}}async function Uf(e,t,n,r){t=t.trim(),r.directory&&!t.endsWith(or)?t+=or:r.directory=t.endsWith(or);const i=Si(t);if(ee(i)>ke)throw new Error(Ff);const s=r.comment||"",a=Si(s);if(ee(a)>ke)throw new Error(If);const o=e.options.version||r.version||0;if(o>ke)throw new Error(Oa);const l=e.options.versionMadeBy||r.versionMadeBy||20;if(l>ke)throw new Error(Oa);const f=xe(e,r,Ji)||new Date,d=xe(e,r,Qi),u=xe(e,r,es),p=xe(e,r,"password"),w=xe(e,r,"encryptionStrength")||3,v=xe(e,r,"zipCrypto");if(p!==fe&&w!==fe&&(w<1||w>3))throw new Error(Lf);let h=new Uint8Array;const{extraField:c}=r;if(c){let he=0,V=0;c.forEach(Z=>he+=4+ee(Z)),h=new Uint8Array(he),c.forEach((Z,Se)=>{if(Se>ke)throw new Error(Cf);if(ee(Z)>ke)throw new Error(Nf);ve(h,new Uint16Array([Se]),V),ve(h,new Uint16Array([ee(Z)]),V+2),ve(h,Z,V+4),V+=4+ee(Z)})}let m=xe(e,r,"extendedTimestamp");m===fe&&(m=!0);let _=0,b=0,k=xe(e,r,"keepOrder");k===fe&&(k=!0);let g=0,y=xe(e,r,Zo);y===fe&&(y=!0);const x=xe(e,r,Vo)||0,D=xe(e,r,Go)||0;let S=xe(e,r,qo);n&&(n instanceof ReadableStream&&(n={readable:n}),await ze(n),n.size===fe?(r.dataDescriptor=!0,(S||S===fe)&&(S=!0,_=pe)):(g=n.size,_=zf(g)));const{diskOffset:E}=e.writer;if(e.offset+e.pendingEntriesSize-E>=pe||g>=pe||_>=pe){if(S===!1||!k)throw new Error(ts);S=!0}S=S||!1;const O=xe(e,r,"level"),U=xe(e,r,"useWebWorkers"),F=xe(e,r,"bufferedWrite");let B=xe(e,r,"dataDescriptor"),N=xe(e,r,"dataDescriptorSignature");const Y=xe(e,r,"signal"),j=xe(e,r,"useCompressionStream");B===fe&&(B=!0),B&&N===fe&&(N=!1),r=Object.assign({},r,{rawFilename:i,rawComment:a,version:o,versionMadeBy:l,lastModDate:f,lastAccessDate:d,creationDate:u,rawExtraField:h,zip64:S,password:p,level:O,useWebWorkers:U,encryptionStrength:w,extendedTimestamp:m,zipCrypto:v,bufferedWrite:F,keepOrder:k,dataDescriptor:B,dataDescriptorSignature:N,signal:Y,msDosCompatible:y,internalFileAttribute:x,externalFileAttribute:D,useCompressionStream:j});const q=Hf(r),we=jf(r);b=ee(q.localHeaderArray,we.dataDescriptorArray)+_,e.pendingEntriesSize+=b;let W;try{W=await Yf(e,t,n,{headerInfo:q,dataDescriptorInfo:we},r)}finally{e.pendingEntriesSize-=b}return Object.assign(W,{name:t,comment:s,extraField:c}),new xr(W)}async function Yf(e,t,n,r,i){const{files:s,writer:a}=e,{keepOrder:o,dataDescriptor:l,signal:f}=i,d=Array.from(s.values()).pop();let u={},p,w,v,h,c,m;s.set(t,u);try{let k;o&&(k=d&&d.lock,_()),i.bufferedWrite||e.lockWriter||!l?(m=new $t,m.writable.size=0,p=!0,await ze(a)):(m=a,e.lockWriter=Promise.resolve(),w=()=>delete e.lockWriter),await ze(m);const{writable:g,diskNumber:y}=a;let{diskOffset:x}=a;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const D=new Uint8Array(4),S=He(D);Q(S,0,ji),await Nt(g,D),e.offset+=4}if(p||await k,c=!0,u.diskNumberStart=y,u=await Wf(n,m,u,r,e.config,i),c=!1,s.set(t,u),u.filename=t,p){await m.writable.close();let D=await m.getData();await k,await b(),h=!0,l||(D=await Vf(u,D,g,i)),u.diskNumberStart=a.diskNumber,x=a.diskOffset,await D.stream().pipeTo(g,{preventClose:!0,signal:f}),g.size+=D.size,h=!1}if(u.offset=e.offset-x,u.zip64)Gf(u);else if(u.offset>=pe)throw new Error(ts);return e.offset+=u.length,u}catch(k){throw(p&&h||!p&&c)&&(e.hasCorruptedEntries=!0,k&&(k.corruptedEntry=!0),p?e.offset+=m.writable.size:e.offset=m.writable.size),s.delete(t),k}finally{v&&v(),w&&w()}function _(){u.lock=new Promise(k=>v=k)}async function b(){const{lockWriter:k}=e;if(k)return await k.then(()=>delete e.lockWriter),b();e.lockWriter=new Promise(g=>w=g)}}async function Wf(e,t,{diskNumberStart:n,lock:r},i,s,a){const{headerInfo:o,dataDescriptorInfo:l}=i,{localHeaderArray:f,headerArray:d,lastModDate:u,rawLastModDate:p,encrypted:w,compressed:v,version:h,compressionMethod:c,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b}=o,{dataDescriptorArray:k}=l,{rawFilename:g,lastAccessDate:y,creationDate:x,password:D,level:S,zip64:E,zipCrypto:O,dataDescriptor:U,directory:F,versionMadeBy:B,rawComment:N,rawExtraField:Y,useWebWorkers:j,onstart:q,onprogress:we,onend:W,signal:he,encryptionStrength:V,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,useCompressionStream:Wt}=a,Dt={lock:r,versionMadeBy:B,zip64:E,directory:Boolean(F),filenameUTF8:!0,rawFilename:g,commentUTF8:!0,rawComment:N,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b,rawExtraField:Y,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,diskNumberStart:n};let ht=0,Ht=0,wn;const{writable:Ve}=t;if(e){e.chunkSize=to(s),await Nt(Ve,f);const gn=e.readable,Ee=gn.size=e.size,Ue={options:{codecType:ko,level:S,password:D,encryptionStrength:V,zipCrypto:w&&O,passwordVerification:w&&O&&p>>8&255,signed:!0,compressed:v,encrypted:w,useWebWorkers:j,useCompressionStream:Wt,transferStreams:!1},config:s,streamOptions:{signal:he,size:Ee,onstart:q,onprogress:we,onend:W}},Xt=await Eo({readable:gn,writable:Ve},Ue);Ve.size+=Xt.size,wn=Xt.signature,Ht=e.size=gn.size,ht=Xt.size}else await Nt(Ve,f);const Tt=E?new Uint8Array(Ko+4):new Uint8Array;return e&&Bf({signature:wn,rawExtraFieldZip64:Tt,compressedSize:ht,uncompressedSize:Ht,headerInfo:o,dataDescriptorInfo:l},a),U&&await Nt(Ve,k),Object.assign(Dt,{compressedSize:ht,lastModDate:u,rawLastModDate:p,creationDate:x,lastAccessDate:y,encrypted:w,length:ee(f,k)+ht,compressionMethod:c,version:h,headerArray:d,signature:wn,rawExtraFieldZip64:Tt}),Dt}function Hf(e){const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,password:s,level:a,zip64:o,zipCrypto:l,dataDescriptor:f,directory:d,rawExtraField:u,encryptionStrength:p,extendedTimestamp:w}=e,v=a!==0&&!d,h=Boolean(s&&ee(s));let c;if(h&&!l){c=new Uint8Array(ee(Aa)+2);const N=He(c);re(N,0,Ka),ve(c,Aa,2),yr(N,8,p)}else c=new Uint8Array;let m,_;if(w){_=new Uint8Array(9+(r?4:0)+(i?4:0));const N=He(_);re(N,0,Bi),re(N,2,ee(_)-4);const Y=1+(r?2:0)+(i?4:0);yr(N,4,Y),Q(N,5,Math.floor(n.getTime()/1e3)),r&&Q(N,9,Math.floor(r.getTime()/1e3)),i&&Q(N,13,Math.floor(i.getTime()/1e3));try{m=new Uint8Array(36);const j=He(m),q=li(n);re(j,0,Xa),re(j,2,32),re(j,8,Ja),re(j,10,24),Pe(j,12,q),Pe(j,20,li(r)||q),Pe(j,28,li(i)||q)}catch{m=new Uint8Array}}else m=_=new Uint8Array;let b=vi;f&&(b=b|bi);let k=Va;v&&(k=wi);let g=e.version||rd;o&&(g=g>ia?g:ia),h&&(b=b|yi,l||(g=g>sa?g:sa,k=Ga,v&&(c[9]=wi)));const y=new Uint8Array(26),x=He(y);re(x,0,g),re(x,2,b),re(x,4,k);const D=new Uint32Array(1),S=He(D);let E;naa?E=aa:E=n,re(S,0,(E.getHours()<<6|E.getMinutes())<<5|E.getSeconds()/2),re(S,2,(E.getFullYear()-1980<<4|E.getMonth()+1)<<5|E.getDate());const O=D[0];Q(x,6,O),re(x,22,ee(t));const U=ee(c,_,m,u);re(x,24,U);const F=new Uint8Array(30+ee(t)+U),B=He(F);return Q(B,0,Za),ve(F,y,4),ve(F,t,30),ve(F,c,30+ee(t)),ve(F,_,30+ee(t,c)),ve(F,m,30+ee(t,c,_)),ve(F,u,30+ee(t,c,_,m)),{localHeaderArray:F,headerArray:y,headerView:x,lastModDate:n,rawLastModDate:O,encrypted:h,compressed:v,version:g,compressionMethod:k,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:m,rawExtraFieldAES:c}}function jf(e){const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i=new Uint8Array,s,a=0;return n&&(i=new Uint8Array(t?r?24:20:r?16:12),s=He(i),r&&(a=4,Q(s,0,Jc))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}}function Bf(e,t){const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:s,headerInfo:a,dataDescriptorInfo:o}=e,{headerView:l,encrypted:f}=a,{dataDescriptorView:d,dataDescriptorOffset:u}=o,{zip64:p,zipCrypto:w,dataDescriptor:v}=t;if((!f||w)&&n!==fe&&(Q(l,10,n),v&&Q(d,u,n)),p){const h=He(r);re(h,0,$a),re(h,2,Ko),Q(l,14,pe),Pe(h,12,BigInt(i)),Q(l,18,pe),Pe(h,4,BigInt(s)),v&&(Pe(d,u+4,BigInt(i)),Pe(d,u+12,BigInt(s)))}else Q(l,14,i),Q(l,18,s),v&&(Q(d,u+4,i),Q(d,u+8,s))}async function Vf(e,t,n,{zipCrypto:r}){const i=await qf(t,0,26),s=new DataView(i);return(!e.encrypted||r)&&Q(s,14,e.signature),e.zip64?(Q(s,18,pe),Q(s,22,pe)):(Q(s,18,e.compressedSize),Q(s,22,e.uncompressedSize)),await Nt(n,new Uint8Array(i)),t.slice(i.byteLength)}function Gf(e){const{rawExtraFieldZip64:t,offset:n,diskNumberStart:r}=e,i=He(t);Pe(i,20,BigInt(n)),Q(i,28,r)}async function Zf(e,t,n){const{files:r,writer:i}=e;let s=0,a=0;const{diskOffset:o,writable:l}=i;let{diskNumber:f}=i,d=e.offset-o,u=r.size;for(const[,{rawFilename:k,rawExtraFieldZip64:g,rawExtraFieldAES:y,rawExtraField:x,rawComment:D,rawExtraFieldExtendedTimestamp:S,rawExtraFieldNTFS:E}]of r)a+=46+ee(k,D,g,y,S,E,x);let p=n.zip64||e.options.zip64||!1;if(d>=pe||a>=pe||u>=ke){if(n.zip64===!1||e.options.zip64===!1)throw new Error(ts);p=!0}const w=new Uint8Array(a),v=He(w);for(const[k,g]of Array.from(r.values()).entries()){const{offset:y,rawFilename:x,rawExtraFieldZip64:D,rawExtraFieldAES:S,rawExtraFieldNTFS:E,rawExtraField:O,rawComment:U,versionMadeBy:F,headerArray:B,directory:N,zip64:Y,msDosCompatible:j,internalFileAttribute:q,externalFileAttribute:we,extendedTimestamp:W,lastModDate:he,diskNumberStart:V}=g;let Z;if(W){Z=new Uint8Array(9);const ue=He(Z);re(ue,0,Bi),re(ue,2,ee(Z)-4),yr(ue,4,1),Q(ue,5,Math.floor(he.getTime()/1e3))}else Z=new Uint8Array;const Se=ee(D,S,Z,E,O);if(Q(v,s,gi),re(v,s+4,F),ve(w,B,s+6),re(v,s+30,Se),re(v,s+32,ee(U)),re(v,s+34,Y?ke:V),re(v,s+36,q),we?Q(v,s+38,we):N&&j&&yr(v,s+38,ki),Q(v,s+42,Y?pe:y),ve(w,x,s+46),ve(w,D,s+46+ee(x)),ve(w,S,s+46+ee(x,D)),ve(w,Z,s+46+ee(x,D,S)),ve(w,E,s+46+ee(x,D,S,Z)),ve(w,O,s+46+ee(x,D,S,Z,E)),ve(w,U,s+46+ee(x)+Se),s+=46+ee(x,U)+Se,n.onprogress)try{await n.onprogress(k+1,r.size,new xr(g))}catch{}}await ze(i),await Nt(l,w);const h=new Uint8Array(p?Qc:sn),c=He(h);let m=i.diskNumber;const{availableSize:_}=i;_n&&(t+=n.length)),t}class Xo{constructor(t,n,r,i){const s=this;if(t.root&&i&&i.getChildByName(n))throw new Error("Entry filename already exists");r||(r={}),Object.assign(s,{fs:t,name:n,data:r.data,id:t.entries.length,parent:i,children:[],uncompressedSize:0}),t.entries.push(s),i&&s.parent.children.push(s)}moveTo(t){const n=this;n.fs.move(n,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){const n=this;let r=n.name,i=n.parent;for(;i&&i!=t;)r=(i.name?i.name+"/":"")+r,i=i.parent;return r}isDescendantOf(t){let n=this.parent;for(;n&&n.id!=t.id;)n=n.parent;return Boolean(n)}}class Jo extends Xo{constructor(t,n,r,i){super(t,n,r,i);const s=this;s.Reader=r.Reader,s.Writer=r.Writer,r.getData&&(s.getData=r.getData)}async getData(t,n={}){const r=this;if(!t||t.constructor==r.Writer&&r.data)return r.data;{const i=r.reader=new r.Reader(r.data,n);await Promise.all([ze(i),ze(t,r.data.uncompressedSize)]);const s=i.readable;return s.size=r.uncompressedSize=i.size,await s.pipeTo(t.writable),t.getData?t.getData():t.writable}}getText(t,n){return this.getData(new Ti(t),n)}getBlob(t,n){return this.getData(new $t(t),n)}getData64URI(t,n){return this.getData(new wr(t),n)}getUint8Array(t){return this.getData(new gr,t)}getWritable(t=new WritableStream,n){return this.getData({writable:t},n)}replaceBlob(t){Object.assign(this,{data:t,Reader:hn,Writer:$t,reader:null})}replaceText(t){Object.assign(this,{data:t,Reader:Ao,Writer:Ti,reader:null})}replaceData64URI(t){Object.assign(this,{data:t,Reader:Di,Writer:wr,reader:null})}replaceUint8Array(t){Object.assign(this,{data:t,Reader:Ri,Writer:gr,reader:null})}replaceReadable(t){Object.assign(this,{data:null,Reader:function(){return{readable:t}},Writer:null,reader:null})}}class Hn extends Xo{constructor(t,n,r,i){super(t,n,r,i),this.directory=!0}addDirectory(t){return mt(this,t,null,!0)}addText(t,n){return mt(this,t,{data:n,Reader:Ao,Writer:Ti})}addBlob(t,n){return mt(this,t,{data:n,Reader:hn,Writer:$t})}addData64URI(t,n){return mt(this,t,{data:n,Reader:Di,Writer:wr})}addUint8Array(t,n){return mt(this,t,{data:n,Reader:Ri,Writer:gr})}addHttpContent(t,n,r={}){return mt(this,t,{data:n,Reader:class extends ba{constructor(i){super(i,r)}}})}addReadable(t,n){return mt(this,t,{Reader:function(){return{readable:n}}})}addFileSystemEntry(t){return eu(this,t)}addData(t,n){return mt(this,t,n)}async importBlob(t,n={}){await this.importZip(new hn(t),n)}async importData64URI(t,n={}){await this.importZip(new Di(t),n)}async importUint8Array(t,n={}){await this.importZip(new Ri(t),n)}async importHttpContent(t,n={}){await this.importZip(new ba(t,n),n)}async importReadable(t,n={}){await this.importZip({readable:t},n)}exportBlob(t={}){return this.exportZip(new $t("application/zip"),t)}exportData64URI(t={}){return this.exportZip(new wr("application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new gr,t)}async exportWritable(t=new WritableStream,n={}){return await this.exportZip({writable:t},n),t}async importZip(t,n){await ze(t),(await new bf(t,n).getEntries()).forEach(s=>{let a=this;const o=s.filename.split("/"),l=o.pop();o.forEach(f=>a=a.getChildByName(f)||new Hn(this.fs,f,null,a)),s.directory||mt(a,l,{data:s,Reader:Jf(Object.assign({},n))})})}async exportZip(t,n){const r=this;await Promise.all([Qo(r),ze(t)]);const i=new Pf(t,n);return await Qf(i,r,Xf([r],"uncompressedSize"),n),await i.close(),t.getData?t.getData():t.writable}getChildByName(t){const n=this.children;for(let r=0;r{n.id==e.id&&t.splice(r,1)})}async function Qf(e,t,n,r){const i=t,s=new Map;await a(e,t);async function a(o,l){await f();async function f(){if(r.bufferedWrite)await Promise.all(l.children.map(d));else for(const u of l.children)await d(u)}async function d(u){const p=r.relativePath?u.getRelativeName(i):u.getFullname();await o.add(p,u.reader,Object.assign({directory:u.directory},Object.assign({},r,{onprogress:async w=>{if(r.onprogress){s.set(p,w);try{await r.onprogress(Array.from(s.values()).reduce((v,h)=>v+h),n)}catch{}}}}))),await a(o,u)}}}async function eu(e,t){if(t.isDirectory){const i=e.addDirectory(t.name);return await n(i,t),i}else return new Promise((i,s)=>t.file(a=>i(e.addBlob(t.name,a)),s));async function n(i,s){const a=await r(s);for(const o of a)o.isDirectory?await n(i.addDirectory(o.name),o):await new Promise((l,f)=>{o.file(d=>{const u=i.addBlob(o.name,d);u.uncompressedSize=d.size,l(u)},f)})}function r(i){return new Promise((s,a)=>{let o=[];i.isDirectory&&l(i.createReader()),i.isFile&&s(o);function l(f){f.readEntries(d=>{d.length?(o=o.concat(d),l(f)):s(o)},a)}})}}function en(e){e.entries=[],e.root=new Hn(e)}function mt(e,t,n,r){if(e.directory)return r?new Hn(e.fs,t,n,e):new Jo(e.fs,t,n,e);throw new Error("Parent entry is not a directory")}let el;try{el=import.meta.url}catch{}Gi({baseURL:el});Gd(Gi);Gi({Deflate:Rc,Inflate:Xc});function Ir(e){return e.slice(e.lastIndexOf(Fr)+1)}const Fr="/";async function tu(e,t,n){const r=e.vaultPath+"/.obsidian/"+t+".json";let i;return e.adapter.exists(r)&&(i=JSON.parse(await e.adapter.readFile(r))),n(i)}class nu{constructor(t){jt(this,"zipFS");jt(this,"chunks",[]);jt(this,"chunkIndex",0);this.zipBlob=t}async initReadingVault(){this.zipFS=new Kf.FS,await this.zipFS.importBlob(this.zipBlob)}readDirectory(t){return this.zipFS.find(t).children.map(r=>({isDirectory:()=>!!r.directory,getName:()=>r.getFullname()}))}readFile(t){return this.zipFS.find(t).getText("utf-8")}exists(t){return!!this.zipFS.find(t)}resolve(t){return t}resolveInDir(t,n){return t+Fr+n}removeFile(t){}renameFile(t,n){}flushResultsFromInitialProcessing(t){}appendToResultFile(t,n){this.chunks.push(n)}appendToPostProcessingFile(t,n){this.chunks[this.chunkIndex]=n,this.chunkIndex++}initPostProcessingResultFile(t){}chunkIter(){const t=this.chunks;let n=0;return{[Symbol.asyncIterator](){return{async next(){if(n{if(s.forEach((o,l)=>s[l]+=a),r==="seenOne"&&a!=="["&&(r="normal"),r==="seenOneOut"&&a!=="]"&&(r="normal"),a==="["&&(i+=1,r==="seenOne"?(s.push(""),r="normal"):r==="normal"&&(r="seenOne")),a==="]"&&i>0){if(i-=1,r==="seenOneOut"){const o=s.pop();o&&(!t||s.length===0)&&n.push(o.slice(0,-2)),r="normal"}else r==="normal"&&(r="seenOneOut");i===0&&(r="normal")}}),n}function su(e){return Ir(e)!==e}class ci{constructor(){jt(this,"nameWasCalledAsFile",[]);jt(this,"pathMap",new Map);jt(this,"nameMap",new Map)}accessAsFile(t,n,r){const i=this.pathMap.get(n);if(i)return this.nameMap.get(t)||this.nameMap.set(t,i),i;const s=this.nameMap.get(t);if(s&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,s),this.nameWasCalledAsFile.push(t),s;const a=r();return this.pathMap.set(n,a),this.nameMap.get(t)||this.nameMap.set(t,a),this.nameWasCalledAsFile.push(t),a}accessAsLink(t,n){const r=this.findData(t);if(r)return r;const i=su(t),s=n();return i?this.pathMap.set(t,s):this.nameMap.set(t,s),s}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Lr(e){e.totalNodes++,e.leafNodes++}function tl(e){e.leafNodes--,e.topLevelNodes++}function au(e,t,n=ru,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new ci,headingTracker:new ci,dummyHeadingLinkTracker:new Map,blockLinkTracker:new ci,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function vt(e){return Lr(e.summary),e.idGenerator()}function ou(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map);let s=i.get(r);return s||(s={uid:vt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function lu(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map);let a=s.get(i);return a||(a={uid:vt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function cu(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function du(e){let t;return[e.split(` +var pc=Object.defineProperty;var _c=(e,t,n)=>t in e?pc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Bt=(e,t,n)=>(_c(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const In=15,mi=30,pi=19,wc=29,ur=256,Hi=ur+1+wc,Is=2*Hi+1,yn=256,gc=7,Fs=16,Ls=17,Cs=18,$r=8*2,hr=-1,xc=1,qn=2,yc=0,rn=0,Ns=1,bc=3,Le=4,Qe=0,Wa=1,zn=2,et=-2,vc=-3,Qt=-5;function Tr(e){return Ar(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function Ar(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?Ar(n):n),[])}const Ps=[0,1,2,3].concat(...Tr([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function se(){const e=this;function t(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,f=e.stat_desc.max_length;let d,u,p,w,v,h,c=0;for(w=0;w<=In;w++)i.bl_count[w]=0;for(s[i.heap[i.heap_max]*2+1]=0,d=i.heap_max+1;df&&(w=f,c++),s[u*2+1]=w,!(u>e.max_code)&&(i.bl_count[w]++,v=0,u>=l&&(v=o[u-l]),h=s[u*2],i.opt_len+=h*(w+v),a&&(i.static_len+=h*(a[u*2+1]+v)));if(c!==0){do{for(w=f-1;i.bl_count[w]===0;)w--;i.bl_count[w]--,i.bl_count[w+1]+=2,i.bl_count[f]--,c-=2}while(c>0);for(w=f;w!==0;w--)for(u=i.bl_count[w];u!==0;)p=i.heap[--d],!(p>e.max_code)&&(s[p*2+1]!=w&&(i.opt_len+=(w-s[p*2+1])*s[p*2],s[p*2+1]=w),u--)}}function n(i,s){let a=0;do a|=i&1,i>>>=1,a<<=1;while(--s>0);return a>>>1}function r(i,s,a){const o=[];let l=0,f,d,u;for(f=1;f<=In;f++)o[f]=l=l+a[f-1]<<1;for(d=0;d<=s;d++)u=i[d*2+1],u!==0&&(i[d*2]=n(o[u]++,u))}e.build_tree=function(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.elems;let l,f,d=-1,u;for(i.heap_len=0,i.heap_max=Is,l=0;l=1;l--)i.pqdownheap(s,l);u=o;do l=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(s,1),f=i.heap[1],i.heap[--i.heap_max]=l,i.heap[--i.heap_max]=f,s[u*2]=s[l*2]+s[f*2],i.depth[u]=Math.max(i.depth[l],i.depth[f])+1,s[l*2+1]=s[f*2+1]=u,i.heap[1]=u++,i.pqdownheap(s,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],t(i),r(s,e.max_code,i.bl_count)}}se._length_code=[0,1,2,3,4,5,6,7].concat(...Tr([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));se.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];se.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];se.d_code=function(e){return e<256?Ps[e]:Ps[256+(e>>>7)]};se.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];se.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];se.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];se.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function De(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}const kc=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],Sc=Tr([[144,8],[112,9],[24,7],[8,8]]);De.static_ltree=Ar(kc.map((e,t)=>[e,Sc[t]]));const Ec=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],Dc=Tr([[30,5]]);De.static_dtree=Ar(Ec.map((e,t)=>[e,Dc[t]]));De.static_l_desc=new De(De.static_ltree,se.extra_lbits,ur+1,Hi,In);De.static_d_desc=new De(De.static_dtree,se.extra_dbits,0,mi,In);De.static_bl_desc=new De(null,se.extra_blbits,0,pi,gc);const Tc=9,Ac=8;function at(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const Ha=0,sr=1,qt=2,Je=[new at(0,0,0,0,Ha),new at(4,4,8,4,sr),new at(4,5,16,8,sr),new at(4,6,32,32,sr),new at(4,4,16,16,qt),new at(8,16,32,32,qt),new at(8,16,128,128,qt),new at(8,32,128,256,qt),new at(32,128,258,1024,qt),new at(32,258,258,4096,qt)],$n=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ge=0,Kn=1,bn=2,Xn=3,Oc=32,Kr=42,Jn=113,vn=666,Xr=8,Rc=0,Jr=1,Mc=2,ce=3,ar=258,Ye=ar+ce+1;function Us(e,t,n,r){const i=e[t*2],s=e[n*2];return i=3&&j[se.bl_order[T]*2+1]===0;T--);return e.opt_len+=3*(T+1)+5+5+4,T}function Ve(T){e.pending_buf[e.pending++]=T}function At(T){Ve(T&255),Ve(T>>>8&255)}function gn(T){Ve(T>>8&255),Ve(T&255&255)}function Ee(T,R){let O;const I=R;ge>$r-I?(O=T,ue|=O<>>$r-ge,ge+=I-$r):(ue|=T<=8&&(Ve(ue&255),ue>>>=8,ge-=8)}function lc(){Ee(Jr<<1,3),Ue(yn,De.static_ltree),Es(),1+Se+10-ge<9&&(Ee(Jr<<1,3),Ue(yn,De.static_ltree),Es()),Se=7}function xn(T,R){let O,I,P;if(e.dist_buf[V]=T,e.lc_buf[V]=R&255,V++,T===0?N[R*2]++:(Z++,T--,N[(se._length_code[R]+ur+1)*2]++,Y[se.d_code(T)*2]++),(V&8191)===0&&A>2){for(O=V*8,I=g-m,P=0;P>>=3,Z8?At(ue):ge>0&&Ve(ue&255),ue=0,ge=0}function cc(T,R,O){Ts(),Se=8,O&&(At(R),At(~R)),e.pending_buf.set(l.subarray(T,T+R),e.pending),e.pending+=R}function As(T,R,O){Ee((Rc<<1)+(O?1:0),3),cc(T,R,!0)}function dc(T,R,O){let I,P,G=0;A>0?(q.build_tree(e),we.build_tree(e),G=wn(),I=e.opt_len+3+7>>>3,P=e.static_len+3+7>>>3,P<=I&&(I=P)):I=P=R+5,R+4<=I&&T!=-1?As(T,R,O):P==I?(Ee((Jr<<1)+(O?1:0),3),Ds(De.static_ltree,De.static_dtree)):(Ee((Mc<<1)+(O?1:0),3),oc(q.max_code+1,we.max_code+1,G+1),Ds(N,Y)),Tt(),O&&Ts()}function Ot(T){dc(m>=0?m:-1,g-m,T),m=g,t.flush_pending()}function qr(){let T,R,O,I;do{if(I=f-x-g,I===0&&g===0&&x===0)I=s;else if(I==-1)I--;else if(g>=s+s-Ye){l.set(l.subarray(s,s+s),0),y-=s,g-=s,m-=s,T=w,O=T;do R=u[--O]&65535,u[O]=R>=s?R-s:0;while(--T!==0);T=s,O=T;do R=d[--O]&65535,d[O]=R>=s?R-s:0;while(--T!==0);I+=s}if(t.avail_in===0)return;T=t.read_buf(l,g+x,I),x+=T,x>=ce&&(p=l[g]&255,p=(p<r-5&&(R=r-5);;){if(x<=1){if(qr(),x===0&&T==rn)return Ge;if(x===0)break}if(g+=x,x=0,O=m+R,(g===0||g>=O)&&(x=g-O,g=O,Ot(!1),t.avail_out===0)||g-m>=s-Ye&&(Ot(!1),t.avail_out===0))return Ge}return Ot(T==Le),t.avail_out===0?T==Le?bn:Ge:T==Le?Xn:Kn}function Os(T){let R=S,O=g,I,P,G=D;const K=g>s-Ye?g-(s-Ye):0;let Me=B;const Xe=o,zr=g+ar;let Rs=l[O+G-1],Ms=l[O+G];D>=F&&(R>>=2),Me>x&&(Me=x);do if(I=T,!(l[I+G]!=Ms||l[I+G-1]!=Rs||l[I]!=l[O]||l[++I]!=l[O+1])){O+=2,I++;do;while(l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&OG){if(y=T,G=P,P>=Me)break;Rs=l[O+G-1],Ms=l[O+G]}}while((T=d[T&Xe]&65535)>K&&--R!==0);return G<=x?G:x}function uc(T){let R=0,O;for(;;){if(x=ce&&(p=(p<=ce)if(O=xn(g-y,_-ce),x-=_,_<=E&&x>=ce){_--;do g++,p=(p<=ce&&(p=(p<4096)&&(_=ce-1)),D>=ce&&_<=D){I=g+x-ce,O=xn(g-1-b,D-ce),x-=D-1,D-=2;do++g<=I&&(p=(p<Tc||I!=Xr||O<9||O>15||R<0||R>9||G<0||G>qn?et:(T.dstate=e,a=O,s=1<9||O<0||O>qn?et:(Je[A].func!=Je[R].func&&T.total_in!==0&&(I=T.deflate(Ns)),A!=R&&(A=R,E=Je[A].max_lazy,F=Je[A].good_length,B=Je[A].nice_length,S=Je[A].max_chain),U=O,I)},e.deflateSetDictionary=function(T,R,O){let I=O,P,G=0;if(!R||n!=Kr)return et;if(Is-Ye&&(I=s-Ye,G=O-I),l.set(R.subarray(G,G+I),0),g=I,m=I,p=l[0]&255,p=(p<Le||R<0)return et;if(!T.next_out||!T.next_in&&T.avail_in!==0||n==vn&&R!=Le)return T.msg=$n[zn-et],et;if(T.avail_out===0)return T.msg=$n[zn-Qt],Qt;if(t=T,G=i,i=R,n==Kr&&(I=Xr+(a-8<<4)<<8,P=(A-1&255)>>1,P>3&&(P=3),I|=P<<6,g!==0&&(I|=Oc),I+=31-I%31,n=Jn,gn(I)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,Qe}else if(t.avail_in===0&&R<=G&&R!=Le)return t.msg=$n[zn-Qt],Qt;if(n==vn&&t.avail_in!==0)return T.msg=$n[zn-Qt],Qt;if(t.avail_in!==0||x!==0||R!=rn&&n!=vn){switch(K=-1,Je[A].func){case Ha:K=fc(R);break;case sr:K=uc(R);break;case qt:K=hc(R);break}if((K==bn||K==Xn)&&(n=vn),K==Ge||K==bn)return t.avail_out===0&&(i=-1),Qe;if(K==Kn){if(R==Ns)lc();else if(As(0,0,!1),R==bc)for(O=0;On&&(i=n),i===0?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Fc(e){const t=this,n=new ja,r=Lc(e&&e.chunkSize?e.chunkSize:64*1024),i=rn,s=new Uint8Array(r);let a=e?e.level:hr;typeof a>"u"&&(a=hr),n.deflateInit(a),n.next_out=s,t.append=function(o,l){let f,d,u=0,p=0,w=0;const v=[];if(!!o.length){n.next_in_index=0,n.next_in=o,n.avail_in=o.length;do{if(n.next_out_index=0,n.avail_out=r,f=n.deflate(i),f!=Qe)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?v.push(new Uint8Array(s)):v.push(s.slice(0,n.next_out_index))),w+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=u&&(l(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return v.length>1?(d=new Uint8Array(w),v.forEach(function(h){d.set(h,p),p+=h.length})):d=v[0]||new Uint8Array,d}},t.flush=function(){let o,l,f=0,d=0;const u=[];do{if(n.next_out_index=0,n.avail_out=r,o=n.deflate(Le),o!=Wa&&o!=Qe)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&u.push(s.slice(0,n.next_out_index)),d+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),l=new Uint8Array(d),u.forEach(function(p){l.set(p,f),f+=p.length}),l}}function Lc(e){return e+5*(Math.floor(e/16383)+1)}const Cc=15,J=0,yt=1,Nc=2,Ne=-2,ae=-3,Ys=-4,bt=-5,We=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ba=1440,Pc=0,Uc=4,Yc=9,Wc=5,Hc=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],jc=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Bc=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Vc=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Gc=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Zc=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Rt=15;function _i(){const e=this;let t,n,r,i,s,a;function o(f,d,u,p,w,v,h,c,m,_,b){let k,g,y,x,D,S,E,A,U,F,B,N,Y,j,q;F=0,D=u;do r[f[d+F]]++,F++,D--;while(D!==0);if(r[0]==u)return h[0]=-1,c[0]=0,J;for(A=c[0],S=1;S<=Rt&&r[S]===0;S++);for(E=S,AD&&(A=D),c[0]=A,j=1<N+A;){if(x++,N+=A,q=y-N,q=q>A?A:q,(g=1<<(S=E-N))>k+1&&(g-=k+1,Y=E,SBa)return ae;s[x]=B=_[0],_[0]+=q,x!==0?(a[x]=D,i[0]=S,i[1]=A,S=D>>>N-A,i[2]=B-s[x-1]-S,m.set(i,(s[x-1]+S)*3)):h[0]=B}for(i[1]=E-N,F>=u?i[0]=128+64:b[F]>>N;S>>=1)D^=S;for(D^=S,U=(1<257?(_==ae?m.msg="oversubscribed distance tree":_==bt?(m.msg="incomplete distance tree",_=ae):_!=Ys&&(m.msg="empty distance tree with lengths",_=ae),_):J)}}_i.inflate_trees_fixed=function(e,t,n,r){return e[0]=Yc,t[0]=Wc,n[0]=Hc,r[0]=jc,J};const Qn=0,Ws=1,Hs=2,js=3,Bs=4,Vs=5,Gs=6,Qr=7,Zs=8,er=9;function qc(){const e=this;let t,n=0,r,i=0,s=0,a=0,o=0,l=0,f=0,d=0,u,p=0,w,v=0;function h(c,m,_,b,k,g,y,x){let D,S,E,A,U,F,B,N,Y,j,q,we,W,he,V,Z;B=x.next_in_index,N=x.avail_in,U=y.bitb,F=y.bitk,Y=y.write,j=Y>=S[Z+1],F-=S[Z+1],y.win[Y++]=S[Z+2],j--;continue}do{if(U>>=S[Z+1],F-=S[Z+1],(A&16)!==0){for(A&=15,W=S[Z+2]+(U&We[A]),U>>=A,F-=A;F<15;)N--,U|=(x.read_byte(B++)&255)<>=S[Z+1],F-=S[Z+1],(A&16)!==0){for(A&=15;F>=A,F-=A,j-=W,Y>=he)V=Y-he,Y-V>0&&2>Y-V?(y.win[Y++]=y.win[V++],y.win[Y++]=y.win[V++],W-=2):(y.win.set(y.win.subarray(V,V+2),Y),Y+=2,V+=2,W-=2);else{V=Y-he;do V+=y.end;while(V<0);if(A=y.end-V,W>A){if(W-=A,Y-V>0&&A>Y-V)do y.win[Y++]=y.win[V++];while(--A!==0);else y.win.set(y.win.subarray(V,V+A),Y),Y+=A,V+=A,A=0;V=0}}if(Y-V>0&&W>Y-V)do y.win[Y++]=y.win[V++];while(--W!==0);else y.win.set(y.win.subarray(V,V+W),Y),Y+=W,V+=W,W=0;break}else if((A&64)===0)D+=S[Z+2],D+=U&We[A],Z=(E+D)*3,A=S[Z];else return x.msg="invalid distance code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae;while(!0);break}if((A&64)===0){if(D+=S[Z+2],D+=U&We[A],Z=(E+D)*3,(A=S[Z])===0){U>>=S[Z+1],F-=S[Z+1],y.win[Y++]=S[Z+2],j--;break}}else return(A&32)!==0?(W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,yt):(x.msg="invalid literal/length code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae)}while(!0)}while(j>=258&&N>=10);return W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,J}e.init=function(c,m,_,b,k,g){t=Qn,f=c,d=m,u=_,p=b,w=k,v=g,r=null},e.proc=function(c,m,_){let b,k,g,y=0,x=0,D=0,S,E,A,U;for(D=m.next_in_index,S=m.avail_in,y=c.bitb,x=c.bitk,E=c.write,A=E=258&&S>=10&&(c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,_=h(f,d,u,p,w,v,c,m),D=m.next_in_index,S=m.avail_in,y=c.bitb,x=c.bitk,E=c.write,A=E>>=r[k+1],x-=r[k+1],g=r[k],g===0){a=r[k+2],t=Gs;break}if((g&16)!==0){o=g&15,n=r[k+2],t=Hs;break}if((g&64)===0){s=g,i=k/3+r[k+2];break}if((g&32)!==0){t=Qr;break}return t=er,m.msg="invalid literal/length code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,c.inflate_flush(m,_);case Hs:for(b=o;x>=b,x-=b,s=d,r=w,i=v,t=js;case js:for(b=s;x>=r[k+1],x-=r[k+1],g=r[k],(g&16)!==0){o=g&15,l=r[k+2],t=Bs;break}if((g&64)===0){s=g,i=k/3+r[k+2];break}return t=er,m.msg="invalid distance code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,c.inflate_flush(m,_);case Bs:for(b=o;x>=b,x-=b,t=Vs;case Vs:for(U=E-l;U<0;)U+=c.end;for(;n!==0;){if(A===0&&(E==c.end&&c.read!==0&&(E=0,A=E7&&(x-=8,S++,D--),c.write=E,_=c.inflate_flush(m,_),E=c.write,A=Eh.avail_out&&(m=h.avail_out),m!==0&&c==bt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m,b==n.end&&(b=0,n.write==n.end&&(n.write=0),m=n.write-b,m>h.avail_out&&(m=h.avail_out),m!==0&&c==bt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m),h.next_out_index=_,n.read=b,c},n.proc=function(h,c){let m,_,b,k,g,y,x,D;for(k=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y>>1){case 0:_>>>=3,b-=3,m=b&7,_>>>=m,b-=m,r=ei;break;case 1:S=[],E=[],A=[[]],U=[[]],_i.inflate_trees_fixed(S,E,A,U),d.init(S[0],E[0],A[0],0,U[0],0),_>>>=3,b-=3,r=tr;break;case 2:_>>>=3,b-=3,r=$s;break;case 3:return _>>>=3,b-=3,r=Vt,h.msg="invalid block type",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c)}break;case ei:for(;b<32;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<>>16&65535)!=(_&65535))return r=Vt,h.msg="invalid stored block lengths",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);i=_&65535,_=b=0,r=i!==0?zs:u!==0?nr:en;break;case zs:if(g===0||x===0&&(y==n.end&&n.read!==0&&(y=0,x=yg&&(m=g),m>x&&(m=x),n.win.set(h.read_buf(k,m),y),k+=m,g-=m,y+=m,x-=m,(i-=m)!==0)break;r=u!==0?nr:en;break;case $s:for(;b<14;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<29||(m>>5&31)>29)return r=Vt,h.msg="too many length or distance symbols",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);if(m=258+(m&31)+(m>>5&31),!o||o.length>>=14,b-=14,a=0,r=Ks;case Ks:for(;a<4+(s>>>10);){for(;b<3;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<>>=3,b-=3}for(;a<19;)o[qs[a++]]=0;if(l[0]=7,m=v.inflate_trees_bits(o,l,f,p,h),m!=J)return c=m,c==ae&&(o=null,r=Vt),n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);a=0,r=Xs;case Xs:for(;m=s,!(a>=258+(m&31)+(m>>5&31));){let j,q;for(m=l[0];b>>=m,b-=m,o[a++]=q;else{for(D=q==18?7:q-14,j=q==18?11:3;b>>=m,b-=m,j+=_&We[D],_>>>=D,b-=D,D=a,m=s,D+j>258+(m&31)+(m>>5&31)||q==16&&D<1)return o=null,r=Vt,h.msg="invalid bit length repeat",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);q=q==16?o[D-1]:0;do o[D++]=q;while(--j!==0);a=D}}if(f[0]=-1,F=[],B=[],N=[],Y=[],F[0]=9,B[0]=6,m=s,m=v.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),o,F,B,N,Y,p,h),m!=J)return m==ae&&(o=null,r=Vt),c=m,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);d.init(F[0],B[0],p,N[0],p,Y[0]),r=tr;case tr:if(n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,(c=d.proc(n,h,c))!=yt)return n.inflate_flush(h,c);if(c=J,d.free(h),k=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y15?(e.inflateEnd(n),Ne):(e.wbits=r,n.istate.blocks=new zc(n,1<>4)+8>a.wbits){a.mode=Mt,n.msg="invalid win size",a.marker=5;break}a.mode=Qs;case Qs:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,s=n.read_byte(n.next_in_index++)&255,((a.method<<8)+s)%31!==0){a.mode=Mt,n.msg="incorrect header check",a.marker=5;break}if((s&$c)===0){a.mode=kn;break}a.mode=ea;case ea:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,a.mode=ta;case ta:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,a.mode=na;case na:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,a.mode=ra;case ra:return n.avail_in===0?i:(i=r,n.avail_in--,n.total_in++,a.need+=n.read_byte(n.next_in_index++)&255,a.mode=ti,Nc);case ti:return a.mode=Mt,n.msg="need dictionary",a.marker=0,Ne;case kn:if(i=a.blocks.proc(n,i),i==ae){a.mode=Mt,a.marker=0;break}if(i==J&&(i=r),i!=yt)return i;i=r,a.blocks.reset(n,a.was),a.mode=ia;case ia:return n.avail_in=0,yt;case Mt:return ae;default:return Ne}},e.inflateSetDictionary=function(n,r,i){let s=0,a=i;if(!n||!n.istate||n.istate.mode!=ti)return Ne;const o=n.istate;return a>=1<0&&n.next_in_index!=p&&(l(n.next_in_index),p=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return f.length>1?(u=new Uint8Array(v),f.forEach(function(h){u.set(h,w),w+=h.length})):u=f[0]||new Uint8Array,u}},t.flush=function(){n.inflateEnd()}}const pe=4294967295,ke=65535,wi=8,Ga=0,Za=99,qa=67324752,ji=134695760,td=ji,gi=33639248,za=101010256,xi=101075792,$a=117853008,an=22,An=20,On=56,nd=an+An+On,Ka=1,Xa=39169,Ja=10,Qa=1,Bi=21589,rd=28789,id=25461,yi=1,sd=6,bi=8,vi=2048,ki=16,ad=20,sa=45,aa=51,or="/",oa=new Date(2107,11,31),la=new Date(1980,0,1),fe=void 0,mr="undefined",eo="function";class ca{constructor(t){return class extends TransformStream{constructor(n,r){const i=new t(r);super({transform(s,a){a.enqueue(i.append(s))},flush(s){const a=i.flush();a&&s.enqueue(a)}})}}}}const od=64;let to=2;try{typeof navigator!=mr&&navigator.hardwareConcurrency&&(to=navigator.hardwareConcurrency)}catch{}const ld={chunkSize:512*1024,maxWorkers:to,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:fe,CompressionStreamNative:typeof CompressionStream!=mr&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=mr&&DecompressionStream},Lt=Object.assign({},ld);function Vi(){return Lt}function no(e){return Math.max(e.chunkSize,od)}function Gi(e){const{baseURL:t,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:i,useCompressionStream:s,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:f,DecompressionStream:d,workerScripts:u}=e;if(It("baseURL",t),It("chunkSize",n),It("maxWorkers",r),It("terminateWorkerTimeout",i),It("useCompressionStream",s),It("useWebWorkers",a),o&&(Lt.CompressionStream=new ca(o)),l&&(Lt.DecompressionStream=new ca(l)),It("CompressionStream",f),It("DecompressionStream",d),u!==fe){const{deflate:p,inflate:w}=u;if((p||w)&&(Lt.workerScripts||(Lt.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");Lt.workerScripts.deflate=p}if(w){if(!Array.isArray(w))throw new Error("workerScripts.inflate must be an array");Lt.workerScripts.inflate=w}}}function It(e,t){t!==fe&&(Lt[e]=t)}const Sn={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin",cap:["cap","pcap"],"cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",javascript:"js",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":"odm","vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-debian-package":["deb","udeb"],"x-director":["dcr","dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-koan":["skp","skd","skt","skm"],"x-kpresenter":["kpr","kpt"],"x-kword":["kwd","kwt"],"x-latex":"latex","x-lha":"lha","x-lyx":"lyx","x-lzh":"lzh","x-lzx":"lzx","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-ms-wmd":"wmd","x-ms-wmz":"wmz","x-msdos-program":["com","exe","bat","dll"],"x-msi":"msi","x-netcdf":["nc","cdf"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":"rpm","x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tcl":"tcl","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-troff":["t","tr","roff"],"x-troff-man":"man","x-troff-me":"me","x-troff-ms":"ms","x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix",json:"json","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":"mathml",mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","x-msdownload":["exe","dll","com","bat","msi"],"x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tads":"gam","x-tex":"tex","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-compressed":"tgz","x-gzip":"gz","x-perfmon":["pma","pmc","pml","pmr","pmw"],"x-pkcs7-mime":["p7c","p7m"],"ynd.ms-pkipko":"pko"},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":["aif","aiff","aifc"],"x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2","x-wav":"wav",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":["mmd","mmod"],"x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":["sd","sdf"],"x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","mpc","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":["val","aso"],"x-pdb":["pdb","ent"],"x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-photoshop":"psd","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",pipeg:"jfif"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":["x3d","x3dz"],"x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:["tm","ts"],"tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{avif:".avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","vrml","wrl","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const t in Sn)if(Sn.hasOwnProperty(t)){for(const n in Sn[t])if(Sn[t].hasOwnProperty(n)){const r=Sn[t][n];if(typeof r=="string")e[r]=t+"/"+n;else for(let i=0;i>>1^3988292384:t=t>>>1;ro[e]=t}class pr{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let r=0,i=t.length|0;r>>8^ro[(n^t[r])&255];this.crc=n}get(){return~this.crc}}class io extends TransformStream{constructor(){const t=new pr;super({transform(n){t.append(n)},flush(n){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t.get()),n.enqueue(r)}})}}function Si(e){if(typeof TextEncoder>"u"){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n0&&t&&(e[n-1]=Fe.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let a=0;a>>t),n=e[a]<<32-t;const i=e.length?e[e.length-1]:0,s=Fe.getPartial(i);return r.push(Fe.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},_r={bytes:{fromBits(e){const n=Fe.bitLength(e)/8,r=new Uint8Array(n);let i;for(let s=0;s>>24,i<<=8;return r},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let o=t.blockSize+r-(t.blockSize+r&t.blockSize-1);o<=i;o+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=Fe.concat(t,[Fe.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r},_S(e,t){return t<>>32-e},_block(e){const t=this,n=t._h,r=Array(80);for(let f=0;f<16;f++)r[f]=e[f];let i=n[0],s=n[1],a=n[2],o=n[3],l=n[4];for(let f=0;f<=79;f++){f>=16&&(r[f]=t._S(1,r[f-3]^r[f-8]^r[f-14]^r[f-16]));const d=t._S(5,i)+t._f(f,s,a,o)+l+r[f]+t._key[Math.floor(f/20)]|0;l=o,o=a,a=t._S(30,s),s=i,i=d}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+l|0}};const so={};so.aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,o,l=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;s<4*i+28;s++){let f=a[s-1];(s%i===0||i===8&&s%i===4)&&(f=n[f>>>24]<<24^n[f>>16&255]<<16^n[f>>8&255]<<8^n[f&255],s%i===0&&(f=f<<8^f>>>24^l<<24,l=l<<1^(l>>7)*283)),a[s]=a[s-i]^f}for(let f=0;s;f++,s--){const d=a[f&3?s:s-4];s<=4||f<4?o[f]=d:o[f]=r[0][n[d>>>24]]^r[1][n[d>>16&255]]^r[2][n[d>>8&255]]^r[3][n[d&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,o,l,f;for(let d=0;d<256;d++)s[(i[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let u=a^a<<1^a<<2^a<<3^a<<4;u=u>>8^u&255^99,n[d]=u,r[u]=d,f=i[l=i[o=i[d]]];let p=f*16843009^l*65537^o*257^d*16843008,w=i[u]*257^u*16843008;for(let v=0;v<4;v++)e[v][d]=w=w<<24^w>>>8,t[v][u]=p=p<<24^p>>>8}for(let d=0;d<5;d++)e[d]=e[d].slice(0),t[d]=t[d].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],l=s[2],f=s[3],d=s[4];let u=e[0]^n[0],p=e[t?3:1]^n[1],w=e[2]^n[2],v=e[t?1:3]^n[3],h=4,c,m,_;for(let b=0;b>>24]^o[p>>16&255]^l[w>>8&255]^f[v&255]^n[h],m=a[p>>>24]^o[w>>16&255]^l[v>>8&255]^f[u&255]^n[h+1],_=a[w>>>24]^o[v>>16&255]^l[u>>8&255]^f[p&255]^n[h+2],v=a[v>>>24]^o[u>>16&255]^l[p>>8&255]^f[w&255]^n[h+3],h+=4,u=c,p=m,w=_;for(let b=0;b<4;b++)i[t?3&-b:b]=d[u>>>24]<<24^d[p>>16&255]<<16^d[w>>8&255]<<8^d[v&255]^n[h++],c=u,u=p,p=w,w=v,v=c;return i}};const cd={getRandomValues(e){const t=new Uint32Array(e.buffer),n=r=>{let i=987654321;const s=4294967295;return function(){return i=36969*(i&65535)+(i>>16)&s,r=18e3*(r&65535)+(r>>16)&s,(((i<<16)+r&s)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r>24&255)===255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=Fe.bitLength(t);for(let s=0;s>5)+1<<2;let s,a,o,l,f;const d=new ArrayBuffer(i),u=new DataView(d);let p=0;const w=Fe;for(t=_r.bytes.toBits(t),f=1;p<(i||1);f++){for(s=a=e.encrypt(w.concat(t,[f])),o=1;oi&&(e=n.hash(e));for(let s=0;sthis.resolveReady=i),password:t,signed:n,strength:r-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;o?(await Sd(a,l,o,qe(i,0,Fn[l]+2)),i=qe(i,Fn[l]+2),f()):await d;const u=new Uint8Array(i.length-Ft-(i.length-Ft)%on);s.enqueue(_o(a,i,u,0,Ft,!0))},async flush(i){const{signed:s,ctr:a,hmac:o,pending:l,ready:f}=this;await f;const d=qe(l,0,l.length-Ft),u=qe(l,l.length-Ft);let p=new Uint8Array;if(d.length){const w=Cn(lt,d);o.update(w);const v=a.update(w);p=Ln(lt,v)}if(s){const w=qe(Ln(lt,o.digest()),0,Ft);for(let v=0;vthis.resolveReady=i),password:t,strength:n-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;let u=new Uint8Array;o?(u=await Ed(a,l,o),f()):await d;const p=new Uint8Array(u.length+i.length-i.length%on);p.set(u,0),s.enqueue(_o(a,i,p,u.length,0))},async flush(i){const{ctr:s,hmac:a,pending:o,ready:l}=this;await l;let f=new Uint8Array;if(o.length){const d=s.update(Cn(lt,o));a.update(d),f=Ln(lt,d)}r.signature=Ln(lt,a.digest()).slice(0,Ft),i.enqueue(qi(f,r.signature))}}),r=this}}function _o(e,t,n,r,i,s){const{ctr:a,hmac:o,pending:l}=e,f=t.length-i;l.length&&(t=qi(l,t),n=Ad(n,f-f%on));let d;for(d=0;d<=f-on;d+=on){const u=Cn(lt,qe(t,d,d+on));s&&o.update(u);const p=a.update(u);s||o.update(p),n.set(Ln(lt,p),d+r)}return e.pending=qe(t,d),n}async function Sd(e,t,n,r){const i=await wo(e,t,n,qe(r,0,Fn[t])),s=qe(r,Fn[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new Error(oo)}async function Ed(e,t,n){const r=co(new Uint8Array(Fn[t])),i=await wo(e,t,n,r);return qi(r,i)}async function wo(e,t,n,r){e.password=null;const i=Si(n),s=await Dd(fd,i,md,!1,pd),a=await Td(Object.assign({salt:r},uo),s,8*(En[t]*2+2)),o=new Uint8Array(a),l=Cn(lt,qe(o,0,En[t])),f=Cn(lt,qe(o,En[t],En[t]*2)),d=qe(o,En[t]*2);return Object.assign(e,{keys:{key:l,authentication:f,passwordVerification:d},ctr:new yd(new xd(l),Array.from(_d)),hmac:new bd(f)}),d}function Dd(e,t,n,r,i){return wd?Wn.importKey(e,t,n,r,i):Yn.importKey(t)}async function Td(e,t,n){return gd?await Wn.deriveBits(e,t,n):Yn.pbkdf2(t,e.salt,uo.iterations,n)}function qi(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Ad(e,t){if(t&&t>e.length){const n=e;e=new Uint8Array(t),e.set(n,0)}return e}function qe(e,t,n){return e.subarray(t,n)}function Ln(e,t){return e.fromBits(t)}function Cn(e,t){return e.toBits(t)}const cn=12;class Od extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),go(this,t)},transform(r,i){const s=this;if(s.password){const a=da(s,r.subarray(0,cn));if(s.password=null,a[cn-1]!=s.passwordVerification)throw new Error(oo);r=r.subarray(cn)}i.enqueue(da(s,r))}})}}class Rd extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),go(this,t)},transform(r,i){const s=this;let a,o;if(s.password){s.password=null;const l=co(new Uint8Array(cn));l[cn-1]=s.passwordVerification,a=new Uint8Array(r.length+l.length),a.set(fa(s,l),0),o=cn}else a=new Uint8Array(r.length),o=0;a.set(fa(s,r),o),i.enqueue(a)}})}}function da(e,t){const n=new Uint8Array(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function xo(e){const t=e.keys[2]|2;return yo(Math.imul(t,t^1)>>>8)}function yo(e){return e&255}function ua(e){return e&4294967295}const ha="deflate-raw";class Md extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:r,CompressionStreamNative:i}){super({});const{compressed:s,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:f,level:d}=t,u=this;let p,w,v=bo(super.readable);(!a||l)&&f&&([v,p]=v.tee(),p=ct(p,new io)),s&&(v=ko(v,o,{level:d,chunkSize:n},i,r)),a&&(l?v=ct(v,new Rd(t)):(w=new kd(t),v=ct(v,w))),vo(u,v,async()=>{let h;a&&!l&&(h=w.signature),(!a||l)&&f&&(h=await p.getReader().read(),h=new DataView(h.value.buffer).getUint32(0)),u.signature=h})}}class Id extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:r,DecompressionStreamNative:i}){super({});const{zipCrypto:s,encrypted:a,signed:o,signature:l,compressed:f,useCompressionStream:d}=t;let u,p,w=bo(super.readable);a&&(s?w=ct(w,new Od(t)):(p=new vd(t),w=ct(w,p))),f&&(w=ko(w,d,{chunkSize:n},i,r)),(!a||s)&&o&&([w,u]=w.tee(),u=ct(u,new io)),vo(this,w,async()=>{if((!a||s)&&o){const v=await u.getReader().read(),h=new DataView(v.value.buffer);if(l!=h.getUint32(0,!1))throw new Error(lo)}})}}function bo(e){return ct(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function vo(e,t,n){t=ct(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function ko(e,t,n,r,i){try{const s=t&&r?r:i;e=ct(e,new s(ha,n))}catch(s){if(t)e=ct(e,new i(ha,n));else throw s}return e}function ct(e,t){return e.pipeThrough(t)}const Fd="message",Ld="start",Cd="pull",ma="data",Nd="ack",Pd="close",So="deflate",Eo="inflate";class Ud extends TransformStream{constructor(t,n){super({});const r=this,{codecType:i}=t;let s;i.startsWith(So)?s=Md:i.startsWith(Eo)&&(s=Id);let a=0;const o=new s(t,n),l=super.readable,f=new TransformStream({transform(d,u){d&&d.length&&(a+=d.length,u.enqueue(d))},flush(){const{signature:d}=o;Object.assign(r,{signature:d,size:a})}});Object.defineProperty(r,"readable",{get(){return l.pipeThrough(o).pipeThrough(f)}})}}const Yd=typeof Worker!=mr;class ni{constructor(t,{readable:n,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:f},d){const{signal:u}=a;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new Wd(n,a,s),{signal:u}),writable:r,options:Object.assign({},i),scripts:f,transferStreams:l,terminate(){const{worker:p,busy:w}=t;p&&!w&&(p.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,d(t)}}),(o&&Yd?jd:Hd)(t,s)}}class Wd extends TransformStream{constructor(t,{onstart:n,onprogress:r,size:i,onend:s},{chunkSize:a}){let o=0;super({start(){n&&ri(n,i)},async transform(l,f){o+=l.length,r&&await ri(r,o,i),f.enqueue(l)},flush(){t.size=o,s&&ri(s,o)}},{highWaterMark:1,size:()=>a})}}async function ri(e,...t){try{await e(...t)}catch{}}function Hd(e,t){return{run:()=>Bd(e,t)}}function jd(e,{baseURL:t,chunkSize:n}){return e.interface||Object.assign(e,{worker:Zd(e.scripts[0],t,e),interface:{run:()=>Vd(e,{chunkSize:n})}}),e.interface}async function Bd({options:e,readable:t,writable:n,onTaskFinished:r},i){const s=new Ud(e,i);try{await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,size:o}=s;return{signature:a,size:o}}finally{r()}}async function Vd(e,t){let n,r;const i=new Promise((p,w)=>{n=p,r=w});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});const{readable:s,options:a,scripts:o}=e,{writable:l,closed:f}=Gd(e.writable);Ei({type:Ld,scripts:o.slice(1),options:a,config:t,readable:s,writable:l},e)||Object.assign(e,{reader:s.getReader(),writer:l.getWriter()});const u=await i;try{await l.close()}catch{}return await f,u}function Gd(e){const t=e.getWriter();let n;const r=new Promise(s=>n=s);return{writable:new WritableStream({async write(s){await t.ready,await t.write(s)},close(){t.releaseLock(),n()},abort(s){return t.abort(s)}}),closed:r}}let pa=!0,_a=!0;function Zd(e,t,n){const r={type:"module"};let i,s;typeof e==eo&&(e=e());try{i=new URL(e,t)}catch{i=e}if(pa)try{s=new Worker(i)}catch{pa=!1,s=new Worker(i,r)}else s=new Worker(i,r);return s.addEventListener(Fd,a=>qd(a,n)),s}function Ei(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:s,readable:a,writable:o}=e;const l=[];if(s){const{buffer:f,length:d}=s;d!=f.byteLength&&(s=new Uint8Array(s)),e.value=s.buffer,l.push(e.value)}if(i&&_a?(a&&l.push(a),o&&l.push(o)):e.readable=e.writable=null,l.length)try{return t.postMessage(e,l),!0}catch{_a=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(s){throw n&&n.releaseLock(),r(),s}}async function qd({data:e},t){const{type:n,value:r,messageId:i,result:s,error:a}=e,{reader:o,writer:l,resolveResult:f,rejectResult:d,onTaskFinished:u}=t;try{if(a){const{message:w,stack:v,code:h,name:c}=a,m=new Error(w);Object.assign(m,{stack:v,code:h,name:c}),p(m)}else{if(n==Cd){const{value:w,done:v}=await o.read();Ei({type:ma,value:w,done:v,messageId:i},t)}n==ma&&(await l.ready,await l.write(new Uint8Array(r)),Ei({type:Nd,messageId:i},t)),n==Pd&&p(null,s)}}catch(w){p(w)}function p(w,v){w?d(w):f(v),l&&l.releaseLock(),u()}}let Gt=[];const ii=[];let wa=0;async function Do(e,t){const{options:n,config:r}=t,{transferStreams:i,useWebWorkers:s,useCompressionStream:a,codecType:o,compressed:l,signed:f,encrypted:d}=n,{workerScripts:u,maxWorkers:p,terminateWorkerTimeout:w}=r;t.transferStreams=i||i===fe;const v=!l&&!f&&!d&&!t.transferStreams;t.useWebWorkers=!v&&(s||s===fe&&r.useWebWorkers),t.scripts=t.useWebWorkers&&u?u[o]:[],n.useCompressionStream=a||a===fe&&r.useCompressionStream;let h;const c=Gt.find(_=>!_.busy);if(c)ga(c),h=new ni(c,e,t,m);else if(Gt.lengthii.push({resolve:_,stream:e,workerOptions:t}));return h.run();function m(_){if(ii.length){const[{resolve:b,stream:k,workerOptions:g}]=ii.splice(0,1);b(new ni(_,k,g,m))}else _.worker?(ga(_),Number.isFinite(w)&&w>=0&&(_.terminateTimeout=setTimeout(()=>{Gt=Gt.filter(b=>b!=_),_.terminate()},w))):Gt=Gt.filter(b=>b!=_)}}function ga(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function zd(e){const t=()=>URL.createObjectURL(new Blob([`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:"PBKDF2"},B=t.assign({hash:{name:"HMAC"}},R),E=t.assign({iterations:1e3,hash:{name:"SHA-1"}},R),M=["deriveBits"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&"function"==typeof T.importKey,L=N&&W&&"function"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s("Invalid password")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s("Invalid signature")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey("raw",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s("Invalid password");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s("Invalid signature")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)("deflate-raw",n))}catch(r){if(!t)throw r;e=pe(e,new s("deflate-raw",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=le:s.startsWith("inflate")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:"pull",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:"data",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:"close",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&ke(e),"data"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe="oversubscribed dynamic bit lengths tree":-5!=a&&0!==r[0]||(f.Oe="incomplete dynamic bit lengths tree",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe="oversubscribed literal/length tree":-4!=h&&(w.Oe="incomplete literal/length tree",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe="oversubscribed distance tree":-5==h?(w.Oe="incomplete distance tree",h=-3):-4!=h&&(w.Oe="empty distance tree with lengths",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe="invalid distance code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe="invalid literal/length code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe="invalid literal/length code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe="invalid distance code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe="invalid block type",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe="invalid stored block lengths",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe="too many length or distance symbols",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe="invalid bit length repeat",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe="need dictionary",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye}; +`],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}const To="HTTP error ",Rr="HTTP Range not supported",$d="Writer iterator completed too soon",Kd="text/plain",Xd="Content-Length",Jd="Content-Range",Qd="Accept-Ranges",ef="Range",tf="Content-Type",nf="HEAD",$i="GET",Ao="bytes",rf=64*1024,Ki="writable";class Mr{constructor(){this.size=0}init(){this.initialized=!0}}class Wt extends Mr{get readable(){const t=this,{chunkSize:n=rf}=t,r=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:s=0,size:a,diskNumberStart:o}=r,{chunkOffset:l}=this;i.enqueue(await Ie(t,s+l,Math.min(n,a-l),o)),l+n>a?i.close():this.chunkOffset+=n}});return r}}class Oo extends Mr{constructor(){super();const t=this,n=new WritableStream({write(r){return t.writeUint8Array(r)}});Object.defineProperty(t,Ki,{get(){return n}})}writeUint8Array(){}}class Di extends Wt{constructor(t){super();let n=t.length;for(;t.charAt(n-1)=="=";)n--;const r=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:r,size:Math.floor((n-r)*.75)})}readUint8Array(t,n){const{dataStart:r,dataURI:i}=this,s=new Uint8Array(n),a=Math.floor(t/3)*4,o=atob(i.substring(a+r,Math.ceil((t+n)/3)*4+r)),l=t-Math.floor(a/4)*3;for(let f=l;f2?n.data+=btoa(i):n.pending=i}getData(){return this.data+btoa(this.pending)}}class mn extends Wt{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){const r=this;return new Uint8Array(await r.blob.slice(t,t+n).arrayBuffer())}}class Kt extends Mr{constructor(t){super();const n=this,r=new TransformStream,i=[];t&&i.push([tf,t]),Object.defineProperty(n,Ki,{get(){return r.writable}}),n.blob=new Response(r.readable,{headers:i}).blob()}getData(){return this.blob}}class Ro extends mn{constructor(t){super(new Blob([t],{type:Kd}))}}class Ti extends Kt{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:n}=this,r=await super.getData();if(r.text&&n)return r.text();{const i=new FileReader;return new Promise((s,a)=>{Object.assign(i,{onload:({target:o})=>s(o.result),onerror:()=>a(i.error)}),i.readAsText(r,t)})}}}class sf extends Wt{constructor(t,n){super(),Mo(this,t,n)}async init(){super.init(),await Io(this,Ai,xa)}readUint8Array(t,n){return Fo(this,t,n,Ai,xa)}}class af extends Wt{constructor(t,n){super(),Mo(this,t,n)}async init(){super.init(),await Io(this,Oi,ya)}readUint8Array(t,n){return Fo(this,t,n,Oi,ya)}}function Mo(e,t,n){const{preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s}=n;n=Object.assign({},n),delete n.preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.useXHR,Object.assign(e,{url:t,options:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s})}async function Io(e,t,n){const{url:r,useRangeHeader:i,forceRangeRequests:s}=e;if(lf(r)&&(i||s)){const{headers:a}=await t($i,e,Lo(e));if(!s&&a.get(Qd)!=Ao)throw new Error(Rr);{let o;const l=a.get(Jd);if(l){const f=l.trim().split(/\s*\/\s*/);if(f.length){const d=f[1];d&&d!="*"&&(o=Number(d))}}o===fe?await ba(e,t,n):e.size=o}}else await ba(e,t,n)}async function Fo(e,t,n,r,i){const{data:s,useRangeHeader:a,forceRangeRequests:o,options:l}=e;if(a||o){const f=await r($i,e,Lo(e,t,n));if(f.status!=206)throw new Error(Rr);return new Uint8Array(await f.arrayBuffer())}else return s||await i(e,l),new Uint8Array(s.subarray(t,t+n))}function Lo(e,t=0,n=1){return Object.assign({},Xi(e),{[ef]:Ao+"="+t+"-"+(t+n-1)})}function Xi({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function xa(e){await Co(e,Ai)}async function ya(e){await Co(e,Oi)}async function Co(e,t){const n=await t($i,e,Xi(e));e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function ba(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t(nf,e,Xi(e))).headers.get(Xd);i?e.size=Number(i):await n(e,e.options)}}async function Ai(e,{options:t,url:n},r){const i=await fetch(n,Object.assign({},t,{method:e,headers:r}));if(i.status<400)return i;throw i.status==416?new Error(Rr):new Error(To+(i.statusText||i.status))}function Oi(e,{url:t},n){return new Promise((r,i)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",()=>{if(s.status<400){const a=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(o=>{const l=o.trim().split(/\s*:\s*/);l[0]=l[0].trim().replace(/^[a-z]|-[a-z]/g,f=>f.toUpperCase()),a.push(l)}),r({status:s.status,arrayBuffer:()=>s.response,headers:new Map(a)})}else i(s.status==416?new Error(Rr):new Error(To+(s.statusText||s.status)))},!1),s.addEventListener("error",a=>i(a.detail.error),!1),s.open(e,t),n)for(const a of Object.entries(n))s.setRequestHeader(a[0],a[1]);s.responseType="arraybuffer",s.send()})}class va extends Wt{constructor(t,n={}){super(),Object.assign(this,{url:t,reader:n.useXHR?new af(t,n):new sf(t,n)})}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(t,n){return this.reader.readUint8Array(t,n)}}class Ri extends Wt{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,n){return this.array.slice(t,t+n)}}class gr extends Oo{init(t=0){super.init(),Object.assign(this,{offset:0,array:new Uint8Array(t)})}writeUint8Array(t){const n=this;if(n.offset+t.length>n.array.length){const r=n.array;n.array=new Uint8Array(r.length+t.length),n.array.set(r)}n.array.set(t,n.offset),n.offset+=t.length}getData(){return this.array}}class of extends Wt{constructor(t){super(),this.readers=t}async init(){super.init();const t=this,{readers:n}=t;t.lastDiskNumber=0,await Promise.all(n.map(async r=>{await r.init(),t.size+=r.size}))}async readUint8Array(t,n,r=0){const i=this,{readers:s}=this;let a,o=r;o==-1&&(o=s.length-1);let l=t;for(;l>=s[o].size;)l-=s[o].size,o++;const f=s[o],d=f.size;if(l+n<=d)a=await Ie(f,l,n);else{const u=d-l;a=new Uint8Array(n),a.set(await Ie(f,l,u)),a.set(await i.readUint8Array(t+u,n-u,r),u)}return i.lastDiskNumber=Math.max(o,i.lastDiskNumber),a}}class ka extends Mr{constructor(t,n=4294967296){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,availableSize:n});let i,s,a;const o=new WritableStream({async write(d){if(a)if(i.size+d.length>=n){const u=n-i.size;await l(d.slice(0,u)),await f(),r.diskOffset+=i.size,r.diskNumber++,a=null,await this.write(d.slice(u))}else d.length&&await l(d),r.availableSize=n-i.size;else{const{value:u,done:p}=await t.next();if(p&&!u)throw new Error($d);i=u,i.size=0,s=u.writable,a=s.getWriter(),await this.write(d)}},async close(){await a.ready,await f()}});Object.defineProperty(r,Ki,{get(){return o}});async function l(d){await a.ready,await a.write(d),i.size+=d.length,r.size+=d.length}async function f(){s.size=i.size,await a.close()}}}function lf(e){const{baseURL:t}=Vi(),{protocol:n}=new URL(e,t);return n=="http:"||n=="https:"}async function ze(e,t){e.init&&!e.initialized&&await e.init(t)}function Ie(e,t,n,r){return e.readUint8Array(t,n,r)}const No="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),cf=No.length==256;function df(e){if(cf){let t="";for(let n=0;nthis[n]=t[n])}}const si="File format is not recognized",mf="End of central directory not found",pf="End of Zip64 central directory not found",_f="End of Zip64 central directory locator not found",wf="Central directory header not found",gf="Local file header not found",xf="Zip64 extra field not found",yf="File contains encrypted entry",bf="Encryption method not supported",Sa="Compression method not supported",Ea="Split zip file",Da="utf-8",Ta="cp437",vf=[[Ho,pe],[jo,pe],[Bo,pe],[Ii,ke]],kf={[ke]:{getValue:_e,bytes:4},[pe]:{getValue:lr,bytes:8}};class Sf{constructor(t,n={}){t instanceof ReadableStream&&(t={readable:t}),Object.assign(this,{reader:t,options:n,config:Vi()})}async*getEntriesGenerator(t={}){const n=this;let{reader:r}=n;const{config:i}=n;if(await ze(r),(r.size===fe||!r.readUint8Array)&&(Array.isArray(r)?r=new of(r):r=new mn(await new Response(r.readable).blob()),await ze(r)),r.size=r.size)throw new Error(si);let _=0,b=await Ie(r,l,o,v),k=Te(b);if(o){const S=s.offset-o;if(_e(k,_)!=gi&&l!=S){const E=l;l=S,c=l-E,b=await Ie(r,l,o,v),k=Te(b)}}if(l<0||l>=r.size)throw new Error(si);const g=tt(n,t,"filenameEncoding"),y=tt(n,t,"commentEncoding");for(let S=0;SE.getData(mt,Ht,jt),_=we;const{onprogress:Tt}=t;if(Tt)try{await Tt(S+1,h,new xr(E))}catch{}yield Ht}const x=tt(n,t,"extractPrependedData"),D=tt(n,t,"extractAppendedData");return x&&(n.prependedData=m>0?await Ie(r,0,m):new Uint8Array),n.comment=d?await Ie(r,f+an,d):new Uint8Array,D&&(n.appendedData=u>>8&255:p>>>24&255),signature:p,compressed:f!=0,encrypted:k,useWebWorkers:tt(i,r,"useWebWorkers"),useCompressionStream:tt(i,r,"useCompressionStream"),transferStreams:tt(i,r,"transferStreams")},config:d,streamOptions:{signal:E,size:D,onstart:A,onprogress:U,onend:F}};return S.size+=(await Do({readable:x,writable:S},B)).size,tt(i,r,"preventClose")||await S.close(),t.getData?t.getData():S}}function $o(e,t,n){const r=e.rawBitFlag=be(t,n+2),i=(r&yi)==yi,s=_e(t,n+6);Object.assign(e,{encrypted:i,version:be(t,n),bitFlag:{level:(r&sd)>>1,dataDescriptor:(r&bi)==bi,languageEncodingFlag:(r&vi)==vi},rawLastModDate:s,lastModDate:Mf(s),filenameLength:be(t,n+22),extraFieldLength:be(t,n+24)})}async function Ko(e,t,n,r){const{rawExtraField:i}=t,s=t.extraField=new Map,a=Te(new Uint8Array(i));let o=0;try{for(;ot[i]==s);for(let i=0,s=0;i{if(e.data.length>=a+4){const f=_e(n,a);t[o]=e[o]=new Date(f*1e3);const d=s[l];e[d]=f}a+=4})}async function Rf(e,t,n,r,i){const s=new Uint8Array(4),a=Te(s);If(a,0,t);const o=r+i;return await l(r)||await l(Math.min(o,n));async function l(f){const d=n-f,u=await Ie(e,d,f);for(let p=u.length-r;p>=0;p--)if(u[p]==s[0]&&u[p+1]==s[1]&&u[p+2]==s[2]&&u[p+3]==s[3])return{offset:d+p,buffer:u.slice(p,p+r).buffer}}}function tt(e,t,n){return t[n]===fe?e.options[n]:t[n]}function Mf(e){const t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function ai(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function dn(e,t){return e.getUint8(t)}function be(e,t){return e.getUint16(t,!0)}function _e(e,t){return e.getUint32(t,!0)}function lr(e,t){return Number(e.getBigUint64(t,!0))}function If(e,t,n){e.setUint32(t,n,!0)}function Te(e){return new DataView(e.buffer)}const Ff="File already exists",Lf="Zip file comment exceeds 64KB",Cf="File entry comment exceeds 64KB",Nf="File entry name exceeds 64KB",Oa="Version exceeds 65535",Pf="The strength must equal 1, 2, or 3",Uf="Extra field type exceeds 65535",Yf="Extra field data exceeds 64KB",ts="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Ra=new Uint8Array([7,0,2,0,65,69,3,0,0]),Xo=28;let oi=0;const Ma=[];class Wf{constructor(t,n={}){t.writable===fe&&typeof t.next==eo&&(t=new ka(t)),t instanceof WritableStream&&(t={writable:t}),t.writable.size===fe&&(t.writable.size=0);const r=t instanceof ka;r||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0}),Object.assign(this,{writer:t,addSplitZipSignature:r,options:n,config:Vi(),files:new Map,filenames:new Set,offset:t.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set})}async add(t="",n,r={}){const i=this,{pendingAddFileCalls:s,config:a}=i;oiMa.push(l));let o;try{if(t=t.trim(),i.filenames.has(t))throw new Error(Ff);return i.filenames.add(t),o=Hf(i,t,n,r),s.add(o),await o}catch(l){throw i.filenames.delete(t),l}finally{s.delete(o);const l=Ma.shift();l?l():oi--}}async close(t=new Uint8Array,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:s}=i;for(;r.size;)await Promise.all(Array.from(r));return await $f(this,t,n),!i.preventClose&&!n.preventClose&&await s.close(),i.getData?i.getData():s}}async function Hf(e,t,n,r){t=t.trim(),r.directory&&!t.endsWith(or)?t+=or:r.directory=t.endsWith(or);const i=Si(t);if(ee(i)>ke)throw new Error(Nf);const s=r.comment||"",a=Si(s);if(ee(a)>ke)throw new Error(Cf);const o=e.options.version||r.version||0;if(o>ke)throw new Error(Oa);const l=e.options.versionMadeBy||r.versionMadeBy||20;if(l>ke)throw new Error(Oa);const f=xe(e,r,Ji)||new Date,d=xe(e,r,Qi),u=xe(e,r,es),p=xe(e,r,"password"),w=xe(e,r,"encryptionStrength")||3,v=xe(e,r,"zipCrypto");if(p!==fe&&w!==fe&&(w<1||w>3))throw new Error(Pf);let h=new Uint8Array;const{extraField:c}=r;if(c){let he=0,V=0;c.forEach(Z=>he+=4+ee(Z)),h=new Uint8Array(he),c.forEach((Z,Se)=>{if(Se>ke)throw new Error(Uf);if(ee(Z)>ke)throw new Error(Yf);ve(h,new Uint16Array([Se]),V),ve(h,new Uint16Array([ee(Z)]),V+2),ve(h,Z,V+4),V+=4+ee(Z)})}let m=xe(e,r,"extendedTimestamp");m===fe&&(m=!0);let _=0,b=0,k=xe(e,r,"keepOrder");k===fe&&(k=!0);let g=0,y=xe(e,r,qo);y===fe&&(y=!0);const x=xe(e,r,Go)||0,D=xe(e,r,Zo)||0;let S=xe(e,r,zo);n&&(n instanceof ReadableStream&&(n={readable:n}),await ze(n),n.size===fe?(r.dataDescriptor=!0,(S||S===fe)&&(S=!0,_=pe)):(g=n.size,_=Xf(g)));const{diskOffset:E}=e.writer;if(e.offset+e.pendingEntriesSize-E>=pe||g>=pe||_>=pe){if(S===!1||!k)throw new Error(ts);S=!0}S=S||!1;const A=xe(e,r,"level"),U=xe(e,r,"useWebWorkers"),F=xe(e,r,"bufferedWrite");let B=xe(e,r,"dataDescriptor"),N=xe(e,r,"dataDescriptorSignature");const Y=xe(e,r,"signal"),j=xe(e,r,"useCompressionStream");B===fe&&(B=!0),B&&N===fe&&(N=!1),r=Object.assign({},r,{rawFilename:i,rawComment:a,version:o,versionMadeBy:l,lastModDate:f,lastAccessDate:d,creationDate:u,rawExtraField:h,zip64:S,password:p,level:A,useWebWorkers:U,encryptionStrength:w,extendedTimestamp:m,zipCrypto:v,bufferedWrite:F,keepOrder:k,dataDescriptor:B,dataDescriptorSignature:N,signal:Y,msDosCompatible:y,internalFileAttribute:x,externalFileAttribute:D,useCompressionStream:j});const q=Vf(r),we=Gf(r);b=ee(q.localHeaderArray,we.dataDescriptorArray)+_,e.pendingEntriesSize+=b;let W;try{W=await jf(e,t,n,{headerInfo:q,dataDescriptorInfo:we},r)}finally{e.pendingEntriesSize-=b}return Object.assign(W,{name:t,comment:s,extraField:c}),new xr(W)}async function jf(e,t,n,r,i){const{files:s,writer:a}=e,{keepOrder:o,dataDescriptor:l,signal:f}=i,d=Array.from(s.values()).pop();let u={},p,w,v,h,c,m;s.set(t,u);try{let k;o&&(k=d&&d.lock,_()),i.bufferedWrite||e.lockWriter||!l?(m=new Kt,m.writable.size=0,p=!0,await ze(a)):(m=a,e.lockWriter=Promise.resolve(),w=()=>delete e.lockWriter),await ze(m);const{writable:g,diskNumber:y}=a;let{diskOffset:x}=a;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const D=new Uint8Array(4),S=He(D);Q(S,0,ji),await Pt(g,D),e.offset+=4}if(p||await k,c=!0,u.diskNumberStart=y,u=await Bf(n,m,u,r,e.config,i),c=!1,s.set(t,u),u.filename=t,p){await m.writable.close();let D=await m.getData();await k,await b(),h=!0,l||(D=await qf(u,D,g,i)),u.diskNumberStart=a.diskNumber,x=a.diskOffset,await D.stream().pipeTo(g,{preventClose:!0,signal:f}),g.size+=D.size,h=!1}if(u.offset=e.offset-x,u.zip64)zf(u);else if(u.offset>=pe)throw new Error(ts);return e.offset+=u.length,u}catch(k){throw(p&&h||!p&&c)&&(e.hasCorruptedEntries=!0,k&&(k.corruptedEntry=!0),p?e.offset+=m.writable.size:e.offset=m.writable.size),s.delete(t),k}finally{v&&v(),w&&w()}function _(){u.lock=new Promise(k=>v=k)}async function b(){const{lockWriter:k}=e;if(k)return await k.then(()=>delete e.lockWriter),b();e.lockWriter=new Promise(g=>w=g)}}async function Bf(e,t,{diskNumberStart:n,lock:r},i,s,a){const{headerInfo:o,dataDescriptorInfo:l}=i,{localHeaderArray:f,headerArray:d,lastModDate:u,rawLastModDate:p,encrypted:w,compressed:v,version:h,compressionMethod:c,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b}=o,{dataDescriptorArray:k}=l,{rawFilename:g,lastAccessDate:y,creationDate:x,password:D,level:S,zip64:E,zipCrypto:A,dataDescriptor:U,directory:F,versionMadeBy:B,rawComment:N,rawExtraField:Y,useWebWorkers:j,onstart:q,onprogress:we,onend:W,signal:he,encryptionStrength:V,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,useCompressionStream:Ht}=a,Tt={lock:r,versionMadeBy:B,zip64:E,directory:Boolean(F),filenameUTF8:!0,rawFilename:g,commentUTF8:!0,rawComment:N,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b,rawExtraField:Y,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,diskNumberStart:n};let mt=0,jt=0,wn;const{writable:Ve}=t;if(e){e.chunkSize=no(s),await Pt(Ve,f);const gn=e.readable,Ee=gn.size=e.size,Ue={options:{codecType:So,level:S,password:D,encryptionStrength:V,zipCrypto:w&&A,passwordVerification:w&&A&&p>>8&255,signed:!0,compressed:v,encrypted:w,useWebWorkers:j,useCompressionStream:Ht,transferStreams:!1},config:s,streamOptions:{signal:he,size:Ee,onstart:q,onprogress:we,onend:W}},Jt=await Do({readable:gn,writable:Ve},Ue);Ve.size+=Jt.size,wn=Jt.signature,jt=e.size=gn.size,mt=Jt.size}else await Pt(Ve,f);const At=E?new Uint8Array(Xo+4):new Uint8Array;return e&&Zf({signature:wn,rawExtraFieldZip64:At,compressedSize:mt,uncompressedSize:jt,headerInfo:o,dataDescriptorInfo:l},a),U&&await Pt(Ve,k),Object.assign(Tt,{compressedSize:mt,lastModDate:u,rawLastModDate:p,creationDate:x,lastAccessDate:y,encrypted:w,length:ee(f,k)+mt,compressionMethod:c,version:h,headerArray:d,signature:wn,rawExtraFieldZip64:At}),Tt}function Vf(e){const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,password:s,level:a,zip64:o,zipCrypto:l,dataDescriptor:f,directory:d,rawExtraField:u,encryptionStrength:p,extendedTimestamp:w}=e,v=a!==0&&!d,h=Boolean(s&&ee(s));let c;if(h&&!l){c=new Uint8Array(ee(Ra)+2);const N=He(c);re(N,0,Xa),ve(c,Ra,2),yr(N,8,p)}else c=new Uint8Array;let m,_;if(w){_=new Uint8Array(9+(r?4:0)+(i?4:0));const N=He(_);re(N,0,Bi),re(N,2,ee(_)-4);const Y=1+(r?2:0)+(i?4:0);yr(N,4,Y),Q(N,5,Math.floor(n.getTime()/1e3)),r&&Q(N,9,Math.floor(r.getTime()/1e3)),i&&Q(N,13,Math.floor(i.getTime()/1e3));try{m=new Uint8Array(36);const j=He(m),q=li(n);re(j,0,Ja),re(j,2,32),re(j,8,Qa),re(j,10,24),Pe(j,12,q),Pe(j,20,li(r)||q),Pe(j,28,li(i)||q)}catch{m=new Uint8Array}}else m=_=new Uint8Array;let b=vi;f&&(b=b|bi);let k=Ga;v&&(k=wi);let g=e.version||ad;o&&(g=g>sa?g:sa),h&&(b=b|yi,l||(g=g>aa?g:aa,k=Za,v&&(c[9]=wi)));const y=new Uint8Array(26),x=He(y);re(x,0,g),re(x,2,b),re(x,4,k);const D=new Uint32Array(1),S=He(D);let E;noa?E=oa:E=n,re(S,0,(E.getHours()<<6|E.getMinutes())<<5|E.getSeconds()/2),re(S,2,(E.getFullYear()-1980<<4|E.getMonth()+1)<<5|E.getDate());const A=D[0];Q(x,6,A),re(x,22,ee(t));const U=ee(c,_,m,u);re(x,24,U);const F=new Uint8Array(30+ee(t)+U),B=He(F);return Q(B,0,qa),ve(F,y,4),ve(F,t,30),ve(F,c,30+ee(t)),ve(F,_,30+ee(t,c)),ve(F,m,30+ee(t,c,_)),ve(F,u,30+ee(t,c,_,m)),{localHeaderArray:F,headerArray:y,headerView:x,lastModDate:n,rawLastModDate:A,encrypted:h,compressed:v,version:g,compressionMethod:k,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:m,rawExtraFieldAES:c}}function Gf(e){const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i=new Uint8Array,s,a=0;return n&&(i=new Uint8Array(t?r?24:20:r?16:12),s=He(i),r&&(a=4,Q(s,0,td))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}}function Zf(e,t){const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:s,headerInfo:a,dataDescriptorInfo:o}=e,{headerView:l,encrypted:f}=a,{dataDescriptorView:d,dataDescriptorOffset:u}=o,{zip64:p,zipCrypto:w,dataDescriptor:v}=t;if((!f||w)&&n!==fe&&(Q(l,10,n),v&&Q(d,u,n)),p){const h=He(r);re(h,0,Ka),re(h,2,Xo),Q(l,14,pe),Pe(h,12,BigInt(i)),Q(l,18,pe),Pe(h,4,BigInt(s)),v&&(Pe(d,u+4,BigInt(i)),Pe(d,u+12,BigInt(s)))}else Q(l,14,i),Q(l,18,s),v&&(Q(d,u+4,i),Q(d,u+8,s))}async function qf(e,t,n,{zipCrypto:r}){const i=await Kf(t,0,26),s=new DataView(i);return(!e.encrypted||r)&&Q(s,14,e.signature),e.zip64?(Q(s,18,pe),Q(s,22,pe)):(Q(s,18,e.compressedSize),Q(s,22,e.uncompressedSize)),await Pt(n,new Uint8Array(i)),t.slice(i.byteLength)}function zf(e){const{rawExtraFieldZip64:t,offset:n,diskNumberStart:r}=e,i=He(t);Pe(i,20,BigInt(n)),Q(i,28,r)}async function $f(e,t,n){const{files:r,writer:i}=e;let s=0,a=0;const{diskOffset:o,writable:l}=i;let{diskNumber:f}=i,d=e.offset-o,u=r.size;for(const[,{rawFilename:k,rawExtraFieldZip64:g,rawExtraFieldAES:y,rawExtraField:x,rawComment:D,rawExtraFieldExtendedTimestamp:S,rawExtraFieldNTFS:E}]of r)a+=46+ee(k,D,g,y,S,E,x);let p=n.zip64||e.options.zip64||!1;if(d>=pe||a>=pe||u>=ke){if(n.zip64===!1||e.options.zip64===!1)throw new Error(ts);p=!0}const w=new Uint8Array(a),v=He(w);for(const[k,g]of Array.from(r.values()).entries()){const{offset:y,rawFilename:x,rawExtraFieldZip64:D,rawExtraFieldAES:S,rawExtraFieldNTFS:E,rawExtraField:A,rawComment:U,versionMadeBy:F,headerArray:B,directory:N,zip64:Y,msDosCompatible:j,internalFileAttribute:q,externalFileAttribute:we,extendedTimestamp:W,lastModDate:he,diskNumberStart:V}=g;let Z;if(W){Z=new Uint8Array(9);const ue=He(Z);re(ue,0,Bi),re(ue,2,ee(Z)-4),yr(ue,4,1),Q(ue,5,Math.floor(he.getTime()/1e3))}else Z=new Uint8Array;const Se=ee(D,S,Z,E,A);if(Q(v,s,gi),re(v,s+4,F),ve(w,B,s+6),re(v,s+30,Se),re(v,s+32,ee(U)),re(v,s+34,Y?ke:V),re(v,s+36,q),we?Q(v,s+38,we):N&&j&&yr(v,s+38,ki),Q(v,s+42,Y?pe:y),ve(w,x,s+46),ve(w,D,s+46+ee(x)),ve(w,S,s+46+ee(x,D)),ve(w,Z,s+46+ee(x,D,S)),ve(w,E,s+46+ee(x,D,S,Z)),ve(w,A,s+46+ee(x,D,S,Z,E)),ve(w,U,s+46+ee(x)+Se),s+=46+ee(x,U)+Se,n.onprogress)try{await n.onprogress(k+1,r.size,new xr(g))}catch{}}await ze(i),await Pt(l,w);const h=new Uint8Array(p?nd:an),c=He(h);let m=i.diskNumber;const{availableSize:_}=i;_n&&(t+=n.length)),t}class Jo{constructor(t,n,r,i){const s=this;if(t.root&&i&&i.getChildByName(n))throw new Error("Entry filename already exists");r||(r={}),Object.assign(s,{fs:t,name:n,data:r.data,id:t.entries.length,parent:i,children:[],uncompressedSize:0}),t.entries.push(s),i&&s.parent.children.push(s)}moveTo(t){const n=this;n.fs.move(n,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){const n=this;let r=n.name,i=n.parent;for(;i&&i!=t;)r=(i.name?i.name+"/":"")+r,i=i.parent;return r}isDescendantOf(t){let n=this.parent;for(;n&&n.id!=t.id;)n=n.parent;return Boolean(n)}}class Qo extends Jo{constructor(t,n,r,i){super(t,n,r,i);const s=this;s.Reader=r.Reader,s.Writer=r.Writer,r.getData&&(s.getData=r.getData)}async getData(t,n={}){const r=this;if(!t||t.constructor==r.Writer&&r.data)return r.data;{const i=r.reader=new r.Reader(r.data,n);await Promise.all([ze(i),ze(t,r.data.uncompressedSize)]);const s=i.readable;return s.size=r.uncompressedSize=i.size,await s.pipeTo(t.writable),t.getData?t.getData():t.writable}}getText(t,n){return this.getData(new Ti(t),n)}getBlob(t,n){return this.getData(new Kt(t),n)}getData64URI(t,n){return this.getData(new wr(t),n)}getUint8Array(t){return this.getData(new gr,t)}getWritable(t=new WritableStream,n){return this.getData({writable:t},n)}replaceBlob(t){Object.assign(this,{data:t,Reader:mn,Writer:Kt,reader:null})}replaceText(t){Object.assign(this,{data:t,Reader:Ro,Writer:Ti,reader:null})}replaceData64URI(t){Object.assign(this,{data:t,Reader:Di,Writer:wr,reader:null})}replaceUint8Array(t){Object.assign(this,{data:t,Reader:Ri,Writer:gr,reader:null})}replaceReadable(t){Object.assign(this,{data:null,Reader:function(){return{readable:t}},Writer:null,reader:null})}}class Hn extends Jo{constructor(t,n,r,i){super(t,n,r,i),this.directory=!0}addDirectory(t){return pt(this,t,null,!0)}addText(t,n){return pt(this,t,{data:n,Reader:Ro,Writer:Ti})}addBlob(t,n){return pt(this,t,{data:n,Reader:mn,Writer:Kt})}addData64URI(t,n){return pt(this,t,{data:n,Reader:Di,Writer:wr})}addUint8Array(t,n){return pt(this,t,{data:n,Reader:Ri,Writer:gr})}addHttpContent(t,n,r={}){return pt(this,t,{data:n,Reader:class extends va{constructor(i){super(i,r)}}})}addReadable(t,n){return pt(this,t,{Reader:function(){return{readable:n}}})}addFileSystemEntry(t){return ru(this,t)}addData(t,n){return pt(this,t,n)}async importBlob(t,n={}){await this.importZip(new mn(t),n)}async importData64URI(t,n={}){await this.importZip(new Di(t),n)}async importUint8Array(t,n={}){await this.importZip(new Ri(t),n)}async importHttpContent(t,n={}){await this.importZip(new va(t,n),n)}async importReadable(t,n={}){await this.importZip({readable:t},n)}exportBlob(t={}){return this.exportZip(new Kt("application/zip"),t)}exportData64URI(t={}){return this.exportZip(new wr("application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new gr,t)}async exportWritable(t=new WritableStream,n={}){return await this.exportZip({writable:t},n),t}async importZip(t,n){await ze(t),(await new Sf(t,n).getEntries()).forEach(s=>{let a=this;const o=s.filename.split("/"),l=o.pop();o.forEach(f=>a=a.getChildByName(f)||new Hn(this.fs,f,null,a)),s.directory||pt(a,l,{data:s,Reader:tu(Object.assign({},n))})})}async exportZip(t,n){const r=this;await Promise.all([el(r),ze(t)]);const i=new Wf(t,n);return await nu(i,r,eu([r],"uncompressedSize"),n),await i.close(),t.getData?t.getData():t.writable}getChildByName(t){const n=this.children;for(let r=0;r{n.id==e.id&&t.splice(r,1)})}async function nu(e,t,n,r){const i=t,s=new Map;await a(e,t);async function a(o,l){await f();async function f(){if(r.bufferedWrite)await Promise.all(l.children.map(d));else for(const u of l.children)await d(u)}async function d(u){const p=r.relativePath?u.getRelativeName(i):u.getFullname();await o.add(p,u.reader,Object.assign({directory:u.directory},Object.assign({},r,{onprogress:async w=>{if(r.onprogress){s.set(p,w);try{await r.onprogress(Array.from(s.values()).reduce((v,h)=>v+h),n)}catch{}}}}))),await a(o,u)}}}async function ru(e,t){if(t.isDirectory){const i=e.addDirectory(t.name);return await n(i,t),i}else return new Promise((i,s)=>t.file(a=>i(e.addBlob(t.name,a)),s));async function n(i,s){const a=await r(s);for(const o of a)o.isDirectory?await n(i.addDirectory(o.name),o):await new Promise((l,f)=>{o.file(d=>{const u=i.addBlob(o.name,d);u.uncompressedSize=d.size,l(u)},f)})}function r(i){return new Promise((s,a)=>{let o=[];i.isDirectory&&l(i.createReader()),i.isFile&&s(o);function l(f){f.readEntries(d=>{d.length?(o=o.concat(d),l(f)):s(o)},a)}})}}function tn(e){e.entries=[],e.root=new Hn(e)}function pt(e,t,n,r){if(e.directory)return r?new Hn(e.fs,t,n,e):new Qo(e.fs,t,n,e);throw new Error("Parent entry is not a directory")}let tl;try{tl=import.meta.url}catch{}Gi({baseURL:tl});zd(Gi);Gi({Deflate:Fc,Inflate:ed});function Ir(e){return e.slice(e.lastIndexOf(Fr)+1)}const Fr="/";async function iu(e,t,n){const r=e.vaultPath+"/.obsidian/"+t+".json";let i;return e.adapter.exists(r)&&(i=JSON.parse(await e.adapter.readFile(r))),n(i)}class su{constructor(t){Bt(this,"zipFS");Bt(this,"chunks",[]);Bt(this,"chunkIndex",0);this.zipBlob=t}async initReadingVault(){this.zipFS=new Qf.FS,await this.zipFS.importBlob(this.zipBlob)}readDirectory(t){return this.zipFS.find(t).children.map(r=>({isDirectory:()=>!!r.directory,getName:()=>r.getFullname()}))}readFile(t){return this.zipFS.find(t).getText("utf-8")}exists(t){return!!this.zipFS.find(t)}resolve(t){return t}resolveInDir(t,n){return t+Fr+n}removeFile(t){}renameFile(t,n){}flushResultsFromInitialProcessing(t){}appendToResultFile(t,n){this.chunks.push(n)}appendToPostProcessingFile(t,n){this.chunks[this.chunkIndex]=n,this.chunkIndex++}initPostProcessingResultFile(t){}chunkIter(){const t=this.chunks;let n=0;return{[Symbol.asyncIterator](){return{async next(){if(n{if(s.forEach((o,l)=>s[l]+=a),r==="seenOne"&&a!=="["&&(r="normal"),r==="seenOneOut"&&a!=="]"&&(r="normal"),a==="["&&(i+=1,r==="seenOne"?(s.push(""),r="normal"):r==="normal"&&(r="seenOne")),a==="]"&&i>0){if(i-=1,r==="seenOneOut"){const o=s.pop();o&&(!t||s.length===0)&&n.push(o.slice(0,-2)),r="normal"}else r==="normal"&&(r="seenOneOut");i===0&&(r="normal")}}),n}function lu(e){return Ir(e)!==e}class ci{constructor(){Bt(this,"nameWasCalledAsFile",[]);Bt(this,"pathMap",new Map);Bt(this,"nameMap",new Map)}accessAsFile(t,n,r){const i=this.pathMap.get(n);if(i)return this.nameMap.get(t)||this.nameMap.set(t,i),i;const s=this.nameMap.get(t);if(s&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,s),this.nameWasCalledAsFile.push(t),s;const a=r();return this.pathMap.set(n,a),this.nameMap.get(t)||this.nameMap.set(t,a),this.nameWasCalledAsFile.push(t),a}accessAsLink(t,n){const r=this.findData(t);if(r)return r;const i=lu(t),s=n();return i?this.pathMap.set(t,s):this.nameMap.set(t,s),s}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Lr(e){e.totalNodes++,e.leafNodes++}function nl(e){e.leafNodes--,e.topLevelNodes++}function cu(e,t,n=au,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new ci,headingTracker:new ci,dummyHeadingLinkTracker:new Map,blockLinkTracker:new ci,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function kt(e){return Lr(e.summary),e.idGenerator()}function du(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map);let s=i.get(r);return s||(s={uid:kt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function fu(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map);let a=s.get(i);return a||(a={uid:kt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function uu(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function hu(e){let t;return[e.split(` `).map(r=>{const i=r.split(" "),s=i[i.length-1];if(s.startsWith("^"))return t=s,i.slice(0,-1).join(" ")}).join(` -`),t]}function nl(e,t,n,r,i,s){const a=[t],o=[e];for(const l of n){const f=i(l);fu(f,l,a,o,r),s==null||s(f,l)}}function fu(e,t,n,r,i){var o;uu(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(o=a.children)!=null?o:[],a.children.push(e)),n.push(t),r.push(e)}function uu(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function rl(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=rl(n.children,r);if(i)return i}}return null}function hu(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function mu(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const o=t.findData(s);if(o){const l={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};nl(f,l,o,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=rl(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function pu(e,t){const[n,r]=mu(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Lr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let o=a;s.forEach(l=>{o=o.replace(l.old,l.new)}),await t.adapter.appendToPostProcessingFile(i,o)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var il=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(il||{});function _u(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function wu(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function gu(e,t){const n=_u(e);switch(wu(n)){case 0:return xu(n[0],t);case 2:return ou(n,t);case 1:return hu(n,t);default:throw"Invalid link type detected: "+n}}function xu(e,t){return t.defaultLinkTracker.accessAsLink(e,()=>(Lr(t.summary),{uid:t.idGenerator(),obsidianLink:e,type:1})).uid}function yu(e,t,n,r){const[i,s]=du(n);return s?[lu([e,s],t,r),i]:[vt(r),n]}function bu(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,()=>(Lr(n.summary),{uid:n.idGenerator(),obsidianLink:r,type:0}));return i.type=0,i.uid}function vu(e){const t=[];for(const n of e.getData())n.type===il.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function ku(e){return[...e.invalidLinks,...vu(e.defaultLinkTracker),...cu(e.blockLinkTracker)]}function Su(e,t,n){const r=ku(n).sort((a,o)=>a.link.localeCompare(o.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:vt(n),name:i,createdAt:t,editedAt:t,type:"node"};return tl(n.summary),s.children=r,s}function sl(e){return e===" "||e===" "}function jn(e,t){let n=0;for(;sl(e[t+n]);)n++;return n}function Eu(e,t){let n=t,r=e[t];for(;sl(r);)n--,r=e[n];return n+1}function mn(e,t){let n=0;for(;!ns(e[t+n]);)n++;return t+n}function al(e,t){const n=e[t-1];return ns(n)}function ns(e){return e===void 0||e===` -`}function ol(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function rs(e,t){let n=!0;const r=t+jn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ol(e,r));const a=Eu(e,r-1)-1,o=e[a];return ns(o)&&n?{type:Ut.BULLET,level:r-a-1}:null}function Du(e,t,n){let r=t+n.level;if(ol(e,r))return r;r+=1+1;const i=jn(e,r);return r+i}function Tu(e,t,n){let r=mn(e,t+n.level+1+1),i=e[r];for(;;){const s=jn(e,r+1);if(s==n.level+2&&!rs(e,r+1+s))r=mn(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Ou(e,t){return e+t.level}function Au(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=jn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function ll(e,t){if(!al(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=mn(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],o=e[i+2];for(;[s,a,o].every(d=>d!==void 0)&&[s,a,o].join("")!=="```";)i++,s=e[i],a=e[i+1],o=e[i+2];if([s,a,o].some(d=>d===void 0))return null;const l=mn(e,i+3);return e.slice(i+3,l).trim()!==""?null:{type:Ut.CODEBLOCK,level:l-t+(e[l]===` -`?1:0),codeLanguage:r!==""?r:void 0}}return null}function cl(e,t){if(!al(e,t))return null;const n=Ru(e,t);return n>0&&e[t+n]===" "?{type:Ut.HEADING,level:n}:null}function Ru(e,t){let n=t,r=0;for(;e[n]==="#";)n++,r++;return r}function Mu(e,t,n){const r=t+n.level+1,i=jn(e,r);return r+i}function Iu(e,t,n){return mn(e,t+n.level+1)}function Fu(e,t){let n=mn(e,t),r=e[n],i=r;for(n++,r=e[n];;){if(r===void 0)return[n];if(r===` +`),t]}function rl(e,t,n,r,i,s){const a=[t],o=[e];for(const l of n){const f=i(l);mu(f,l,a,o,r),s==null||s(f,l)}}function mu(e,t,n,r,i){var o;pu(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(o=a.children)!=null?o:[],a.children.push(e)),n.push(t),r.push(e)}function pu(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function il(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=il(n.children,r);if(i)return i}}return null}function _u(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function wu(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const o=t.findData(s);if(o){const l={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};rl(f,l,o,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=il(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function gu(e,t){const[n,r]=wu(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Lr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let o=a;s.forEach(l=>{o=o.replace(l.old,l.new)}),await t.adapter.appendToPostProcessingFile(i,o)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var sl=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(sl||{});function xu(e,t){return ou(e,!0).filter(n=>n.trim()!=="").map(n=>{const r=n.split("|"),i=r[0],s=r[1],a=vu(i,t),o=s!==void 0&&s.trim()!==""?"["+s.trim()+"]([["+a+"]])":"[["+a+"]]";return[n,a,o]})}function yu(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function bu(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function vu(e,t){const n=yu(e);switch(bu(n)){case 0:return ku(n[0],t);case 2:return du(n,t);case 1:return _u(n,t);default:throw"Invalid link type detected: "+n}}function ku(e,t){return t.defaultLinkTracker.accessAsLink(e,()=>(Lr(t.summary),{uid:t.idGenerator(),obsidianLink:e,type:1})).uid}function Su(e,t,n,r){const[i,s]=hu(n);return s?[fu([e,s],t,r),i]:[kt(r),n]}function Eu(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,()=>(Lr(n.summary),{uid:n.idGenerator(),obsidianLink:r,type:0}));return i.type=0,i.uid}function Du(e){const t=[];for(const n of e.getData())n.type===sl.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function Tu(e){return[...e.invalidLinks,...Du(e.defaultLinkTracker),...uu(e.blockLinkTracker)]}function Au(e,t,n){const r=Tu(n).sort((a,o)=>a.link.localeCompare(o.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:kt(n),name:i,createdAt:t,editedAt:t,type:"node"};return nl(n.summary),s.children=r,s}function ns(e){return e===" "||e===" "}function jn(e,t){let n=0;for(;ns(e[t+n]);)n++;return n}function Ou(e,t){let n=t,r=e[t];for(;ns(r);)n--,r=e[n];return n+1}function Yt(e,t){let n=0;for(;!rs(e[t+n]);)n++;return t+n}function al(e,t){const n=e[t-1];return rs(n)}function rs(e){return e===void 0||e===` +`}function ol(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function is(e,t){let n=!0;const r=t+jn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ol(e,r));const a=Ou(e,r-1)-1,o=e[a];return rs(o)&&n?{type:dt.BULLET,level:r-a-1}:null}function Ru(e,t,n){let r=t+n.level;if(ol(e,r))return r;r+=1+1;const i=jn(e,r);return r+i}function Mu(e,t,n){let r=Yt(e,t+n.level+1+1),i=e[r];for(;;){const s=jn(e,r+1);if(s==n.level+2&&!is(e,r+1+s))r=Yt(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Iu(e,t){return e+t.level}function Fu(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=jn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function ll(e,t){if(!al(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=Yt(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],o=e[i+2];for(;[s,a,o].every(d=>d!==void 0)&&[s,a,o].join("")!=="```";)i++,s=e[i],a=e[i+1],o=e[i+2];if([s,a,o].some(d=>d===void 0))return null;const l=Yt(e,i+3);return e.slice(i+3,l).trim()!==""?null:{type:dt.CODEBLOCK,level:l-t+(e[l]===` +`?1:0),codeLanguage:r!==""?r:void 0}}return null}function Lu(e,t){return Yt(e,t)}function cl(e,t){const n=Yt(e,t),r=e.slice(t,n);return dl(r)?{type:dt.DATAVIEWATTRIBUTE,level:0}:null}function dl(e){const t=e.split("::");return t.length===2&&t[0].trim()===t[0]&&t[0]!==""&&t[1]!==""&&t[1]!==" "&&ns(t[1][0])}function fl(e,t){if(!al(e,t))return null;const n=Cu(e,t);return n>0&&e[t+n]===" "?{type:dt.HEADING,level:n}:null}function Cu(e,t){let n=t,r=0;for(;e[n]==="#";)n++,r++;return r}function Nu(e,t,n){const r=t+n.level+1,i=jn(e,r);return r+i}function Pu(e,t,n){return Yt(e,t+n.level+1)}function Uu(e,t){let n=Yt(e,t),r=e[n],i=r;for(n++,r=e[n];;){if(r===void 0)return[n];if(r===` `&&i===` -`)return[n-1];{const s=Lu(e,n);if(s)return[n-1,s]}i=r,n++,r=e[n]}}function Lu(e,t){let n=cl(e,t);return n||(n=rs(e,t),n)||(n=ll(e,t),n)?n:null}var Ut=(e=>(e.ROOT="Root",e.HEADING="Heading",e.BULLET="Bullet Node",e.PARAGRAPH="Paragraph",e.CODEBLOCK="Code Block",e))(Ut||{});function Cu(e,t=0){const n=[];for(let r=t;rBu(i,t,n,r))))}function Bu(e,t,n,r){let i=e;r&&(i=ju(e));let s=t.get(i);return s===void 0&&(s=n(),t.set(i,s)),s}function Vu(e){return Array.from(e.entries()).map(t=>({name:t[0],uid:t[1]}))}function Gu(e){if(e.startsWith("[ ] "))return"todo";if(e.startsWith("[x] ")||e.startsWith("[X] "))return"done"}function Zu(e,t){if(t.type===Ut.BULLET){const n=Gu(e);if(n)return[e.slice(4),n]}return null}function qu(e){const t=[];let n=Fi(e,0);for(;n!==null;){let r;Array.isArray(n)?(t.push(n),r=n[2]):r=n,n=Fi(e,r)}return t}function Fi(e,t){let n,r="",i="";for(let s=t;s{const o=a[0],l=a[1];if(i.every(f=>o.trim()!==f.name||l.trim()!==f.mediaUrl)){const f=a[3],d=vt(n);e.name=e.name.replaceAll(f,"[["+d+"]]"),i.push({uid:d,name:o.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:l.trim()})}}),e.children=[...(s=e.children)!=null?s:[],...i]}function Ku(e,t,n){return{uid:vt(n),name:Au(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function Xu(e,t,n,r,i){var p;if(n.type===Ut.CODEBLOCK)return Ku(n,r,i);const[s,a]=yu(e,t,n.content,i),o={uid:s,name:a,createdAt:r,editedAt:r,type:"node"},[l,f]=(p=Zu(a,n))!=null?p:[a,void 0];o.name=l,o.todoState=f,o.name=o.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=Hu(o.name);if(d){const w=d[d.length-1];o.name.endsWith(w)&&(o.name=o.name.slice(0,-w.length)),o.supertags=dl(d,i.superTagTracker,i.idGenerator,!0)}const u=iu(o.name,!0).filter(w=>w.trim()!=="").map(w=>{const v=w.split("|"),h=v[0],c=v[1],m=gu(h,i),_=c!==void 0&&c.trim()!==""?"["+c.trim()+"]([["+m+"]])":"[["+m+"]]";return[w,m,_]});if(u.length>0){const w=new Set;o.refs||(o.refs=[]);for(const[v,h,c]of u)w.add(h),o.name=o.name.replaceAll("[["+v+"]]",c);o.refs.push(...Array.from(w.values()))}return $u(o,r,i),o}function Ju(e){if(e.startsWith(`--- +`)return[n-1];{const s=Yu(e,n);if(s)return[n-1,s]}i=r,n++,r=e[n]}}function Yu(e,t){let n=fl(e,t);return n||(n=cl(e,t),n)||(n=is(e,t),n)||(n=ll(e,t),n)?n:null}var dt=(e=>(e.ROOT="Root",e.HEADING="Heading",e.BULLET="Bullet Node",e.PARAGRAPH="Paragraph",e.CODEBLOCK="Code Block",e.DATAVIEWATTRIBUTE="Data View Attribute",e))(dt||{});function Wu(e,t=0){const n=[];for(let r=t;rzu(i,t,n,r))))}function zu(e,t,n,r){let i=e;r&&(i=qu(e));let s=t.get(i);return s===void 0&&(s=n(),t.set(i,s)),s}function $u(e){return Array.from(e.entries()).map(t=>({name:t[0],uid:t[1]}))}function Ku(e){if(e.startsWith("[ ] "))return"todo";if(e.startsWith("[x] ")||e.startsWith("[X] "))return"done"}function Xu(e,t){if(t.type===dt.BULLET){const n=Ku(e);if(n)return[e.slice(4),n]}return null}function Ju(e){const t=[];let n=Fi(e,0);for(;n!==null;){let r;Array.isArray(n)?(t.push(n),r=n[2]):r=n,n=Fi(e,r)}return t}function Fi(e,t){let n,r="",i="";for(let s=t;s{const o=a[0],l=a[1];if(i.every(f=>o.trim()!==f.name||l.trim()!==f.mediaUrl)){const f=a[3],d=kt(n);e.name=e.name.replaceAll(f,"[["+d+"]]"),i.push({uid:d,name:o.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:l.trim()})}}),e.children=[...(s=e.children)!=null?s:[],...i]}function ml(e,t,n,r,i,s){let a=s;return t&&t.length>0&&(a=s!=null?s:[],a==null||a.push(...t.map(o=>({uid:kt(r),name:o,type:"node",createdAt:n,editedAt:n})))),n0(e,r.attributes),r.summary.fields++,{uid:i!=null?i:kt(r),name:e,type:"field",createdAt:n,editedAt:n,children:a}}function t0(e,t,n){return ml(e.key,e.values,t,n)}function n0(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function r0(e,t,n){return{uid:kt(n),name:Fu(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function i0(e,t,n,r){if(e.type===dt.DATAVIEWATTRIBUTE||dl(t.name)){const i=t.name.split("::");return ml(i[0],[i[1].trim()],n,r,t.uid)}}function s0(e,t,n,r,i){var w;if(n.type===dt.CODEBLOCK)return r0(n,r,i);const[s,a]=Su(e,t,n.content,i),o={uid:s,name:a,createdAt:r,editedAt:r,type:"node"},[l,f]=(w=Xu(a,n))!=null?w:[a,void 0];o.name=l,o.todoState=f,o.name=o.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=Zu(o.name);if(d){const v=d[d.length-1];o.name.endsWith(v)&&(o.name=o.name.slice(0,-v.length)),o.supertags=ul(d,i.superTagTracker,i.idGenerator,!0)}const u=xu(o.name,i);if(u.length>0){const v=new Set;o.refs||(o.refs=[]);for(const[h,c,m]of u)v.add(c),o.name=o.name.replaceAll("[["+h+"]]",m);o.refs.push(...Array.from(v.values()))}e0(o,r,i);const p=i0(n,o,r,i);return p!=null?p:o}function a0(e){if(e.startsWith(`--- `)){const t=e.indexOf(` --- -`);if(t!==-1)return[Qu(e.slice(4,t)),t+5]}return null}function Qu(e){const t=e.split(` +`);if(t!==-1)return[o0(e.slice(4,t)),t+5]}return null}function o0(e){const t=e.split(` `).map(r=>r.trim()).filter(r=>r!==""),n=[];for(let r=0;ra.trim()).filter(a=>a!=="");if(!(s[0]==="publish"||s[0]==="cssclass"||s[0]==="aliases"))if(s.length===2)if(s[1].startsWith("[")&&s[1].endsWith("]")){const a=s[1].slice(1,-1).split(",").map(o=>o.trim()).filter(o=>o!=="");n.push({key:s[0],values:a})}else n.push({key:s[0],values:[s[1]]});else{const a={key:s[0],values:[]};let o=1,l=t[r+o];for(;l!==void 0&&l.startsWith("- ");)a.values.push(l.slice(2)),o++,l=t[r+o];r+=o-1,n.push(a)}}return n}//! moment.js //! version : 2.29.4 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com -var ul;function L(){return ul.apply(null,arguments)}function e0(e){ul=e}function rt(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function zt(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function te(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function is(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(te(e,t))return!1;return!0}function Ce(e){return e===void 0}function kt(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Bn(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function hl(e,t){var n=[],r,i=e.length;for(r=0;r>>0,r;for(r=0;r0)for(n=0;n>>0,r;for(r=0;r0)for(n=0;n=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var ls=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,fi={},dn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(dn[e]=i),t&&(dn[t[0]]=function(){return dt(i.apply(this,arguments),t[1],t[2])}),n&&(dn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function s0(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function a0(e){var t=e.match(ls),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var o0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function l0(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(ls).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var c0="Invalid date";function d0(){return this._invalidDate}var f0="%d",u0=/\d{1,2}/;function h0(e){return this._ordinal.replace("%d",e)}var m0={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function p0(e,t,n,r){var i=this._relativeTime[n];return ut(i)?i(e,t,n,r):i.replace(/%d/i,e)}function _0(e,t){var n=this._relativeTime[e>0?"future":"past"];return ut(n)?n(t):n.replace(/%s/i,t)}var Rn={};function Ae(e,t){var n=e.toLowerCase();Rn[n]=Rn[n+"s"]=Rn[t]=e}function Ke(e){return typeof e=="string"?Rn[e]||Rn[e.toLowerCase()]:void 0}function cs(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var wl={};function Re(e,t){wl[e]=t}function w0(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:wl[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Nr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function pn(e,t){return function(n){return n!=null?(gl(this,e,n),L.updateOffset(this,t),this):br(this,e)}}function br(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function gl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Nr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),jr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function g0(e){return e=Ke(e),ut(this[e])?this[e]():this}function x0(e,t){if(typeof e=="object"){e=cs(e);var n=w0(e),r,i=n.length;for(r=0;r68?1900:2e3)};var Ol=pn("FullYear",!0);function U0(){return Nr(this.year())}function Y0(e,t,n,r,i,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function Nn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Nn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Al(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),o=1+7*(t-1)+s+a,l,f;return o<=0?(l=e-1,f=Mn(l)+o):o>Mn(e)?(l=e+1,f=o-Mn(e)):(l=e,f=o),{year:l,dayOfYear:f}}function Pn(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+bt(a,t,n)):i>bt(e.year(),t,n)?(s=i-bt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function bt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(Mn(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Ae("week","w");Ae("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Zn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function W0(e){return Pn(e,this._week.dow,this._week.doy).week}var H0={dow:0,doy:6};function j0(){return this._week.dow}function B0(){return this._week.doy}function V0(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function G0(e){var t=Pn(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Ae("day","d");Ae("weekday","e");Ae("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Zn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Zn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function Z0(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function q0(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function us(e,t){return e.slice(t,7).concat(e.slice(0,t))}var z0="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Rl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$0="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),K0=Gn,X0=Gn,J0=Gn;function Q0(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?us(n,this._week.dow):e?n[e.day()]:n}function eh(e){return e===!0?us(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function th(e){return e===!0?us(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function nh(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ft([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function rh(e,t,n){var r,i,s;if(this._weekdaysParseExact)return nh.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ft([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function ih(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=Z0(e,this.localeData()),this.add(e-t,"d")):t}function sh(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function ah(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=q0(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function oh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=K0),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function lh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=X0),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ch(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||hs.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=J0),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function hs(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,o,l,f;for(s=0;s<7;s++)a=ft([2e3,1]).day(s),o=je(this.weekdaysMin(a,"")),l=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(o),n.push(l),r.push(f),i.push(o),i.push(l),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ms(){return this.hours()%12||12}function dh(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,ms);H("k",["kk",2],0,dh);H("hmm",0,0,function(){return""+ms.apply(this)+dt(this.minutes(),2)});H("hmmss",0,0,function(){return""+ms.apply(this)+dt(this.minutes(),2)+dt(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+dt(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+dt(this.minutes(),2)+dt(this.seconds(),2)});function Ml(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Ml("a",!0);Ml("A",!1);Ae("hour","h");Re("hour",13);function Il(e,t){return t._meridiemParse}C("a",Il);C("A",Il);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",bl);C("hmmss",vl);C("Hmm",bl);C("Hmmss",vl);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[gt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[gt]=$(e.substr(i))});function fh(e){return(e+"").toLowerCase().charAt(0)==="p"}var uh=/[ap]\.?m?\.?/i,hh=pn("Hours",!0);function mh(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Fl={calendar:r0,longDateFormat:o0,invalidDate:c0,ordinal:f0,dayOfMonthOrdinalParse:u0,relativeTime:m0,months:O0,monthsShort:kl,week:H0,weekdays:z0,weekdaysMin:$0,weekdaysShort:Rl,meridiemParse:uh},de={},Dn={},Un;function ph(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=Br(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&ph(s,r)>=n-1)break;n--}t++}return Un}function wh(e){return e.match("^[^/\\\\]*$")!=null}function Br(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&wh(e))try{t=Un._abbr,n=require,n("./locale/"+e),Pt(t)}catch{de[e]=null}return de[e]}function Pt(e,t){var n;return e&&(Ce(t)?n=St(e):n=ps(e,t),n?Un=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Un._abbr}function ps(e,t){if(t!==null){var n,r=Fl;if(t.abbr=e,de[e]!=null)pl("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=Br(t.parentLocale),n!=null)r=n._config;else return Dn[t.parentLocale]||(Dn[t.parentLocale]=[]),Dn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new os(Ci(r,t)),Dn[e]&&Dn[e].forEach(function(i){ps(i.name,i.config)}),Pt(e),de[e]}else return delete de[e],null}function gh(e,t){if(t!=null){var n,r,i=Fl;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Ci(de[e]._config,t)):(r=Br(e),r!=null&&(i=r._config),t=Ci(i,t),r==null&&(t.abbr=e),n=new os(t),n.parentLocale=de[e],de[e]=n),Pt(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Pt()&&Pt(e)):de[e]!=null&&delete de[e]);return de[e]}function St(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Un;if(!rt(e)){if(t=Br(e),t)return t;e=[e]}return _h(e)}function xh(){return Ni(de)}function _s(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[wt]<0||n[wt]>11?wt:n[ot]<1||n[ot]>jr(n[Oe],n[wt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[gt]!==0||n[qt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[gt]<0||n[gt]>59?gt:n[qt]<0||n[qt]>999?qt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=E0),z(e)._overflowWeekday&&t===-1&&(t=D0),z(e).overflow=t),e}var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\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Eh={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Ll(e){var t,n,r=e._i,i=yh.exec(r)||bh.exec(r),s,a,o,l,f=ir.length,d=ui.length;if(i){for(z(e).iso=!0,t=0,n=f;tMn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Nn(a,0,e._dayOfYear),e._a[wt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[gt]===0&&e._a[qt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Nn:Y0).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function Fh(e){var t,n,r,i,s,a,o,l,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=rn(t.GG,e._a[Oe],Pn(oe(),1,4).year),r=rn(t.W,1),i=rn(t.E,1),(i<1||i>7)&&(l=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Pn(oe(),s,a),n=rn(t.gg,e._a[Oe],f.year),r=rn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>bt(n,s,a)?z(e)._overflowWeeks=!0:l!=null?z(e)._overflowWeekday=!0:(o=Al(n,r,i,s,a),e._a[Oe]=o.year,e._dayOfYear=o.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function gs(e){if(e._f===L.ISO_8601){Ll(e);return}if(e._f===L.RFC_2822){Cl(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,o=t.length,l=0,f,d;for(i=_l(e._f,e._locale).match(ls)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),l+=r.length),dn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),S0(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=o-l,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=Lh(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Oe]=e._locale.erasConvertYear(f,e._a[Oe])),ws(e),_s(e)}function Lh(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Ch(e){var t,n,r,i,s,a,o=!1,l=e._f.length;if(l===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Cr()});function Ul(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function n1(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return as(e,this),e=Nl(e),e._a?(t=e._isUTC?ft(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&qh(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function r1(){return this.isValid()?!this._isUTC:!1}function i1(){return this.isValid()?this._isUTC:!1}function Wl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var s1=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,a1=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:kt(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=s1.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[gt])*i,ms:$(Ui(r[qt]*1e3))*i}):(r=a1.exec(e))?(i=r[1]==="-"?-1:1,n={y:Gt(r[2],i),M:Gt(r[3],i),w:Gt(r[4],i),d:Gt(r[5],i),h:Gt(r[6],i),m:Gt(r[7],i),s:Gt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=o1(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Vr(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Vr.prototype;st.invalid=Zh;function Gt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Na(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function o1(e,t){var n;return e.isValid()&&t.isValid()?(t=ys(t,e),e.isBefore(t)?n=Na(e,t):(n=Na(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Hl(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(pl(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),jl(this,i,e),this}}function jl(e,t,n,r){var i=t._milliseconds,s=Ui(t._days),a=Ui(t._months);!e.isValid()||(r=r==null?!0:r,a&&El(e,br(e,"Month")+a*n),s&&gl(e,"Date",br(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var l1=Hl(1,"add"),c1=Hl(-1,"subtract");function Bl(e){return typeof e=="string"||e instanceof String}function d1(e){return it(e)||Bn(e)||Bl(e)||kt(e)||u1(e)||f1(e)||e===null||e===void 0}function f1(e){var t=zt(e)&&!is(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ut(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function D1(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function T1(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function O1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function A1(e){return this.from(oe(),e)}function R1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function M1(e){return this.to(oe(),e)}function Vl(e){var t;return e===void 0?this._locale._abbr:(t=St(e),t!=null&&(this._locale=t),this)}var Gl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Zl(){return this._locale}var Sr=1e3,fn=60*Sr,Er=60*fn,ql=(365*400+97)*24*Er;function un(e,t){return(e%t+t)%t}function zl(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-ql:new Date(e,t,n).valueOf()}function $l(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-ql:Date.UTC(e,t,n)}function I1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?$l:zl,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=un(t+(this._isUTC?0:this.utcOffset()*fn),Er);break;case"minute":t=this._d.valueOf(),t-=un(t,fn);break;case"second":t=this._d.valueOf(),t-=un(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function F1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?$l:zl,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-un(t+(this._isUTC?0:this.utcOffset()*fn),Er)-1;break;case"minute":t=this._d.valueOf(),t+=fn-un(t,fn)-1;break;case"second":t=this._d.valueOf(),t+=Sr-un(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function L1(){return this._d.valueOf()-(this._offset||0)*6e4}function C1(){return Math.floor(this.valueOf()/1e3)}function N1(){return new Date(this.valueOf())}function P1(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function U1(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Y1(){return this.isValid()?this.toISOString():null}function W1(){return ss(this)}function H1(){return Lt({},z(this))}function j1(){return z(this).overflow}function B1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",bs);C("NN",bs);C("NNN",bs);C("NNNN",em);C("NNNNN",tm);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",_n);C("yy",_n);C("yyy",_n);C("yyyy",_n);C("yo",nm);ie(["y","yy","yyy","yyyy"],Oe);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Oe]=n._locale.eraYearOrdinalParse(e,i):t[Oe]=parseInt(e,10)});function V1(e,t){var n,r,i,s=this._eras||St("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function Z1(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function q1(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),cm.call(this,e,t,n,r,i))}function cm(e,t,n,r,i){var s=Al(e,t,n,r,i),a=Nn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Ae("quarter","Q");Re("quarter",7);C("Q",xl);ie("Q",function(e,t){t[wt]=($(e)-1)*3});function dm(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Ae("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var Xl=pn("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Ae("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Ur);C("DDDD",yl);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function fm(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Ae("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var um=pn("Minutes",!1);H("s",["ss",2],0,"second");Ae("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],gt);var hm=pn("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Ae("millisecond","ms");Re("millisecond",16);C("S",Ur,xl);C("SS",Ur,Be);C("SSS",Ur,yl);var Ct,Jl;for(Ct="SSSS";Ct.length<=9;Ct+="S")C(Ct,_n);function mm(e,t){t[qt]=$(("0."+e)*1e3)}for(Ct="S";Ct.length<=9;Ct+="S")ie(Ct,mm);Jl=pn("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function pm(){return this._isUTC?"UTC":""}function _m(){return this._isUTC?"Coordinated Universal Time":""}var M=Vn.prototype;M.add=l1;M.calendar=p1;M.clone=_1;M.diff=k1;M.endOf=F1;M.format=T1;M.from=O1;M.fromNow=A1;M.to=R1;M.toNow=M1;M.get=g0;M.invalidAt=j1;M.isAfter=w1;M.isBefore=g1;M.isBetween=x1;M.isSame=y1;M.isSameOrAfter=b1;M.isSameOrBefore=v1;M.isValid=W1;M.lang=Gl;M.locale=Vl;M.localeData=Zl;M.max=Wh;M.min=Yh;M.parsingFlags=H1;M.set=x0;M.startOf=I1;M.subtract=c1;M.toArray=P1;M.toObject=U1;M.toDate=N1;M.toISOString=E1;M.inspect=D1;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=Y1;M.toString=S1;M.unix=C1;M.valueOf=L1;M.creationData=B1;M.eraName=q1;M.eraNarrow=z1;M.eraAbbr=$1;M.eraYear=K1;M.year=Ol;M.isLeapYear=U0;M.weekYear=rm;M.isoWeekYear=im;M.quarter=M.quarters=dm;M.month=Dl;M.daysInMonth=C0;M.week=M.weeks=V0;M.isoWeek=M.isoWeeks=G0;M.weeksInYear=om;M.weeksInWeekYear=lm;M.isoWeeksInYear=sm;M.isoWeeksInISOWeekYear=am;M.date=Xl;M.day=M.days=ih;M.weekday=sh;M.isoWeekday=ah;M.dayOfYear=fm;M.hour=M.hours=hh;M.minute=M.minutes=um;M.second=M.seconds=hm;M.millisecond=M.milliseconds=Jl;M.utcOffset=$h;M.utc=Xh;M.local=Jh;M.parseZone=Qh;M.hasAlignedHourOffset=e1;M.isDST=t1;M.isLocal=r1;M.isUtcOffset=i1;M.isUtc=Wl;M.isUTC=Wl;M.zoneAbbr=pm;M.zoneName=_m;M.dates=$e("dates accessor is deprecated. Use date instead.",Xl);M.months=$e("months accessor is deprecated. Use month instead",Dl);M.years=$e("years accessor is deprecated. Use year instead",Ol);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Kh);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",n1);function wm(e){return oe(e*1e3)}function gm(){return oe.apply(null,arguments).parseZone()}function Ql(e){return e}var ne=os.prototype;ne.calendar=i0;ne.longDateFormat=l0;ne.invalidDate=d0;ne.ordinal=h0;ne.preparse=Ql;ne.postformat=Ql;ne.relativeTime=p0;ne.pastFuture=_0;ne.set=n0;ne.eras=V1;ne.erasParse=G1;ne.erasConvertYear=Z1;ne.erasAbbrRegex=J1;ne.erasNameRegex=X1;ne.erasNarrowRegex=Q1;ne.months=M0;ne.monthsShort=I0;ne.monthsParse=L0;ne.monthsRegex=P0;ne.monthsShortRegex=N0;ne.week=W0;ne.firstDayOfYear=B0;ne.firstDayOfWeek=j0;ne.weekdays=Q0;ne.weekdaysMin=th;ne.weekdaysShort=eh;ne.weekdaysParse=rh;ne.weekdaysRegex=oh;ne.weekdaysShortRegex=lh;ne.weekdaysMinRegex=ch;ne.isPM=fh;ne.meridiem=mh;function Dr(e,t,n,r){var i=St(),s=ft().set(r,t);return i[n](s,e)}function ec(e,t,n){if(kt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function ks(e,t,n,r){typeof e=="boolean"?(kt(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,kt(t)&&(n=t,t=void 0),t=t||"");var i=St(),s=e?i._week.dow:0,a,o=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)o[a]=Dr(t,(a+s)%7,r,"day");return o}function xm(e,t){return ec(e,t,"months")}function ym(e,t){return ec(e,t,"monthsShort")}function bm(e,t,n){return ks(e,t,n,"weekdays")}function vm(e,t,n){return ks(e,t,n,"weekdaysShort")}function km(e,t,n){return ks(e,t,n,"weekdaysMin")}Pt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Pt);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",St);var pt=Math.abs;function Sm(){var e=this._data;return this._milliseconds=pt(this._milliseconds),this._days=pt(this._days),this._months=pt(this._months),e.milliseconds=pt(e.milliseconds),e.seconds=pt(e.seconds),e.minutes=pt(e.minutes),e.hours=pt(e.hours),e.months=pt(e.months),e.years=pt(e.years),this}function tc(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Em(e,t){return tc(this,e,t,1)}function Dm(e,t){return tc(this,e,t,-1)}function Pa(e){return e<0?Math.floor(e):Math.ceil(e)}function Tm(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,o,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Pa(Wi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),l=Ze(nc(t)),n+=l,t-=Pa(Wi(l)),o=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=o,this}function nc(e){return e*4800/146097}function Wi(e){return e*146097/4800}function Om(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+nc(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Wi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Am(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Et(e){return function(){return this.as(e)}}var Rm=Et("ms"),Mm=Et("s"),Im=Et("m"),Fm=Et("h"),Lm=Et("d"),Cm=Et("w"),Nm=Et("M"),Pm=Et("Q"),Um=Et("y");function Ym(){return st(this)}function Wm(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Kt(e){return function(){return this.isValid()?this._data[e]:NaN}}var Hm=Kt("milliseconds"),jm=Kt("seconds"),Bm=Kt("minutes"),Vm=Kt("hours"),Gm=Kt("days"),Zm=Kt("months"),qm=Kt("years");function zm(){return Ze(this.days()/7)}var _t=Math.round,on={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function $m(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function Km(e,t,n,r){var i=st(e).abs(),s=_t(i.as("s")),a=_t(i.as("m")),o=_t(i.as("h")),l=_t(i.as("d")),f=_t(i.as("M")),d=_t(i.as("w")),u=_t(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,$m.apply(null,p)}function Xm(e){return e===void 0?_t:typeof e=="function"?(_t=e,!0):!1}function Jm(e,t){return on[e]===void 0?!1:t===void 0?on[e]:(on[e]=t,e==="s"&&(on.ss=t-1),!0)}function Qm(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=on,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},on,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=Km(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var hi=Math.abs;function tn(e){return(e>0)-(e<0)||+e}function Zr(){if(!this.isValid())return this.localeData().invalidDate();var e=hi(this._milliseconds)/1e3,t=hi(this._days),n=hi(this._months),r,i,s,a,o=this.asSeconds(),l,f,d,u;return o?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",f=tn(this._months)!==tn(o)?"-":"",d=tn(this._days)!==tn(o)?"-":"",u=tn(this._milliseconds)!==tn(o)?"-":"",l+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Vr.prototype;X.isValid=Gh;X.abs=Sm;X.add=Em;X.subtract=Dm;X.as=Om;X.asMilliseconds=Rm;X.asSeconds=Mm;X.asMinutes=Im;X.asHours=Fm;X.asDays=Lm;X.asWeeks=Cm;X.asMonths=Nm;X.asQuarters=Pm;X.asYears=Um;X.valueOf=Am;X._bubble=Tm;X.clone=Ym;X.get=Wm;X.milliseconds=Hm;X.seconds=jm;X.minutes=Bm;X.hours=Vm;X.days=Gm;X.weeks=zm;X.months=Zm;X.years=qm;X.humanize=Qm;X.toISOString=Zr;X.toString=Zr;X.toJSON=Zr;X.locale=Vl;X.localeData=Zl;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zr);X.lang=Gl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Wr);C("X",b0);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js -L.version="2.29.4";e0(oe);L.fn=M;L.min=Hh;L.max=jh;L.now=Bh;L.utc=ft;L.unix=wm;L.months=xm;L.isDate=Bn;L.locale=Pt;L.invalid=Cr;L.duration=st;L.isMoment=it;L.weekdays=bm;L.parseZone=gm;L.localeData=St;L.isDuration=dr;L.monthsShort=ym;L.weekdaysMin=km;L.defineLocale=ps;L.updateLocale=gh;L.locales=xh;L.weekdaysShort=vm;L.normalizeUnits=Ke;L.relativeTimeRounding=Xm;L.relativeTimeThreshold=Jm;L.calendarFormat=m1;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function ep(e,t,n){let r;return e.values&&e.values.length>0&&(r=e.values.map(i=>({uid:vt(n),name:i,type:"node",createdAt:t,editedAt:t}))),tp(e.key,n.attributes),n.summary.fields++,{uid:vt(n),name:e.key,type:"field",createdAt:t,editedAt:t,children:r}}function tp(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function np(e,t,n,r,i=Date.now()){var p;const[s,a]=(p=Ju(n))!=null?p:[[],0];let o=Cu(n,a),l=e;const f=o[0]&&o[0].content.match(/^title::(.+)$/);f&&(l=f[1],o=o.slice(1)),o[0]&&o[0].content.replace(/^#+/,"").trim()===l.trim()&&(o=o.slice(1));const d=[],u=rp(l,t,i,r,s);return nl(u,{type:Ut.ROOT,level:-1},o,Yu,w=>Xu(e,t,w,i,r),(w,v)=>{v.type===Ut.HEADING&&d.push({...v,uid:w.uid})}),o=null,r.headingTracker.pathMap.set(t,d),r.headingTracker.nameMap.get(e)||r.headingTracker.nameMap.set(e,d),u}function rp(e,t,n,r,i){let s;const a=[];i.forEach(d=>{d.key==="tags"?s=dl(d.values,r.superTagTracker,r.idGenerator):a.push(ep(d,n,r))});let o=bu(e,t,r),l="node";const f=ip(e,r.dailyNoteFormat);return f&&(o=f,l="date",e=f,r.summary.calendarNodes++),{uid:o,name:e,createdAt:n,editedAt:n,type:l,supertags:s,children:a.length>0?a:void 0}}function ip(e,t){const n=L(e,t,!0);return n.isValid()?n.format("MM-DD-YYYY"):null}function Ua(e,t){return e===t.length-1?"LAST":"NOT_LAST"}function sp(e,t){return e.adapter.readDirectory(t).filter(n=>{const r=t+Fr+n.getName();return n.isDirectory()&&!r.endsWith(".github")&&!r.endsWith(".obsidian")||!n.isDirectory()&&r.endsWith(".md")}).sort((n,r)=>Number(n.isDirectory())-Number(r.isDirectory()))}async function rc(e,t,n,r,i,s="LAST"){n(t);const a=sp(e,t);for(let o=0;o{const i=Ir(r),s=vt(n);n.adapter.appendToResultFile(e,`{ +`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Ca={};function gl(e,t){L.deprecationHandler!=null&&L.deprecationHandler(e,t),Ca[e]||(wl(t),Ca[e]=!0)}L.suppressDeprecationWarnings=!1;L.deprecationHandler=null;function ht(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function d0(e){var t,n;for(n in e)te(e,n)&&(t=e[n],ht(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Ci(e,t){var n=Ct({},e),r;for(r in t)te(t,r)&&($t(e[r])&&$t(t[r])?(n[r]={},Ct(n[r],e[r]),Ct(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)te(e,r)&&!te(t,r)&&$t(e[r])&&(n[r]=Ct({},n[r]));return n}function ls(e){e!=null&&this.set(e)}var Ni;Object.keys?Ni=Object.keys:Ni=function(e){var t,n=[];for(t in e)te(e,t)&&n.push(t);return n};var f0={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function u0(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return ht(r)?r.call(t,n):r}function ft(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var cs=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,fi={},fn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(fn[e]=i),t&&(fn[t[0]]=function(){return ft(i.apply(this,arguments),t[1],t[2])}),n&&(fn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function h0(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function m0(e){var t=e.match(cs),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var p0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function _0(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(cs).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var w0="Invalid date";function g0(){return this._invalidDate}var x0="%d",y0=/\d{1,2}/;function b0(e){return this._ordinal.replace("%d",e)}var v0={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function k0(e,t,n,r){var i=this._relativeTime[n];return ht(i)?i(e,t,n,r):i.replace(/%d/i,e)}function S0(e,t){var n=this._relativeTime[e>0?"future":"past"];return ht(n)?n(t):n.replace(/%s/i,t)}var Rn={};function Oe(e,t){var n=e.toLowerCase();Rn[n]=Rn[n+"s"]=Rn[t]=e}function Ke(e){return typeof e=="string"?Rn[e]||Rn[e.toLowerCase()]:void 0}function ds(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var yl={};function Re(e,t){yl[e]=t}function E0(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:yl[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Nr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function pn(e,t){return function(n){return n!=null?(bl(this,e,n),L.updateOffset(this,t),this):br(this,e)}}function br(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function bl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Nr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),jr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function D0(e){return e=Ke(e),ht(this[e])?this[e]():this}function T0(e,t){if(typeof e=="object"){e=ds(e);var n=E0(e),r,i=n.length;for(r=0;r68?1900:2e3)};var Ml=pn("FullYear",!0);function Z0(){return Nr(this.year())}function q0(e,t,n,r,i,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function Nn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Nn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Il(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),o=1+7*(t-1)+s+a,l,f;return o<=0?(l=e-1,f=Mn(l)+o):o>Mn(e)?(l=e+1,f=o-Mn(e)):(l=e,f=o),{year:l,dayOfYear:f}}function Pn(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+vt(a,t,n)):i>vt(e.year(),t,n)?(s=i-vt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function vt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(Mn(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Oe("week","w");Oe("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Zn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function z0(e){return Pn(e,this._week.dow,this._week.doy).week}var $0={dow:0,doy:6};function K0(){return this._week.dow}function X0(){return this._week.doy}function J0(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Q0(e){var t=Pn(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Oe("day","d");Oe("weekday","e");Oe("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Zn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Zn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function eh(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function th(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function hs(e,t){return e.slice(t,7).concat(e.slice(0,t))}var nh="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Fl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),rh="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ih=Gn,sh=Gn,ah=Gn;function oh(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?hs(n,this._week.dow):e?n[e.day()]:n}function lh(e){return e===!0?hs(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ch(e){return e===!0?hs(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function dh(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ut([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function fh(e,t,n){var r,i,s;if(this._weekdaysParseExact)return dh.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ut([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function uh(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=eh(e,this.localeData()),this.add(e-t,"d")):t}function hh(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function mh(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=th(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function ph(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||ms.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=ih),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function _h(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||ms.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=sh),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function wh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||ms.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ah),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ms(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,o,l,f;for(s=0;s<7;s++)a=ut([2e3,1]).day(s),o=je(this.weekdaysMin(a,"")),l=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(o),n.push(l),r.push(f),i.push(o),i.push(l),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ps(){return this.hours()%12||12}function gh(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,ps);H("k",["kk",2],0,gh);H("hmm",0,0,function(){return""+ps.apply(this)+ft(this.minutes(),2)});H("hmmss",0,0,function(){return""+ps.apply(this)+ft(this.minutes(),2)+ft(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+ft(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+ft(this.minutes(),2)+ft(this.seconds(),2)});function Ll(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Ll("a",!0);Ll("A",!1);Oe("hour","h");Re("hour",13);function Cl(e,t){return t._meridiemParse}C("a",Cl);C("A",Cl);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",Sl);C("hmmss",El);C("Hmm",Sl);C("Hmmss",El);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i))});function xh(e){return(e+"").toLowerCase().charAt(0)==="p"}var yh=/[ap]\.?m?\.?/i,bh=pn("Hours",!0);function vh(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Nl={calendar:f0,longDateFormat:p0,invalidDate:w0,ordinal:x0,dayOfMonthOrdinalParse:y0,relativeTime:v0,months:N0,monthsShort:Dl,week:$0,weekdays:nh,weekdaysMin:rh,weekdaysShort:Fl,meridiemParse:yh},de={},Dn={},Un;function kh(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=Br(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&kh(s,r)>=n-1)break;n--}t++}return Un}function Eh(e){return e.match("^[^/\\\\]*$")!=null}function Br(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&Eh(e))try{t=Un._abbr,n=require,n("./locale/"+e),Ut(t)}catch{de[e]=null}return de[e]}function Ut(e,t){var n;return e&&(Ce(t)?n=Et(e):n=_s(e,t),n?Un=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Un._abbr}function _s(e,t){if(t!==null){var n,r=Nl;if(t.abbr=e,de[e]!=null)gl("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=Br(t.parentLocale),n!=null)r=n._config;else return Dn[t.parentLocale]||(Dn[t.parentLocale]=[]),Dn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new ls(Ci(r,t)),Dn[e]&&Dn[e].forEach(function(i){_s(i.name,i.config)}),Ut(e),de[e]}else return delete de[e],null}function Dh(e,t){if(t!=null){var n,r,i=Nl;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Ci(de[e]._config,t)):(r=Br(e),r!=null&&(i=r._config),t=Ci(i,t),r==null&&(t.abbr=e),n=new ls(t),n.parentLocale=de[e],de[e]=n),Ut(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Ut()&&Ut(e)):de[e]!=null&&delete de[e]);return de[e]}function Et(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Un;if(!rt(e)){if(t=Br(e),t)return t;e=[e]}return Sh(e)}function Th(){return Ni(de)}function ws(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[gt]<0||n[gt]>11?gt:n[ot]<1||n[ot]>jr(n[Ae],n[gt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[xt]!==0||n[zt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[xt]<0||n[xt]>59?xt:n[zt]<0||n[zt]>999?zt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=F0),z(e)._overflowWeekday&&t===-1&&(t=L0),z(e).overflow=t),e}var Ah=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Oh=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Rh=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ui=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mh=/^\/?Date\((-?\d+)/i,Ih=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Fh={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Pl(e){var t,n,r=e._i,i=Ah.exec(r)||Oh.exec(r),s,a,o,l,f=ir.length,d=ui.length;if(i){for(z(e).iso=!0,t=0,n=f;tMn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Nn(a,0,e._dayOfYear),e._a[gt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[xt]===0&&e._a[zt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Nn:q0).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function Hh(e){var t,n,r,i,s,a,o,l,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=sn(t.GG,e._a[Ae],Pn(oe(),1,4).year),r=sn(t.W,1),i=sn(t.E,1),(i<1||i>7)&&(l=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Pn(oe(),s,a),n=sn(t.gg,e._a[Ae],f.year),r=sn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>vt(n,s,a)?z(e)._overflowWeeks=!0:l!=null?z(e)._overflowWeekday=!0:(o=Il(n,r,i,s,a),e._a[Ae]=o.year,e._dayOfYear=o.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function xs(e){if(e._f===L.ISO_8601){Pl(e);return}if(e._f===L.RFC_2822){Ul(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,o=t.length,l=0,f,d;for(i=xl(e._f,e._locale).match(cs)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),l+=r.length),fn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),I0(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=o-l,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=jh(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Ae]=e._locale.erasConvertYear(f,e._a[Ae])),gs(e),ws(e)}function jh(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Bh(e){var t,n,r,i,s,a,o=!1,l=e._f.length;if(l===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Cr()});function Hl(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function d1(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return os(e,this),e=Yl(e),e._a?(t=e._isUTC?ut(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&t1(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function f1(){return this.isValid()?!this._isUTC:!1}function u1(){return this.isValid()?this._isUTC:!1}function Bl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var h1=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,m1=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:St(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=h1.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[xt])*i,ms:$(Ui(r[zt]*1e3))*i}):(r=m1.exec(e))?(i=r[1]==="-"?-1:1,n={y:Zt(r[2],i),M:Zt(r[3],i),w:Zt(r[4],i),d:Zt(r[5],i),h:Zt(r[6],i),m:Zt(r[7],i),s:Zt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=p1(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Vr(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Vr.prototype;st.invalid=e1;function Zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Pa(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function p1(e,t){var n;return e.isValid()&&t.isValid()?(t=bs(t,e),e.isBefore(t)?n=Pa(e,t):(n=Pa(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Vl(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(gl(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),Gl(this,i,e),this}}function Gl(e,t,n,r){var i=t._milliseconds,s=Ui(t._days),a=Ui(t._months);!e.isValid()||(r=r==null?!0:r,a&&Al(e,br(e,"Month")+a*n),s&&bl(e,"Date",br(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var _1=Vl(1,"add"),w1=Vl(-1,"subtract");function Zl(e){return typeof e=="string"||e instanceof String}function g1(e){return it(e)||Bn(e)||Zl(e)||St(e)||y1(e)||x1(e)||e===null||e===void 0}function x1(e){var t=$t(e)&&!ss(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ht(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function L1(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function C1(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function N1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function P1(e){return this.from(oe(),e)}function U1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Y1(e){return this.to(oe(),e)}function ql(e){var t;return e===void 0?this._locale._abbr:(t=Et(e),t!=null&&(this._locale=t),this)}var zl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function $l(){return this._locale}var Sr=1e3,un=60*Sr,Er=60*un,Kl=(365*400+97)*24*Er;function hn(e,t){return(e%t+t)%t}function Xl(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Kl:new Date(e,t,n).valueOf()}function Jl(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Kl:Date.UTC(e,t,n)}function W1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Jl:Xl,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hn(t+(this._isUTC?0:this.utcOffset()*un),Er);break;case"minute":t=this._d.valueOf(),t-=hn(t,un);break;case"second":t=this._d.valueOf(),t-=hn(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function H1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Jl:Xl,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-hn(t+(this._isUTC?0:this.utcOffset()*un),Er)-1;break;case"minute":t=this._d.valueOf(),t+=un-hn(t,un)-1;break;case"second":t=this._d.valueOf(),t+=Sr-hn(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function j1(){return this._d.valueOf()-(this._offset||0)*6e4}function B1(){return Math.floor(this.valueOf()/1e3)}function V1(){return new Date(this.valueOf())}function G1(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Z1(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function q1(){return this.isValid()?this.toISOString():null}function z1(){return as(this)}function $1(){return Ct({},z(this))}function K1(){return z(this).overflow}function X1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",vs);C("NN",vs);C("NNN",vs);C("NNNN",lm);C("NNNNN",cm);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",_n);C("yy",_n);C("yyy",_n);C("yyyy",_n);C("yo",dm);ie(["y","yy","yyy","yyyy"],Ae);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ae]=n._locale.eraYearOrdinalParse(e,i):t[Ae]=parseInt(e,10)});function J1(e,t){var n,r,i,s=this._eras||Et("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function em(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function tm(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),wm.call(this,e,t,n,r,i))}function wm(e,t,n,r,i){var s=Il(e,t,n,r,i),a=Nn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Oe("quarter","Q");Re("quarter",7);C("Q",vl);ie("Q",function(e,t){t[gt]=($(e)-1)*3});function gm(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Oe("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var ec=pn("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Oe("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Ur);C("DDDD",kl);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function xm(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Oe("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var ym=pn("Minutes",!1);H("s",["ss",2],0,"second");Oe("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],xt);var bm=pn("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Oe("millisecond","ms");Re("millisecond",16);C("S",Ur,vl);C("SS",Ur,Be);C("SSS",Ur,kl);var Nt,tc;for(Nt="SSSS";Nt.length<=9;Nt+="S")C(Nt,_n);function vm(e,t){t[zt]=$(("0."+e)*1e3)}for(Nt="S";Nt.length<=9;Nt+="S")ie(Nt,vm);tc=pn("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function km(){return this._isUTC?"UTC":""}function Sm(){return this._isUTC?"Coordinated Universal Time":""}var M=Vn.prototype;M.add=_1;M.calendar=k1;M.clone=S1;M.diff=M1;M.endOf=H1;M.format=C1;M.from=N1;M.fromNow=P1;M.to=U1;M.toNow=Y1;M.get=D0;M.invalidAt=K1;M.isAfter=E1;M.isBefore=D1;M.isBetween=T1;M.isSame=A1;M.isSameOrAfter=O1;M.isSameOrBefore=R1;M.isValid=z1;M.lang=zl;M.locale=ql;M.localeData=$l;M.max=zh;M.min=qh;M.parsingFlags=$1;M.set=T0;M.startOf=W1;M.subtract=w1;M.toArray=G1;M.toObject=Z1;M.toDate=V1;M.toISOString=F1;M.inspect=L1;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=q1;M.toString=I1;M.unix=B1;M.valueOf=j1;M.creationData=X1;M.eraName=tm;M.eraNarrow=nm;M.eraAbbr=rm;M.eraYear=im;M.year=Ml;M.isLeapYear=Z0;M.weekYear=fm;M.isoWeekYear=um;M.quarter=M.quarters=gm;M.month=Ol;M.daysInMonth=B0;M.week=M.weeks=J0;M.isoWeek=M.isoWeeks=Q0;M.weeksInYear=pm;M.weeksInWeekYear=_m;M.isoWeeksInYear=hm;M.isoWeeksInISOWeekYear=mm;M.date=ec;M.day=M.days=uh;M.weekday=hh;M.isoWeekday=mh;M.dayOfYear=xm;M.hour=M.hours=bh;M.minute=M.minutes=ym;M.second=M.seconds=bm;M.millisecond=M.milliseconds=tc;M.utcOffset=r1;M.utc=s1;M.local=a1;M.parseZone=o1;M.hasAlignedHourOffset=l1;M.isDST=c1;M.isLocal=f1;M.isUtcOffset=u1;M.isUtc=Bl;M.isUTC=Bl;M.zoneAbbr=km;M.zoneName=Sm;M.dates=$e("dates accessor is deprecated. Use date instead.",ec);M.months=$e("months accessor is deprecated. Use month instead",Ol);M.years=$e("years accessor is deprecated. Use year instead",Ml);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",i1);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",d1);function Em(e){return oe(e*1e3)}function Dm(){return oe.apply(null,arguments).parseZone()}function nc(e){return e}var ne=ls.prototype;ne.calendar=u0;ne.longDateFormat=_0;ne.invalidDate=g0;ne.ordinal=b0;ne.preparse=nc;ne.postformat=nc;ne.relativeTime=k0;ne.pastFuture=S0;ne.set=d0;ne.eras=J1;ne.erasParse=Q1;ne.erasConvertYear=em;ne.erasAbbrRegex=am;ne.erasNameRegex=sm;ne.erasNarrowRegex=om;ne.months=Y0;ne.monthsShort=W0;ne.monthsParse=j0;ne.monthsRegex=G0;ne.monthsShortRegex=V0;ne.week=z0;ne.firstDayOfYear=X0;ne.firstDayOfWeek=K0;ne.weekdays=oh;ne.weekdaysMin=ch;ne.weekdaysShort=lh;ne.weekdaysParse=fh;ne.weekdaysRegex=ph;ne.weekdaysShortRegex=_h;ne.weekdaysMinRegex=wh;ne.isPM=xh;ne.meridiem=vh;function Dr(e,t,n,r){var i=Et(),s=ut().set(r,t);return i[n](s,e)}function rc(e,t,n){if(St(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function Ss(e,t,n,r){typeof e=="boolean"?(St(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,St(t)&&(n=t,t=void 0),t=t||"");var i=Et(),s=e?i._week.dow:0,a,o=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)o[a]=Dr(t,(a+s)%7,r,"day");return o}function Tm(e,t){return rc(e,t,"months")}function Am(e,t){return rc(e,t,"monthsShort")}function Om(e,t,n){return Ss(e,t,n,"weekdays")}function Rm(e,t,n){return Ss(e,t,n,"weekdaysShort")}function Mm(e,t,n){return Ss(e,t,n,"weekdaysMin")}Ut("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Ut);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",Et);var _t=Math.abs;function Im(){var e=this._data;return this._milliseconds=_t(this._milliseconds),this._days=_t(this._days),this._months=_t(this._months),e.milliseconds=_t(e.milliseconds),e.seconds=_t(e.seconds),e.minutes=_t(e.minutes),e.hours=_t(e.hours),e.months=_t(e.months),e.years=_t(e.years),this}function ic(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Fm(e,t){return ic(this,e,t,1)}function Lm(e,t){return ic(this,e,t,-1)}function Ua(e){return e<0?Math.floor(e):Math.ceil(e)}function Cm(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,o,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Ua(Wi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),l=Ze(sc(t)),n+=l,t-=Ua(Wi(l)),o=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=o,this}function sc(e){return e*4800/146097}function Wi(e){return e*146097/4800}function Nm(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+sc(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Wi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Pm(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Dt(e){return function(){return this.as(e)}}var Um=Dt("ms"),Ym=Dt("s"),Wm=Dt("m"),Hm=Dt("h"),jm=Dt("d"),Bm=Dt("w"),Vm=Dt("M"),Gm=Dt("Q"),Zm=Dt("y");function qm(){return st(this)}function zm(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Xt(e){return function(){return this.isValid()?this._data[e]:NaN}}var $m=Xt("milliseconds"),Km=Xt("seconds"),Xm=Xt("minutes"),Jm=Xt("hours"),Qm=Xt("days"),ep=Xt("months"),tp=Xt("years");function np(){return Ze(this.days()/7)}var wt=Math.round,ln={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function rp(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function ip(e,t,n,r){var i=st(e).abs(),s=wt(i.as("s")),a=wt(i.as("m")),o=wt(i.as("h")),l=wt(i.as("d")),f=wt(i.as("M")),d=wt(i.as("w")),u=wt(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,rp.apply(null,p)}function sp(e){return e===void 0?wt:typeof e=="function"?(wt=e,!0):!1}function ap(e,t){return ln[e]===void 0?!1:t===void 0?ln[e]:(ln[e]=t,e==="s"&&(ln.ss=t-1),!0)}function op(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ln,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ln,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=ip(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var hi=Math.abs;function nn(e){return(e>0)-(e<0)||+e}function Zr(){if(!this.isValid())return this.localeData().invalidDate();var e=hi(this._milliseconds)/1e3,t=hi(this._days),n=hi(this._months),r,i,s,a,o=this.asSeconds(),l,f,d,u;return o?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",f=nn(this._months)!==nn(o)?"-":"",d=nn(this._days)!==nn(o)?"-":"",u=nn(this._milliseconds)!==nn(o)?"-":"",l+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Vr.prototype;X.isValid=Qh;X.abs=Im;X.add=Fm;X.subtract=Lm;X.as=Nm;X.asMilliseconds=Um;X.asSeconds=Ym;X.asMinutes=Wm;X.asHours=Hm;X.asDays=jm;X.asWeeks=Bm;X.asMonths=Vm;X.asQuarters=Gm;X.asYears=Zm;X.valueOf=Pm;X._bubble=Cm;X.clone=qm;X.get=zm;X.milliseconds=$m;X.seconds=Km;X.minutes=Xm;X.hours=Jm;X.days=Qm;X.weeks=np;X.months=ep;X.years=tp;X.humanize=op;X.toISOString=Zr;X.toString=Zr;X.toJSON=Zr;X.locale=ql;X.localeData=$l;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zr);X.lang=zl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Wr);C("X",O0);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js +L.version="2.29.4";l0(oe);L.fn=M;L.min=$h;L.max=Kh;L.now=Xh;L.utc=ut;L.unix=Em;L.months=Tm;L.isDate=Bn;L.locale=Ut;L.invalid=Cr;L.duration=st;L.isMoment=it;L.weekdays=Om;L.parseZone=Dm;L.localeData=Et;L.isDuration=dr;L.monthsShort=Am;L.weekdaysMin=Mm;L.defineLocale=_s;L.updateLocale=Dh;L.locales=Th;L.weekdaysShort=Rm;L.normalizeUnits=Ke;L.relativeTimeRounding=sp;L.relativeTimeThreshold=ap;L.calendarFormat=v1;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function lp(e,t,n,r,i=Date.now()){var p;const[s,a]=(p=a0(n))!=null?p:[[],0];let o=Wu(n,a),l=e;const f=o[0]&&o[0].content.match(/^title::(.+)$/);f&&(l=f[1],o=o.slice(1)),o[0]&&o[0].content.replace(/^#+/,"").trim()===l.trim()&&(o=o.slice(1));const d=[],u=cp(l,t,i,r,s);return rl(u,{type:dt.ROOT,level:-1},o,Vu,w=>s0(e,t,w,i,r),(w,v)=>{v.type===dt.HEADING&&d.push({...v,uid:w.uid})}),o=null,r.headingTracker.pathMap.set(t,d),r.headingTracker.nameMap.get(e)||r.headingTracker.nameMap.set(e,d),u}function cp(e,t,n,r,i){let s;const a=[];i.forEach(d=>{d.key==="tags"?s=ul(d.values,r.superTagTracker,r.idGenerator):a.push(t0(d,n,r))});let o=Eu(e,t,r),l="node";const f=dp(e,r.dailyNoteFormat);return f&&(o=f,l="date",e=f,r.summary.calendarNodes++),{uid:o,name:e,createdAt:n,editedAt:n,type:l,supertags:s,children:a.length>0?a:void 0}}function dp(e,t){const n=L(e,t,!0);return n.isValid()?n.format("MM-DD-YYYY"):null}function Ya(e,t){return e===t.length-1?"LAST":"NOT_LAST"}function fp(e,t){return e.adapter.readDirectory(t).filter(n=>{const r=t+Fr+n.getName();return n.isDirectory()&&!r.endsWith(".github")&&!r.endsWith(".obsidian")||!n.isDirectory()&&r.endsWith(".md")}).sort((n,r)=>Number(n.isDirectory())-Number(r.isDirectory()))}async function ac(e,t,n,r,i,s="LAST"){n(t);const a=fp(e,t);for(let o=0;o{const i=Ir(r),s=kt(n);n.adapter.appendToResultFile(e,`{ "uid": "${s}", "name": "${i}", "createdAt": ${t}, "editedAt": ${t}, "type": "node", "children": [ - `)}}function op(e,t){return n=>{e.adapter.appendToResultFile(t,`] - }`),n!=="LAST"&&e.adapter.appendToResultFile(t,",")}}function lp(e,t,n){return async(r,i)=>{const s=r.slice(n.vaultPath.length+1,-3),a=np(Ir(r).replace(".md",""),s,await n.adapter.readFile(r),n,t);n.adapter.appendToResultFile(e,JSON.stringify(a,null,2)),i!=="LAST"&&n.adapter.appendToResultFile(e,",")}}async function cp(e,t=Date.now()){await e.adapter.initReadingVault(),await dp(e);const n=`${e.vaultPath}.tif.json`;try{e.adapter.removeFile(n)}catch{}e.adapter.appendToResultFile(n,`{ + `)}}function hp(e,t){return n=>{e.adapter.appendToResultFile(t,`] + }`),n!=="LAST"&&e.adapter.appendToResultFile(t,",")}}function mp(e,t,n){return async(r,i)=>{const s=r.slice(n.vaultPath.length+1,-3),a=lp(Ir(r).replace(".md",""),s,await n.adapter.readFile(r),n,t);n.adapter.appendToResultFile(e,JSON.stringify(a,null,2)),i!=="LAST"&&n.adapter.appendToResultFile(e,",")}}async function pp(e,t=Date.now()){await e.adapter.initReadingVault(),await _p(e);const n=`${e.vaultPath}.tif.json`;try{e.adapter.removeFile(n)}catch{}e.adapter.appendToResultFile(n,`{ "version": "TanaIntermediateFile V0.1", "nodes": [ -`),await rc(e,e.vaultPath,ap(n,t,e),op(e,n),lp(n,t,e)),e.adapter.flushResultsFromInitialProcessing(n),tl(e.summary),await pu(n,e);const r=Su(Ir(e.vaultPath),t,e);r&&e.adapter.appendToResultFile(n,", "+JSON.stringify(r,null,2)),e.adapter.appendToResultFile(n,` - ]`);const i=Vu(e.superTagTracker);return i.length>0&&e.adapter.appendToResultFile(n,`, +`),await ac(e,e.vaultPath,up(n,t,e),hp(e,n),mp(n,t,e)),e.adapter.flushResultsFromInitialProcessing(n),nl(e.summary),await gu(n,e);const r=Au(Ir(e.vaultPath),t,e);r&&e.adapter.appendToResultFile(n,", "+JSON.stringify(r,null,2)),e.adapter.appendToResultFile(n,` + ]`);const i=$u(e.superTagTracker);return i.length>0&&e.adapter.appendToResultFile(n,`, "supertags": `+JSON.stringify(i,null,2)),e.attributes.length>0&&e.adapter.appendToResultFile(n,`, "attributes": `+JSON.stringify(e.attributes,null,2)),e.adapter.appendToResultFile(n,`, "summary": `+JSON.stringify(e.summary,null,2)),e.adapter.appendToResultFile(n,` -}`),e.adapter.flushResultsFromInitialProcessing(n),e.summary}async function dp(e){const t=await tu(e,"daily-notes",n=>n||{format:"YYYY-MM-DD"});e.dailyNoteFormat=t.format,console.log("Using daily notes format "+t.format+" for detecting calendar nodes.")}async function fp(e,t,n,r){const i=new nu(e),s=au(t,i,r);return cp(s,n).then(a=>[a,s,i])}const up=document.getElementById("vault-zip");up.addEventListener("change",async e=>{let t,n=0;try{const r=e.target.files[0],i=r.name.slice(0,r.name.indexOf(".zip"));t=document.createElement("b"),t.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(t);const s=setInterval(()=>n++,1e3),[a,,o]=await fp(r,i,Date.now());clearInterval(s),document.body.removeChild(t);const l=document.createElement("b");l.innerHTML="Success! And it only took "+n+" seconds.
",document.body.appendChild(l);const f=document.createElement("h2");f.innerText="Summary:",document.body.appendChild(f);const d=document.createElement("p");d.innerText=Object.entries(a).map(w=>w[0]+": "+w[1]).join(` +}`),e.adapter.flushResultsFromInitialProcessing(n),e.summary}async function _p(e){const t=await iu(e,"daily-notes",n=>n||{format:"YYYY-MM-DD"});e.dailyNoteFormat=t.format,console.log("Using daily notes format "+t.format+" for detecting calendar nodes.")}async function wp(e,t,n,r){const i=new su(e),s=cu(t,i,r);return pp(s,n).then(a=>[a,s,i])}const gp=document.getElementById("vault-zip");gp.addEventListener("change",async e=>{let t,n=0;try{const r=e.target.files[0],i=r.name.slice(0,r.name.indexOf(".zip"));t=document.createElement("b"),t.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(t);const s=setInterval(()=>n++,1e3),[a,,o]=await wp(r,i,Date.now());clearInterval(s),document.body.removeChild(t);const l=document.createElement("b");l.innerHTML="Success! And it only took "+n+" seconds.
",document.body.appendChild(l);const f=document.createElement("h2");f.innerText="Summary:",document.body.appendChild(f);const d=document.createElement("p");d.innerText=Object.entries(a).map(w=>w[0]+": "+w[1]).join(` `),document.body.appendChild(d);const u=o.getResult(),p=document.createElement("button");p.innerText="Download TIF File",p.addEventListener("click",()=>{const w=URL.createObjectURL(new Blob([u])),v=document.createElement("a");v.style.display="none",v.href=w,v.download=i+".tif.json",document.body.appendChild(v),v.click(),URL.revokeObjectURL(w)}),document.body.appendChild(p)}catch(r){console.trace(r),t&&document.body.removeChild(t);const i=r.stack.toString();document.body.appendChild(document.createElement("br"));const s=document.createElement("b");if(s.innerText="An Error occured.",document.body.appendChild(s),i.toLowerCase().includes("readdirectory")){document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const o=document.createElement("b");o.innerText=`It probably has to do with a not properly zipped vault. Please check the text at the top again.`,document.body.appendChild(o)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack): `+i,document.body.appendChild(a)}}); -//# sourceMappingURL=index.3adbdeaf.js.map +//# sourceMappingURL=index.2b2a3e87.js.map diff --git a/docs/assets/index.2b2a3e87.js.map b/docs/assets/index.2b2a3e87.js.map new file mode 100644 index 0000000..a730118 --- /dev/null +++ b/docs/assets/index.2b2a3e87.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.2b2a3e87.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: () => Data) {\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData();\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: () => Data) {\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData();\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(fileName, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(fileName, filePath, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext) {\n return getBracketLinks(content, true)\n .filter((bracketLink) => bracketLink.trim() !== '')\n .map((bracketLink) => {\n //handling aliases\n const aliasArr = bracketLink.split('|');\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [bracketLink, foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(obsidianLink, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n });\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(obsidianLink, filePath, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n });\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: tags are too naive! ()\nexport function detectTags(content: string) {\n return content.match(tagRegex);\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { Hierarchy, HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchy: Hierarchy): [string, 'todo' | 'done'] | null {\n if (hierarchy.type === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function keyValToFieldNode(\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) => ({\n uid: untrackedUidRequest(context),\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n })),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags } from '../markdown/tags';\nimport { handleImages } from '../tanafeatures/imageNodes';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode, requestUidsForAllLinks } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n obsidianNode: MarkdownNode,\n tanaNode: TanaIntermediateNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(tanaNode.name)) {\n const splitName = tanaNode.name.split('::');\n return keyValToFieldNode(splitName[0], [splitName[1].trim()], today, context, tanaNode.uid);\n }\n\n return;\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const tanaNode: TanaIntermediateNode = {\n uid,\n name: content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n\n const [updatedContent, todoState] = removeTodo(content, obsidianNode) ?? [content, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tag without losing meaning because it will show up as a super tag anyways\n const lastTag = tags[tags.length - 1];\n if (tanaNode.name.endsWith(lastTag)) {\n tanaNode.name = tanaNode.name.slice(0, -lastTag.length);\n }\n\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n\n handleImages(tanaNode, today, context);\n\n const dataviewAttributeNode = convertDataViewAttribute(obsidianNode, tanaNode, today, context);\n\n return dataviewAttributeNode ?? tanaNode;\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport moment from 'moment';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n let nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeUid = dateDisplayName;\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n\nfunction dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return null;\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","dailyNoteFormat","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","requestUidsForAllLinks","bracketLink","aliasArr","alias","foundUid","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","pos","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","detectTags","cleanUpTag","tag","superTagUidRequests","tags","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","tanaNode","image","childImageNodes","oldLink","keyValToFieldNode","values","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","updatedContent","todoState","lastTag","foundUIDs","refSet","dataviewAttributeNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","displayName","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","dateStringToDateUID","moment","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAAU,YAAc,OAExBA,EAAU,YAAc,cACrBA,CACV,CACD,SAASN,EAAeD,E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ChD,MAAAy0C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file diff --git a/docs/assets/index.3adbdeaf.js.map b/docs/assets/index.3adbdeaf.js.map deleted file mode 100644 index 41edf87..0000000 --- a/docs/assets/index.3adbdeaf.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.3adbdeaf.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: () => Data) {\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData();\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: () => Data) {\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData();\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(fileName, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(fileName, filePath, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n //20 secs!\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(obsidianLink, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n });\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(obsidianLink, filePath, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n });\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: tags are too naive! ()\nexport function detectTags(content: string) {\n return content.match(tagRegex);\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { Hierarchy, HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchy: Hierarchy): [string, 'todo' | 'done'] | null {\n if (hierarchy.type === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags } from '../markdown/tags';\nimport { handleImages } from '../tanafeatures/imageNodes';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode, requestUidForLink } from '../links/internalLinks';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\n//30 sec\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n //1 sec\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const tanaNode: TanaIntermediateNode = {\n uid,\n name: content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n\n const [updatedContent, todoState] = removeTodo(content, obsidianNode) ?? [content, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tag without losing meaning because it will show up as a super tag anyways\n const lastTag = tags[tags.length - 1];\n if (tanaNode.name.endsWith(lastTag)) {\n tanaNode.name = tanaNode.name.slice(0, -lastTag.length);\n }\n\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n const foundUIDs = getBracketLinks(tanaNode.name, true)\n .filter((bracketLink) => bracketLink.trim() !== '')\n .map((bracketLink) => {\n //handling aliases\n const aliasArr = bracketLink.split('|');\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [bracketLink, foundUid, result];\n });\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n\n handleImages(tanaNode, today, context);\n\n return tanaNode;\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import { TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function frontMatterToFieldNode(\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n let children: TanaIntermediateNode[] | undefined;\n\n if (data.values && data.values.length > 0) {\n children = data.values.map((value) => ({\n uid: untrackedUidRequest(context),\n name: value,\n type: 'node',\n createdAt: today,\n editedAt: today,\n }));\n }\n addAttribute(data.key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: untrackedUidRequest(context),\n name: data.key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children,\n };\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport moment from 'moment';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n let nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeUid = dateDisplayName;\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n\nfunction dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return null;\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","dailyNoteFormat","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","cleanUpLink","detectLinkType","requestUidForLink","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","pos","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","detectTags","cleanUpTag","tag","superTagUidRequests","tags","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","tanaNode","image","childImageNodes","oldLink","convertCodeBlock","convertMarkdownNode","updatedContent","todoState","lastTag","foundUIDs","bracketLink","aliasArr","alias","foundUid","refSet","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","frontMatterToFieldNode","addAttribute","attributes","foundAttr","attr","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","displayName","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","dateStringToDateUID","moment","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,E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AAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 57a6a35..47fa8d2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

diff --git a/src/converters/obsidian/hierarchy/dataviewattributes.ts b/src/converters/obsidian/hierarchy/dataviewattributes.ts new file mode 100644 index 0000000..836e783 --- /dev/null +++ b/src/converters/obsidian/hierarchy/dataviewattributes.ts @@ -0,0 +1,34 @@ +import { isEmptySpace } from '../markdown/emptySpace'; +import { nextNewLine } from '../markdown/newline'; +import { Hierarchy, HierarchyType } from './markdownNodes'; + +export function findDataViewAttributeSliceStartPosition(curPosition: number) { + return curPosition; +} + +export function findDataViewSliceEndPosition(content: string, curPosition: number) { + return nextNewLine(content, curPosition); +} + +export function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null { + //TODO: dont need to search newline again later + //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else + const newline = nextNewLine(content, curPosition); + const line = content.slice(curPosition, newline); + if (isSoloDataViewAttribute(line)) { + return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 }; + } + return null; +} + +export function isSoloDataViewAttribute(line: string) { + const splitName = line.split('::'); + return ( + splitName.length === 2 && + splitName[0].trim() === splitName[0] && + splitName[0] !== '' && + splitName[1] !== '' && + splitName[1] !== ' ' && + isEmptySpace(splitName[1][0]) + ); +} diff --git a/src/converters/obsidian/hierarchy/markdownNodes.ts b/src/converters/obsidian/hierarchy/markdownNodes.ts index c075965..99febd6 100644 --- a/src/converters/obsidian/hierarchy/markdownNodes.ts +++ b/src/converters/obsidian/hierarchy/markdownNodes.ts @@ -1,5 +1,10 @@ import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets'; import { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks'; +import { + detectDataViewAttributeHierarchy, + findDataViewAttributeSliceStartPosition, + findDataViewSliceEndPosition, +} from './dataviewattributes'; import { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings'; import { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs'; @@ -10,6 +15,8 @@ export enum HierarchyType { BULLET = 'Bullet Node', PARAGRAPH = 'Paragraph', CODEBLOCK = 'Code Block', + //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet + DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests } export interface MarkdownNode { @@ -93,6 +100,11 @@ export function detectNextHierarchy(content: string, curPosition: number): Hiera if (hierarchy) { return hierarchy; } + //TODO: I need to paste this code to many times + hierarchy = detectDataViewAttributeHierarchy(content, curPosition); + if (hierarchy) { + return hierarchy; + } } return { type: HierarchyType.PARAGRAPH, level: 0 }; } @@ -111,6 +123,8 @@ function findSliceStartPosition(content: string, curPosition: number, hierarchy: return findParagraphSliceStartPosition(curPosition); case HierarchyType.CODEBLOCK: return findCodeBlockSliceStartPosition(curPosition); + case HierarchyType.DATAVIEWATTRIBUTE: + return findDataViewAttributeSliceStartPosition(curPosition); default: throw 'Unsupported HierarchyType detected: ' + hierarchy; } @@ -133,6 +147,8 @@ function findSliceEndPosition( return findParagraphSliceEndPosition(content, curPosition); case HierarchyType.CODEBLOCK: return [findCodeBlockSliceEndPosition(curPosition, hierarchy)]; + case HierarchyType.DATAVIEWATTRIBUTE: + return [findDataViewSliceEndPosition(content, curPosition)]; default: throw 'Unsupported HierarchyType detected: ' + hierarchy; } @@ -158,6 +174,14 @@ export function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChil return false; } + //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent + if ( + potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE || + potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE + ) { + return false; + } + if (potentialParent.type === potentialChild.type) { return potentialParent.level < potentialChild.level; } diff --git a/src/converters/obsidian/hierarchy/paragraphs.ts b/src/converters/obsidian/hierarchy/paragraphs.ts index 8472f06..3c31855 100644 --- a/src/converters/obsidian/hierarchy/paragraphs.ts +++ b/src/converters/obsidian/hierarchy/paragraphs.ts @@ -4,6 +4,7 @@ import { detectHeadingHierarchy } from './headings'; import { Hierarchy } from './markdownNodes'; import { lastPositionIsNewline, nextNewLine } from '../markdown/newline'; import { detectCodeBlockHierarchy } from './codeblocks'; +import { detectDataViewAttributeHierarchy } from './dataviewattributes'; export function findParagraphSliceStartPosition(curPosition: number) { //we don't trim the start @@ -51,6 +52,11 @@ function newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | nul if (hierarchy) { return hierarchy; } + hierarchy = detectDataViewAttributeHierarchy(content, pos); + if (hierarchy) { + return hierarchy; + } + hierarchy = detectBulletHierarchy(content, pos); if (hierarchy) { return hierarchy; diff --git a/src/converters/obsidian/links/internalLinks.ts b/src/converters/obsidian/links/internalLinks.ts index 27ff6c2..777d342 100644 --- a/src/converters/obsidian/links/internalLinks.ts +++ b/src/converters/obsidian/links/internalLinks.ts @@ -3,6 +3,7 @@ import { removeBlockId } from '../markdown/blockIds'; import { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks'; import { untrackedUidRequest } from './genericLinks'; import { headingLinkUidRequestForUsing } from './headingLinks'; +import { getBracketLinks } from '../../../utils/utils'; export enum UidRequestType { FILE, @@ -15,6 +16,24 @@ export enum LinkType { BLOCK, } +export function requestUidsForAllLinks(content: string, context: VaultContext) { + return getBracketLinks(content, true) + .filter((bracketLink) => bracketLink.trim() !== '') + .map((bracketLink) => { + //handling aliases + const aliasArr = bracketLink.split('|'); + const link = aliasArr[0]; + const alias = aliasArr[1]; + const foundUid = requestUidForLink(link, context); + const result = + alias !== undefined && alias.trim() !== '' + ? '[' + alias.trim() + ']([[' + foundUid + ']])' + : '[[' + foundUid + ']]'; + + return [bracketLink, foundUid, result]; + }); +} + export function cleanUpLink(link: string) { //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do return link @@ -44,7 +63,6 @@ export function requestUidForLink(obsidianLink: string, context: VaultContext) { const linkType = detectLinkType(cleanLink); switch (linkType) { case LinkType.DEFAULT: - //20 secs! return standardLinkUidRequest(cleanLink[0], context); case LinkType.BLOCK: return blockLinkUidRequestForUsing(cleanLink, context); diff --git a/src/converters/obsidian/tanaconversion/nodeConversion.ts b/src/converters/obsidian/tanaconversion/nodeConversion.ts index 779f16c..762fc42 100644 --- a/src/converters/obsidian/tanaconversion/nodeConversion.ts +++ b/src/converters/obsidian/tanaconversion/nodeConversion.ts @@ -1,5 +1,4 @@ import { NodeType, TanaIntermediateNode } from '../../../types/types'; -import { getBracketLinks } from '../../../utils/utils'; import { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes'; import { VaultContext } from '../VaultContext'; import { superTagUidRequests } from '../tanafeatures/supertags'; @@ -8,7 +7,9 @@ import { removeTodo } from '../markdown/todo'; import { detectTags } from '../markdown/tags'; import { handleImages } from '../tanafeatures/imageNodes'; import { postProcessCodeBlock } from '../hierarchy/codeblocks'; -import { requestUidForContentNode, requestUidForLink } from '../links/internalLinks'; +import { requestUidForContentNode, requestUidsForAllLinks } from '../links/internalLinks'; +import { keyValToFieldNode } from '../tanafeatures/fields'; +import { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes'; function convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) { const tanaNode: TanaIntermediateNode = { @@ -22,7 +23,21 @@ function convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: Va return tanaNode; } -//30 sec +function convertDataViewAttribute( + obsidianNode: MarkdownNode, + tanaNode: TanaIntermediateNode, + today: number, + context: VaultContext, +) { + //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets) + if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(tanaNode.name)) { + const splitName = tanaNode.name.split('::'); + return keyValToFieldNode(splitName[0], [splitName[1].trim()], today, context, tanaNode.uid); + } + + return; +} + export function convertMarkdownNode( fileName: string, filePath: string, @@ -34,7 +49,6 @@ export function convertMarkdownNode( return convertCodeBlock(obsidianNode, today, context); } - //1 sec const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context); const tanaNode: TanaIntermediateNode = { uid, @@ -64,21 +78,7 @@ export function convertMarkdownNode( tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true); } - const foundUIDs = getBracketLinks(tanaNode.name, true) - .filter((bracketLink) => bracketLink.trim() !== '') - .map((bracketLink) => { - //handling aliases - const aliasArr = bracketLink.split('|'); - const link = aliasArr[0]; - const alias = aliasArr[1]; - const foundUid = requestUidForLink(link, context); - const result = - alias !== undefined && alias.trim() !== '' - ? '[' + alias.trim() + ']([[' + foundUid + ']])' - : '[[' + foundUid + ']]'; - - return [bracketLink, foundUid, result]; - }); + const foundUIDs = requestUidsForAllLinks(tanaNode.name, context); if (foundUIDs.length > 0) { //using Set to filter out links that appear multiple times @@ -95,5 +95,7 @@ export function convertMarkdownNode( handleImages(tanaNode, today, context); - return tanaNode; + const dataviewAttributeNode = convertDataViewAttribute(obsidianNode, tanaNode, today, context); + + return dataviewAttributeNode ?? tanaNode; } diff --git a/src/converters/obsidian/tanafeatures/fields.ts b/src/converters/obsidian/tanafeatures/fields.ts index 9f6cc0e..5f639e9 100644 --- a/src/converters/obsidian/tanafeatures/fields.ts +++ b/src/converters/obsidian/tanafeatures/fields.ts @@ -1,37 +1,51 @@ -import { TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types'; +import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types'; import { VaultContext } from '../VaultContext'; import { FrontmatterData } from '../markdown/frontmatter'; import { untrackedUidRequest } from '../links/genericLinks'; -export function frontMatterToFieldNode( - data: FrontmatterData, +export function keyValToFieldNode( + key: string, + values: string[], today: number, context: VaultContext, + uid?: string, + children?: TanaIntermediateNode[], ): TanaIntermediateNode { - let children: TanaIntermediateNode[] | undefined; + let childNodes = children; - if (data.values && data.values.length > 0) { - children = data.values.map((value) => ({ - uid: untrackedUidRequest(context), - name: value, - type: 'node', - createdAt: today, - editedAt: today, - })); + if (values && values.length > 0) { + childNodes = children ?? []; + childNodes?.push( + ...values.map((value) => ({ + uid: untrackedUidRequest(context), + name: value, + type: 'node' as NodeType, + createdAt: today, + editedAt: today, + })), + ); } - addAttribute(data.key, context.attributes); + addAttribute(key, context.attributes); context.summary.fields++; return { - uid: untrackedUidRequest(context), - name: data.key, + uid: uid ?? untrackedUidRequest(context), + name: key, type: 'field', createdAt: today, editedAt: today, - children, + children: childNodes, }; } +export function frontMatterToFieldNode( + data: FrontmatterData, + today: number, + context: VaultContext, +): TanaIntermediateNode { + return keyValToFieldNode(data.key, data.values, today, context); +} + function addAttribute(name: string, attributes: TanaIntermediateAttribute[]) { const foundAttr = attributes.filter((attr) => attr.name === name)[0]; if (foundAttr) { diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index d1a814c..f8fb9cc 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -89,11 +89,11 @@ }, { "uid": "19", - "name": "[[63]]", + "name": "[[66]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["63"] + "refs": ["66"] }, { "uid": "21", @@ -336,6 +336,15 @@ }, { "uid": "63", + "name": "Key1", + "type": "field", + "createdAt": 1, + "editedAt": 1, + "children": [{ "uid": "64", "name": "Value1", "type": "node", "createdAt": 1, "editedAt": 1 }] + }, + { "uid": "65", "name": "KeyX::ValueY", "createdAt": 1, "editedAt": 1, "type": "node" }, + { + "uid": "66", "name": "Heading 2", "createdAt": 1, "editedAt": 1, @@ -350,7 +359,7 @@ "refs": ["48"], "children": [ { - "uid": "65", + "uid": "68", "name": "Node with [[13]] [[14]]", "createdAt": 1, "editedAt": 1, @@ -359,24 +368,34 @@ "refs": ["13", "14"] }, { - "uid": "66", - "name": "Fun with missing block ref [[67]] [[68]]", + "uid": "69", + "name": "Fun with missing block ref [[70]] [[71]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["67", "68"] + "refs": ["70", "71"] + }, + { + "uid": "72", + "name": "Key2", + "type": "field", + "createdAt": 1, + "editedAt": 1, + "children": [ + { "uid": "73", "name": "Value2", "type": "node", "createdAt": 1, "editedAt": 1 } + ] } ] }, { - "uid": "69", + "uid": "74", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "70", + "uid": "75", "name": "Referencing a block [[43]]", "createdAt": 1, "editedAt": 1, @@ -391,9 +410,9 @@ } ] }, - { "uid": "71", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "76", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "72", + "uid": "77", "name": "folder", "createdAt": 1, "editedAt": 1, @@ -405,7 +424,7 @@ ] }, { - "uid": "73", + "uid": "78", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, @@ -416,9 +435,9 @@ { "uid": "!42!", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "13", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "14", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "68", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "71", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "8", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "67", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "70", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ], @@ -430,7 +449,9 @@ ], "attributes": [ { "name": "field0", "values": [], "count": 2 }, - { "name": "field1", "values": [], "count": 1 } + { "name": "field1", "values": [], "count": 1 }, + { "name": "Key1", "values": [], "count": 1 }, + { "name": "Key2", "values": [], "count": 1 } ], - "summary": { "leafNodes": 66, "topLevelNodes": 2, "totalNodes": 68, "calendarNodes": 1, "fields": 3, "brokenRefs": 0 } + "summary": { "leafNodes": 71, "topLevelNodes": 2, "totalNodes": 73, "calendarNodes": 1, "fields": 5, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/vault.zip b/src/converters/obsidian/tests/fixtures/vault.zip index 1805b4d170a3d04290c68a39bbb7cd895d93732b..15248b210aa48ab94a9397b0fb47c877c7a0db85 100644 GIT binary patch delta 755 zcmca2_DYN=z?+$civa}GeJ1kAvhNh|Oy=|OooFD%%;4ZV(N~>4ex-Y|08pgbj>$V^ z;%+T=U29LUz?+ZE(K$YoA26!1$1QUM>6+ZYECm+RVlo4Zg?sr7~ByopJf zeWy9hbfyJulYcO2vwP37h1sW4?K;_=*@%5}t1ZZUkYT(pHUx&6w#BluFfuS~p1hn{ zq5kt$-((Ojt>9*0WO>2NzyKzE1LFOg4Fu}<`xkPqFFX0`#A2zbJlkCsT{JmUQqYsO zM(0A_ueW;-9r##M{`apd2czHn-x8tk{jYr7v*&Q;6iW`a6u5 zM9O4!Ruy&+Nc?RMV%20~Qumo$%dX7~jP}VJIm9M6aI%5oeex-GQ>OTplNmW=fssC0 zfy06s80&BqplGk+FkuEpJ5Wpp9OV}{T%df2DWE7f<1}OjMmbC$D9$@LEt!FF4ijPq zMfzh-2WDWTgN#CpaDOg6W?*E)RfBvrpG%tY(d6A+vdlogf%Jg<^^;3R!jP4Lp)9d9 fr$oObwYWqtHzhQLm4VsAda^FJB3mmvD2)REUZ@UK delta 745 zcmaDQc14UQz?+$civa|tPMF9e%RaNiGr2d>XR;!z$m9=9Y|KkG_)PRwXa6kgp6pQO zGqKu^38-$j7FeB1vd_dfADM42^Pc>GQH}lYZda&QDdw+0F)b!DcHKR$$$aTPlhc_z zm{~dlCU0U=W{;5bNd{t=6-={xC;wp5W-nc4i(>P%iGGvanT^=1yF8PDHUX7O@dAwq zef3jn?>nG-TPH7PR;Y&>mRwrF&A`a=f|-EmT29qi}_Y09IR; z$KNUp7rst*(6qk9TR!Db4Xfln-|#mX3JjX7|9N;ZPTp9bTX@{V$#L=GZqvRnhMV?N znK}MkyJq6;eagWurCaIt2KW0(p6Q!xOm8L%`(L|ab;07HjZ}{O>9d!ApAY}YbHaVW zpU@req-P0edOzmNF%Y$E_gOUk#j@{li#ywvn#G}fCU>c$|l>gs=(rGa|Wv> z6G&__yEfCzj>!kuWkJzA`2o8rGccYff8>$@$(nIkz+^!&Jb}Z685qMLS#az=<8WaH z#_r^U>@wh(_2D#R2E{6n4~o%woR-YM7zIm%V)7@a12ZrtLE6z`F_lXXrcoZ~_)u_S zgc70*5^(O8#xs*Ia>+6SJqB|kKevp8G%Eu`Sz>8UiGE3Hafx1TN@xfx12fQD&fJP@ I`RpL=0OB1IV*mgE diff --git a/src/converters/obsidian/tests/fixtures/vault/folder/test.md b/src/converters/obsidian/tests/fixtures/vault/folder/test.md index a6077b8..89fa988 100644 --- a/src/converters/obsidian/tests/fixtures/vault/folder/test.md +++ b/src/converters/obsidian/tests/fixtures/vault/folder/test.md @@ -9,11 +9,15 @@ Starting without [[heading]] 2. Stuff but with a newline. +Key1:: Value1 +KeyX::ValueY + ## Heading 2 - Valid Heading [[test#Heading 2#Out of Level]] with duplicate but valid ^BLOCK_UID - [x] Node with [[Link]] [[Link2]] - Fun with missing block ref [[test#^MISSING]] [[missing#^MISSING]] + - Key2:: Value2 #### Out of Level From 66665c2e70322ca8c46c9600a7633987cfaf31b2 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Tue, 18 Oct 2022 21:36:51 +0200 Subject: [PATCH 79/94] Obsidian: support links in Dataview attributes --- docs/assets/index.2b2a3e87.js.map | 1 - .../{index.2b2a3e87.js => index.37a61c5d.js} | 48 +++---- docs/assets/index.37a61c5d.js.map | 1 + docs/index.html | 2 +- .../obsidian/links/internalLinks.ts | 31 +++- src/converters/obsidian/markdown/todo.ts | 6 +- .../obsidian/tanaconversion/fileConversion.ts | 2 +- .../obsidian/tanaconversion/nodeConversion.ts | 82 ++++------- .../obsidian/tanafeatures/fields.ts | 29 ++-- .../obsidian/tanafeatures/postprocessing.ts | 47 ++++++ .../obsidian/tests/fixtures/full.tif.json | 134 ++++++++++-------- .../obsidian/tests/fixtures/vault.zip | Bin 2922 -> 2944 bytes .../fixtures/vault/folder/folder/test4.md | 1 + .../tests/fixtures/vault/folder/test.md | 2 +- 14 files changed, 224 insertions(+), 162 deletions(-) delete mode 100644 docs/assets/index.2b2a3e87.js.map rename docs/assets/{index.2b2a3e87.js => index.37a61c5d.js} (65%) create mode 100644 docs/assets/index.37a61c5d.js.map create mode 100644 src/converters/obsidian/tanafeatures/postprocessing.ts diff --git a/docs/assets/index.2b2a3e87.js.map b/docs/assets/index.2b2a3e87.js.map deleted file mode 100644 index a730118..0000000 --- a/docs/assets/index.2b2a3e87.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.2b2a3e87.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: () => Data) {\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData();\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: () => Data) {\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData();\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(fileName, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(fileName, filePath, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext) {\n return getBracketLinks(content, true)\n .filter((bracketLink) => bracketLink.trim() !== '')\n .map((bracketLink) => {\n //handling aliases\n const aliasArr = bracketLink.split('|');\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [bracketLink, foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(obsidianLink, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n });\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(obsidianLink, filePath, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n });\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: tags are too naive! ()\nexport function detectTags(content: string) {\n return content.match(tagRegex);\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { Hierarchy, HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchy: Hierarchy): [string, 'todo' | 'done'] | null {\n if (hierarchy.type === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function keyValToFieldNode(\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) => ({\n uid: untrackedUidRequest(context),\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n })),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags } from '../markdown/tags';\nimport { handleImages } from '../tanafeatures/imageNodes';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode, requestUidsForAllLinks } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n obsidianNode: MarkdownNode,\n tanaNode: TanaIntermediateNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(tanaNode.name)) {\n const splitName = tanaNode.name.split('::');\n return keyValToFieldNode(splitName[0], [splitName[1].trim()], today, context, tanaNode.uid);\n }\n\n return;\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const tanaNode: TanaIntermediateNode = {\n uid,\n name: content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n\n const [updatedContent, todoState] = removeTodo(content, obsidianNode) ?? [content, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tag without losing meaning because it will show up as a super tag anyways\n const lastTag = tags[tags.length - 1];\n if (tanaNode.name.endsWith(lastTag)) {\n tanaNode.name = tanaNode.name.slice(0, -lastTag.length);\n }\n\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n\n handleImages(tanaNode, today, context);\n\n const dataviewAttributeNode = convertDataViewAttribute(obsidianNode, tanaNode, today, context);\n\n return dataviewAttributeNode ?? tanaNode;\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport moment from 'moment';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n let nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeUid = dateDisplayName;\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n\nfunction dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return null;\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","dailyNoteFormat","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","requestUidsForAllLinks","bracketLink","aliasArr","alias","foundUid","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","pos","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","detectTags","cleanUpTag","tag","superTagUidRequests","tags","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","tanaNode","image","childImageNodes","oldLink","keyValToFieldNode","values","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","updatedContent","todoState","lastTag","foundUIDs","refSet","dataviewAttributeNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","displayName","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","dateStringToDateUID","moment","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,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AI,gBAAgB2nB,CAAG,CAAA,CACxB,EACQ,SAAA,KAAK,YAAYqxC,CAAc,QACjCv0C,GACP,QAAQ,MAAMA,CAAK,EAEfi0C,GACO,SAAA,KAAK,YAAYA,CAAQ,EAI9B,MAAAO,EAAoBx0C,EAAc,MAAM,SAAS,EAEvD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAy0C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file diff --git a/docs/assets/index.2b2a3e87.js b/docs/assets/index.37a61c5d.js similarity index 65% rename from docs/assets/index.2b2a3e87.js rename to docs/assets/index.37a61c5d.js index ce83b58..2918575 100644 --- a/docs/assets/index.2b2a3e87.js +++ b/docs/assets/index.37a61c5d.js @@ -1,49 +1,49 @@ -var pc=Object.defineProperty;var _c=(e,t,n)=>t in e?pc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Bt=(e,t,n)=>(_c(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const In=15,mi=30,pi=19,wc=29,ur=256,Hi=ur+1+wc,Is=2*Hi+1,yn=256,gc=7,Fs=16,Ls=17,Cs=18,$r=8*2,hr=-1,xc=1,qn=2,yc=0,rn=0,Ns=1,bc=3,Le=4,Qe=0,Wa=1,zn=2,et=-2,vc=-3,Qt=-5;function Tr(e){return Ar(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function Ar(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?Ar(n):n),[])}const Ps=[0,1,2,3].concat(...Tr([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function se(){const e=this;function t(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,f=e.stat_desc.max_length;let d,u,p,w,v,h,c=0;for(w=0;w<=In;w++)i.bl_count[w]=0;for(s[i.heap[i.heap_max]*2+1]=0,d=i.heap_max+1;df&&(w=f,c++),s[u*2+1]=w,!(u>e.max_code)&&(i.bl_count[w]++,v=0,u>=l&&(v=o[u-l]),h=s[u*2],i.opt_len+=h*(w+v),a&&(i.static_len+=h*(a[u*2+1]+v)));if(c!==0){do{for(w=f-1;i.bl_count[w]===0;)w--;i.bl_count[w]--,i.bl_count[w+1]+=2,i.bl_count[f]--,c-=2}while(c>0);for(w=f;w!==0;w--)for(u=i.bl_count[w];u!==0;)p=i.heap[--d],!(p>e.max_code)&&(s[p*2+1]!=w&&(i.opt_len+=(w-s[p*2+1])*s[p*2],s[p*2+1]=w),u--)}}function n(i,s){let a=0;do a|=i&1,i>>>=1,a<<=1;while(--s>0);return a>>>1}function r(i,s,a){const o=[];let l=0,f,d,u;for(f=1;f<=In;f++)o[f]=l=l+a[f-1]<<1;for(d=0;d<=s;d++)u=i[d*2+1],u!==0&&(i[d*2]=n(o[u]++,u))}e.build_tree=function(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.elems;let l,f,d=-1,u;for(i.heap_len=0,i.heap_max=Is,l=0;l=1;l--)i.pqdownheap(s,l);u=o;do l=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(s,1),f=i.heap[1],i.heap[--i.heap_max]=l,i.heap[--i.heap_max]=f,s[u*2]=s[l*2]+s[f*2],i.depth[u]=Math.max(i.depth[l],i.depth[f])+1,s[l*2+1]=s[f*2+1]=u,i.heap[1]=u++,i.pqdownheap(s,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],t(i),r(s,e.max_code,i.bl_count)}}se._length_code=[0,1,2,3,4,5,6,7].concat(...Tr([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));se.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];se.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];se.d_code=function(e){return e<256?Ps[e]:Ps[256+(e>>>7)]};se.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];se.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];se.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];se.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function De(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}const kc=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],Sc=Tr([[144,8],[112,9],[24,7],[8,8]]);De.static_ltree=Ar(kc.map((e,t)=>[e,Sc[t]]));const Ec=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],Dc=Tr([[30,5]]);De.static_dtree=Ar(Ec.map((e,t)=>[e,Dc[t]]));De.static_l_desc=new De(De.static_ltree,se.extra_lbits,ur+1,Hi,In);De.static_d_desc=new De(De.static_dtree,se.extra_dbits,0,mi,In);De.static_bl_desc=new De(null,se.extra_blbits,0,pi,gc);const Tc=9,Ac=8;function at(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const Ha=0,sr=1,qt=2,Je=[new at(0,0,0,0,Ha),new at(4,4,8,4,sr),new at(4,5,16,8,sr),new at(4,6,32,32,sr),new at(4,4,16,16,qt),new at(8,16,32,32,qt),new at(8,16,128,128,qt),new at(8,32,128,256,qt),new at(32,128,258,1024,qt),new at(32,258,258,4096,qt)],$n=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ge=0,Kn=1,bn=2,Xn=3,Oc=32,Kr=42,Jn=113,vn=666,Xr=8,Rc=0,Jr=1,Mc=2,ce=3,ar=258,Ye=ar+ce+1;function Us(e,t,n,r){const i=e[t*2],s=e[n*2];return i=3&&j[se.bl_order[T]*2+1]===0;T--);return e.opt_len+=3*(T+1)+5+5+4,T}function Ve(T){e.pending_buf[e.pending++]=T}function At(T){Ve(T&255),Ve(T>>>8&255)}function gn(T){Ve(T>>8&255),Ve(T&255&255)}function Ee(T,R){let O;const I=R;ge>$r-I?(O=T,ue|=O<>>$r-ge,ge+=I-$r):(ue|=T<=8&&(Ve(ue&255),ue>>>=8,ge-=8)}function lc(){Ee(Jr<<1,3),Ue(yn,De.static_ltree),Es(),1+Se+10-ge<9&&(Ee(Jr<<1,3),Ue(yn,De.static_ltree),Es()),Se=7}function xn(T,R){let O,I,P;if(e.dist_buf[V]=T,e.lc_buf[V]=R&255,V++,T===0?N[R*2]++:(Z++,T--,N[(se._length_code[R]+ur+1)*2]++,Y[se.d_code(T)*2]++),(V&8191)===0&&A>2){for(O=V*8,I=g-m,P=0;P>>=3,Z8?At(ue):ge>0&&Ve(ue&255),ue=0,ge=0}function cc(T,R,O){Ts(),Se=8,O&&(At(R),At(~R)),e.pending_buf.set(l.subarray(T,T+R),e.pending),e.pending+=R}function As(T,R,O){Ee((Rc<<1)+(O?1:0),3),cc(T,R,!0)}function dc(T,R,O){let I,P,G=0;A>0?(q.build_tree(e),we.build_tree(e),G=wn(),I=e.opt_len+3+7>>>3,P=e.static_len+3+7>>>3,P<=I&&(I=P)):I=P=R+5,R+4<=I&&T!=-1?As(T,R,O):P==I?(Ee((Jr<<1)+(O?1:0),3),Ds(De.static_ltree,De.static_dtree)):(Ee((Mc<<1)+(O?1:0),3),oc(q.max_code+1,we.max_code+1,G+1),Ds(N,Y)),Tt(),O&&Ts()}function Ot(T){dc(m>=0?m:-1,g-m,T),m=g,t.flush_pending()}function qr(){let T,R,O,I;do{if(I=f-x-g,I===0&&g===0&&x===0)I=s;else if(I==-1)I--;else if(g>=s+s-Ye){l.set(l.subarray(s,s+s),0),y-=s,g-=s,m-=s,T=w,O=T;do R=u[--O]&65535,u[O]=R>=s?R-s:0;while(--T!==0);T=s,O=T;do R=d[--O]&65535,d[O]=R>=s?R-s:0;while(--T!==0);I+=s}if(t.avail_in===0)return;T=t.read_buf(l,g+x,I),x+=T,x>=ce&&(p=l[g]&255,p=(p<r-5&&(R=r-5);;){if(x<=1){if(qr(),x===0&&T==rn)return Ge;if(x===0)break}if(g+=x,x=0,O=m+R,(g===0||g>=O)&&(x=g-O,g=O,Ot(!1),t.avail_out===0)||g-m>=s-Ye&&(Ot(!1),t.avail_out===0))return Ge}return Ot(T==Le),t.avail_out===0?T==Le?bn:Ge:T==Le?Xn:Kn}function Os(T){let R=S,O=g,I,P,G=D;const K=g>s-Ye?g-(s-Ye):0;let Me=B;const Xe=o,zr=g+ar;let Rs=l[O+G-1],Ms=l[O+G];D>=F&&(R>>=2),Me>x&&(Me=x);do if(I=T,!(l[I+G]!=Ms||l[I+G-1]!=Rs||l[I]!=l[O]||l[++I]!=l[O+1])){O+=2,I++;do;while(l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&l[++O]==l[++I]&&OG){if(y=T,G=P,P>=Me)break;Rs=l[O+G-1],Ms=l[O+G]}}while((T=d[T&Xe]&65535)>K&&--R!==0);return G<=x?G:x}function uc(T){let R=0,O;for(;;){if(x=ce&&(p=(p<=ce)if(O=xn(g-y,_-ce),x-=_,_<=E&&x>=ce){_--;do g++,p=(p<=ce&&(p=(p<4096)&&(_=ce-1)),D>=ce&&_<=D){I=g+x-ce,O=xn(g-1-b,D-ce),x-=D-1,D-=2;do++g<=I&&(p=(p<Tc||I!=Xr||O<9||O>15||R<0||R>9||G<0||G>qn?et:(T.dstate=e,a=O,s=1<9||O<0||O>qn?et:(Je[A].func!=Je[R].func&&T.total_in!==0&&(I=T.deflate(Ns)),A!=R&&(A=R,E=Je[A].max_lazy,F=Je[A].good_length,B=Je[A].nice_length,S=Je[A].max_chain),U=O,I)},e.deflateSetDictionary=function(T,R,O){let I=O,P,G=0;if(!R||n!=Kr)return et;if(Is-Ye&&(I=s-Ye,G=O-I),l.set(R.subarray(G,G+I),0),g=I,m=I,p=l[0]&255,p=(p<Le||R<0)return et;if(!T.next_out||!T.next_in&&T.avail_in!==0||n==vn&&R!=Le)return T.msg=$n[zn-et],et;if(T.avail_out===0)return T.msg=$n[zn-Qt],Qt;if(t=T,G=i,i=R,n==Kr&&(I=Xr+(a-8<<4)<<8,P=(A-1&255)>>1,P>3&&(P=3),I|=P<<6,g!==0&&(I|=Oc),I+=31-I%31,n=Jn,gn(I)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,Qe}else if(t.avail_in===0&&R<=G&&R!=Le)return t.msg=$n[zn-Qt],Qt;if(n==vn&&t.avail_in!==0)return T.msg=$n[zn-Qt],Qt;if(t.avail_in!==0||x!==0||R!=rn&&n!=vn){switch(K=-1,Je[A].func){case Ha:K=fc(R);break;case sr:K=uc(R);break;case qt:K=hc(R);break}if((K==bn||K==Xn)&&(n=vn),K==Ge||K==bn)return t.avail_out===0&&(i=-1),Qe;if(K==Kn){if(R==Ns)lc();else if(As(0,0,!1),R==bc)for(O=0;On&&(i=n),i===0?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Fc(e){const t=this,n=new ja,r=Lc(e&&e.chunkSize?e.chunkSize:64*1024),i=rn,s=new Uint8Array(r);let a=e?e.level:hr;typeof a>"u"&&(a=hr),n.deflateInit(a),n.next_out=s,t.append=function(o,l){let f,d,u=0,p=0,w=0;const v=[];if(!!o.length){n.next_in_index=0,n.next_in=o,n.avail_in=o.length;do{if(n.next_out_index=0,n.avail_out=r,f=n.deflate(i),f!=Qe)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?v.push(new Uint8Array(s)):v.push(s.slice(0,n.next_out_index))),w+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=u&&(l(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return v.length>1?(d=new Uint8Array(w),v.forEach(function(h){d.set(h,p),p+=h.length})):d=v[0]||new Uint8Array,d}},t.flush=function(){let o,l,f=0,d=0;const u=[];do{if(n.next_out_index=0,n.avail_out=r,o=n.deflate(Le),o!=Wa&&o!=Qe)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&u.push(s.slice(0,n.next_out_index)),d+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),l=new Uint8Array(d),u.forEach(function(p){l.set(p,f),f+=p.length}),l}}function Lc(e){return e+5*(Math.floor(e/16383)+1)}const Cc=15,J=0,yt=1,Nc=2,Ne=-2,ae=-3,Ys=-4,bt=-5,We=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ba=1440,Pc=0,Uc=4,Yc=9,Wc=5,Hc=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],jc=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Bc=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Vc=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Gc=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Zc=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Rt=15;function _i(){const e=this;let t,n,r,i,s,a;function o(f,d,u,p,w,v,h,c,m,_,b){let k,g,y,x,D,S,E,A,U,F,B,N,Y,j,q;F=0,D=u;do r[f[d+F]]++,F++,D--;while(D!==0);if(r[0]==u)return h[0]=-1,c[0]=0,J;for(A=c[0],S=1;S<=Rt&&r[S]===0;S++);for(E=S,AD&&(A=D),c[0]=A,j=1<N+A;){if(x++,N+=A,q=y-N,q=q>A?A:q,(g=1<<(S=E-N))>k+1&&(g-=k+1,Y=E,SBa)return ae;s[x]=B=_[0],_[0]+=q,x!==0?(a[x]=D,i[0]=S,i[1]=A,S=D>>>N-A,i[2]=B-s[x-1]-S,m.set(i,(s[x-1]+S)*3)):h[0]=B}for(i[1]=E-N,F>=u?i[0]=128+64:b[F]>>N;S>>=1)D^=S;for(D^=S,U=(1<257?(_==ae?m.msg="oversubscribed distance tree":_==bt?(m.msg="incomplete distance tree",_=ae):_!=Ys&&(m.msg="empty distance tree with lengths",_=ae),_):J)}}_i.inflate_trees_fixed=function(e,t,n,r){return e[0]=Yc,t[0]=Wc,n[0]=Hc,r[0]=jc,J};const Qn=0,Ws=1,Hs=2,js=3,Bs=4,Vs=5,Gs=6,Qr=7,Zs=8,er=9;function qc(){const e=this;let t,n=0,r,i=0,s=0,a=0,o=0,l=0,f=0,d=0,u,p=0,w,v=0;function h(c,m,_,b,k,g,y,x){let D,S,E,A,U,F,B,N,Y,j,q,we,W,he,V,Z;B=x.next_in_index,N=x.avail_in,U=y.bitb,F=y.bitk,Y=y.write,j=Y>=S[Z+1],F-=S[Z+1],y.win[Y++]=S[Z+2],j--;continue}do{if(U>>=S[Z+1],F-=S[Z+1],(A&16)!==0){for(A&=15,W=S[Z+2]+(U&We[A]),U>>=A,F-=A;F<15;)N--,U|=(x.read_byte(B++)&255)<>=S[Z+1],F-=S[Z+1],(A&16)!==0){for(A&=15;F>=A,F-=A,j-=W,Y>=he)V=Y-he,Y-V>0&&2>Y-V?(y.win[Y++]=y.win[V++],y.win[Y++]=y.win[V++],W-=2):(y.win.set(y.win.subarray(V,V+2),Y),Y+=2,V+=2,W-=2);else{V=Y-he;do V+=y.end;while(V<0);if(A=y.end-V,W>A){if(W-=A,Y-V>0&&A>Y-V)do y.win[Y++]=y.win[V++];while(--A!==0);else y.win.set(y.win.subarray(V,V+A),Y),Y+=A,V+=A,A=0;V=0}}if(Y-V>0&&W>Y-V)do y.win[Y++]=y.win[V++];while(--W!==0);else y.win.set(y.win.subarray(V,V+W),Y),Y+=W,V+=W,W=0;break}else if((A&64)===0)D+=S[Z+2],D+=U&We[A],Z=(E+D)*3,A=S[Z];else return x.msg="invalid distance code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae;while(!0);break}if((A&64)===0){if(D+=S[Z+2],D+=U&We[A],Z=(E+D)*3,(A=S[Z])===0){U>>=S[Z+1],F-=S[Z+1],y.win[Y++]=S[Z+2],j--;break}}else return(A&32)!==0?(W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,yt):(x.msg="invalid literal/length code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae)}while(!0)}while(j>=258&&N>=10);return W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,J}e.init=function(c,m,_,b,k,g){t=Qn,f=c,d=m,u=_,p=b,w=k,v=g,r=null},e.proc=function(c,m,_){let b,k,g,y=0,x=0,D=0,S,E,A,U;for(D=m.next_in_index,S=m.avail_in,y=c.bitb,x=c.bitk,E=c.write,A=E=258&&S>=10&&(c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,_=h(f,d,u,p,w,v,c,m),D=m.next_in_index,S=m.avail_in,y=c.bitb,x=c.bitk,E=c.write,A=E>>=r[k+1],x-=r[k+1],g=r[k],g===0){a=r[k+2],t=Gs;break}if((g&16)!==0){o=g&15,n=r[k+2],t=Hs;break}if((g&64)===0){s=g,i=k/3+r[k+2];break}if((g&32)!==0){t=Qr;break}return t=er,m.msg="invalid literal/length code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,c.inflate_flush(m,_);case Hs:for(b=o;x>=b,x-=b,s=d,r=w,i=v,t=js;case js:for(b=s;x>=r[k+1],x-=r[k+1],g=r[k],(g&16)!==0){o=g&15,l=r[k+2],t=Bs;break}if((g&64)===0){s=g,i=k/3+r[k+2];break}return t=er,m.msg="invalid distance code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=S,m.total_in+=D-m.next_in_index,m.next_in_index=D,c.write=E,c.inflate_flush(m,_);case Bs:for(b=o;x>=b,x-=b,t=Vs;case Vs:for(U=E-l;U<0;)U+=c.end;for(;n!==0;){if(A===0&&(E==c.end&&c.read!==0&&(E=0,A=E7&&(x-=8,S++,D--),c.write=E,_=c.inflate_flush(m,_),E=c.write,A=Eh.avail_out&&(m=h.avail_out),m!==0&&c==bt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m,b==n.end&&(b=0,n.write==n.end&&(n.write=0),m=n.write-b,m>h.avail_out&&(m=h.avail_out),m!==0&&c==bt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m),h.next_out_index=_,n.read=b,c},n.proc=function(h,c){let m,_,b,k,g,y,x,D;for(k=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y>>1){case 0:_>>>=3,b-=3,m=b&7,_>>>=m,b-=m,r=ei;break;case 1:S=[],E=[],A=[[]],U=[[]],_i.inflate_trees_fixed(S,E,A,U),d.init(S[0],E[0],A[0],0,U[0],0),_>>>=3,b-=3,r=tr;break;case 2:_>>>=3,b-=3,r=$s;break;case 3:return _>>>=3,b-=3,r=Vt,h.msg="invalid block type",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c)}break;case ei:for(;b<32;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<>>16&65535)!=(_&65535))return r=Vt,h.msg="invalid stored block lengths",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);i=_&65535,_=b=0,r=i!==0?zs:u!==0?nr:en;break;case zs:if(g===0||x===0&&(y==n.end&&n.read!==0&&(y=0,x=yg&&(m=g),m>x&&(m=x),n.win.set(h.read_buf(k,m),y),k+=m,g-=m,y+=m,x-=m,(i-=m)!==0)break;r=u!==0?nr:en;break;case $s:for(;b<14;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<29||(m>>5&31)>29)return r=Vt,h.msg="too many length or distance symbols",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);if(m=258+(m&31)+(m>>5&31),!o||o.length>>=14,b-=14,a=0,r=Ks;case Ks:for(;a<4+(s>>>10);){for(;b<3;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(k++)&255)<>>=3,b-=3}for(;a<19;)o[qs[a++]]=0;if(l[0]=7,m=v.inflate_trees_bits(o,l,f,p,h),m!=J)return c=m,c==ae&&(o=null,r=Vt),n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);a=0,r=Xs;case Xs:for(;m=s,!(a>=258+(m&31)+(m>>5&31));){let j,q;for(m=l[0];b>>=m,b-=m,o[a++]=q;else{for(D=q==18?7:q-14,j=q==18?11:3;b>>=m,b-=m,j+=_&We[D],_>>>=D,b-=D,D=a,m=s,D+j>258+(m&31)+(m>>5&31)||q==16&&D<1)return o=null,r=Vt,h.msg="invalid bit length repeat",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);q=q==16?o[D-1]:0;do o[D++]=q;while(--j!==0);a=D}}if(f[0]=-1,F=[],B=[],N=[],Y=[],F[0]=9,B[0]=6,m=s,m=v.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),o,F,B,N,Y,p,h),m!=J)return m==ae&&(o=null,r=Vt),c=m,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,n.inflate_flush(h,c);d.init(F[0],B[0],p,N[0],p,Y[0]),r=tr;case tr:if(n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=k-h.next_in_index,h.next_in_index=k,n.write=y,(c=d.proc(n,h,c))!=yt)return n.inflate_flush(h,c);if(c=J,d.free(h),k=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y15?(e.inflateEnd(n),Ne):(e.wbits=r,n.istate.blocks=new zc(n,1<>4)+8>a.wbits){a.mode=Mt,n.msg="invalid win size",a.marker=5;break}a.mode=Qs;case Qs:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,s=n.read_byte(n.next_in_index++)&255,((a.method<<8)+s)%31!==0){a.mode=Mt,n.msg="incorrect header check",a.marker=5;break}if((s&$c)===0){a.mode=kn;break}a.mode=ea;case ea:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,a.mode=ta;case ta:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,a.mode=na;case na:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,a.mode=ra;case ra:return n.avail_in===0?i:(i=r,n.avail_in--,n.total_in++,a.need+=n.read_byte(n.next_in_index++)&255,a.mode=ti,Nc);case ti:return a.mode=Mt,n.msg="need dictionary",a.marker=0,Ne;case kn:if(i=a.blocks.proc(n,i),i==ae){a.mode=Mt,a.marker=0;break}if(i==J&&(i=r),i!=yt)return i;i=r,a.blocks.reset(n,a.was),a.mode=ia;case ia:return n.avail_in=0,yt;case Mt:return ae;default:return Ne}},e.inflateSetDictionary=function(n,r,i){let s=0,a=i;if(!n||!n.istate||n.istate.mode!=ti)return Ne;const o=n.istate;return a>=1<0&&n.next_in_index!=p&&(l(n.next_in_index),p=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return f.length>1?(u=new Uint8Array(v),f.forEach(function(h){u.set(h,w),w+=h.length})):u=f[0]||new Uint8Array,u}},t.flush=function(){n.inflateEnd()}}const pe=4294967295,ke=65535,wi=8,Ga=0,Za=99,qa=67324752,ji=134695760,td=ji,gi=33639248,za=101010256,xi=101075792,$a=117853008,an=22,An=20,On=56,nd=an+An+On,Ka=1,Xa=39169,Ja=10,Qa=1,Bi=21589,rd=28789,id=25461,yi=1,sd=6,bi=8,vi=2048,ki=16,ad=20,sa=45,aa=51,or="/",oa=new Date(2107,11,31),la=new Date(1980,0,1),fe=void 0,mr="undefined",eo="function";class ca{constructor(t){return class extends TransformStream{constructor(n,r){const i=new t(r);super({transform(s,a){a.enqueue(i.append(s))},flush(s){const a=i.flush();a&&s.enqueue(a)}})}}}}const od=64;let to=2;try{typeof navigator!=mr&&navigator.hardwareConcurrency&&(to=navigator.hardwareConcurrency)}catch{}const ld={chunkSize:512*1024,maxWorkers:to,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:fe,CompressionStreamNative:typeof CompressionStream!=mr&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=mr&&DecompressionStream},Lt=Object.assign({},ld);function Vi(){return Lt}function no(e){return Math.max(e.chunkSize,od)}function Gi(e){const{baseURL:t,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:i,useCompressionStream:s,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:f,DecompressionStream:d,workerScripts:u}=e;if(It("baseURL",t),It("chunkSize",n),It("maxWorkers",r),It("terminateWorkerTimeout",i),It("useCompressionStream",s),It("useWebWorkers",a),o&&(Lt.CompressionStream=new ca(o)),l&&(Lt.DecompressionStream=new ca(l)),It("CompressionStream",f),It("DecompressionStream",d),u!==fe){const{deflate:p,inflate:w}=u;if((p||w)&&(Lt.workerScripts||(Lt.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");Lt.workerScripts.deflate=p}if(w){if(!Array.isArray(w))throw new Error("workerScripts.inflate must be an array");Lt.workerScripts.inflate=w}}}function It(e,t){t!==fe&&(Lt[e]=t)}const Sn={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin",cap:["cap","pcap"],"cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",javascript:"js",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":"odm","vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-debian-package":["deb","udeb"],"x-director":["dcr","dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-koan":["skp","skd","skt","skm"],"x-kpresenter":["kpr","kpt"],"x-kword":["kwd","kwt"],"x-latex":"latex","x-lha":"lha","x-lyx":"lyx","x-lzh":"lzh","x-lzx":"lzx","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-ms-wmd":"wmd","x-ms-wmz":"wmz","x-msdos-program":["com","exe","bat","dll"],"x-msi":"msi","x-netcdf":["nc","cdf"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":"rpm","x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tcl":"tcl","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-troff":["t","tr","roff"],"x-troff-man":"man","x-troff-me":"me","x-troff-ms":"ms","x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix",json:"json","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":"mathml",mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","x-msdownload":["exe","dll","com","bat","msi"],"x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tads":"gam","x-tex":"tex","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-compressed":"tgz","x-gzip":"gz","x-perfmon":["pma","pmc","pml","pmr","pmw"],"x-pkcs7-mime":["p7c","p7m"],"ynd.ms-pkipko":"pko"},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":["aif","aiff","aifc"],"x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2","x-wav":"wav",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":["mmd","mmod"],"x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":["sd","sdf"],"x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","mpc","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":["val","aso"],"x-pdb":["pdb","ent"],"x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-photoshop":"psd","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",pipeg:"jfif"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":["x3d","x3dz"],"x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:["tm","ts"],"tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{avif:".avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","vrml","wrl","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const t in Sn)if(Sn.hasOwnProperty(t)){for(const n in Sn[t])if(Sn[t].hasOwnProperty(n)){const r=Sn[t][n];if(typeof r=="string")e[r]=t+"/"+n;else for(let i=0;i>>1^3988292384:t=t>>>1;ro[e]=t}class pr{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let r=0,i=t.length|0;r>>8^ro[(n^t[r])&255];this.crc=n}get(){return~this.crc}}class io extends TransformStream{constructor(){const t=new pr;super({transform(n){t.append(n)},flush(n){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t.get()),n.enqueue(r)}})}}function Si(e){if(typeof TextEncoder>"u"){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n0&&t&&(e[n-1]=Fe.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let a=0;a>>t),n=e[a]<<32-t;const i=e.length?e[e.length-1]:0,s=Fe.getPartial(i);return r.push(Fe.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},_r={bytes:{fromBits(e){const n=Fe.bitLength(e)/8,r=new Uint8Array(n);let i;for(let s=0;s>>24,i<<=8;return r},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let o=t.blockSize+r-(t.blockSize+r&t.blockSize-1);o<=i;o+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=Fe.concat(t,[Fe.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r},_S(e,t){return t<>>32-e},_block(e){const t=this,n=t._h,r=Array(80);for(let f=0;f<16;f++)r[f]=e[f];let i=n[0],s=n[1],a=n[2],o=n[3],l=n[4];for(let f=0;f<=79;f++){f>=16&&(r[f]=t._S(1,r[f-3]^r[f-8]^r[f-14]^r[f-16]));const d=t._S(5,i)+t._f(f,s,a,o)+l+r[f]+t._key[Math.floor(f/20)]|0;l=o,o=a,a=t._S(30,s),s=i,i=d}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+l|0}};const so={};so.aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,o,l=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;s<4*i+28;s++){let f=a[s-1];(s%i===0||i===8&&s%i===4)&&(f=n[f>>>24]<<24^n[f>>16&255]<<16^n[f>>8&255]<<8^n[f&255],s%i===0&&(f=f<<8^f>>>24^l<<24,l=l<<1^(l>>7)*283)),a[s]=a[s-i]^f}for(let f=0;s;f++,s--){const d=a[f&3?s:s-4];s<=4||f<4?o[f]=d:o[f]=r[0][n[d>>>24]]^r[1][n[d>>16&255]]^r[2][n[d>>8&255]]^r[3][n[d&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,o,l,f;for(let d=0;d<256;d++)s[(i[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let u=a^a<<1^a<<2^a<<3^a<<4;u=u>>8^u&255^99,n[d]=u,r[u]=d,f=i[l=i[o=i[d]]];let p=f*16843009^l*65537^o*257^d*16843008,w=i[u]*257^u*16843008;for(let v=0;v<4;v++)e[v][d]=w=w<<24^w>>>8,t[v][u]=p=p<<24^p>>>8}for(let d=0;d<5;d++)e[d]=e[d].slice(0),t[d]=t[d].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],l=s[2],f=s[3],d=s[4];let u=e[0]^n[0],p=e[t?3:1]^n[1],w=e[2]^n[2],v=e[t?1:3]^n[3],h=4,c,m,_;for(let b=0;b>>24]^o[p>>16&255]^l[w>>8&255]^f[v&255]^n[h],m=a[p>>>24]^o[w>>16&255]^l[v>>8&255]^f[u&255]^n[h+1],_=a[w>>>24]^o[v>>16&255]^l[u>>8&255]^f[p&255]^n[h+2],v=a[v>>>24]^o[u>>16&255]^l[p>>8&255]^f[w&255]^n[h+3],h+=4,u=c,p=m,w=_;for(let b=0;b<4;b++)i[t?3&-b:b]=d[u>>>24]<<24^d[p>>16&255]<<16^d[w>>8&255]<<8^d[v&255]^n[h++],c=u,u=p,p=w,w=v,v=c;return i}};const cd={getRandomValues(e){const t=new Uint32Array(e.buffer),n=r=>{let i=987654321;const s=4294967295;return function(){return i=36969*(i&65535)+(i>>16)&s,r=18e3*(r&65535)+(r>>16)&s,(((i<<16)+r&s)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r>24&255)===255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=Fe.bitLength(t);for(let s=0;s>5)+1<<2;let s,a,o,l,f;const d=new ArrayBuffer(i),u=new DataView(d);let p=0;const w=Fe;for(t=_r.bytes.toBits(t),f=1;p<(i||1);f++){for(s=a=e.encrypt(w.concat(t,[f])),o=1;oi&&(e=n.hash(e));for(let s=0;sthis.resolveReady=i),password:t,signed:n,strength:r-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;o?(await Sd(a,l,o,qe(i,0,Fn[l]+2)),i=qe(i,Fn[l]+2),f()):await d;const u=new Uint8Array(i.length-Ft-(i.length-Ft)%on);s.enqueue(_o(a,i,u,0,Ft,!0))},async flush(i){const{signed:s,ctr:a,hmac:o,pending:l,ready:f}=this;await f;const d=qe(l,0,l.length-Ft),u=qe(l,l.length-Ft);let p=new Uint8Array;if(d.length){const w=Cn(lt,d);o.update(w);const v=a.update(w);p=Ln(lt,v)}if(s){const w=qe(Ln(lt,o.digest()),0,Ft);for(let v=0;vthis.resolveReady=i),password:t,strength:n-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:o,strength:l,resolveReady:f,ready:d}=a;let u=new Uint8Array;o?(u=await Ed(a,l,o),f()):await d;const p=new Uint8Array(u.length+i.length-i.length%on);p.set(u,0),s.enqueue(_o(a,i,p,u.length,0))},async flush(i){const{ctr:s,hmac:a,pending:o,ready:l}=this;await l;let f=new Uint8Array;if(o.length){const d=s.update(Cn(lt,o));a.update(d),f=Ln(lt,d)}r.signature=Ln(lt,a.digest()).slice(0,Ft),i.enqueue(qi(f,r.signature))}}),r=this}}function _o(e,t,n,r,i,s){const{ctr:a,hmac:o,pending:l}=e,f=t.length-i;l.length&&(t=qi(l,t),n=Ad(n,f-f%on));let d;for(d=0;d<=f-on;d+=on){const u=Cn(lt,qe(t,d,d+on));s&&o.update(u);const p=a.update(u);s||o.update(p),n.set(Ln(lt,p),d+r)}return e.pending=qe(t,d),n}async function Sd(e,t,n,r){const i=await wo(e,t,n,qe(r,0,Fn[t])),s=qe(r,Fn[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new Error(oo)}async function Ed(e,t,n){const r=co(new Uint8Array(Fn[t])),i=await wo(e,t,n,r);return qi(r,i)}async function wo(e,t,n,r){e.password=null;const i=Si(n),s=await Dd(fd,i,md,!1,pd),a=await Td(Object.assign({salt:r},uo),s,8*(En[t]*2+2)),o=new Uint8Array(a),l=Cn(lt,qe(o,0,En[t])),f=Cn(lt,qe(o,En[t],En[t]*2)),d=qe(o,En[t]*2);return Object.assign(e,{keys:{key:l,authentication:f,passwordVerification:d},ctr:new yd(new xd(l),Array.from(_d)),hmac:new bd(f)}),d}function Dd(e,t,n,r,i){return wd?Wn.importKey(e,t,n,r,i):Yn.importKey(t)}async function Td(e,t,n){return gd?await Wn.deriveBits(e,t,n):Yn.pbkdf2(t,e.salt,uo.iterations,n)}function qi(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Ad(e,t){if(t&&t>e.length){const n=e;e=new Uint8Array(t),e.set(n,0)}return e}function qe(e,t,n){return e.subarray(t,n)}function Ln(e,t){return e.fromBits(t)}function Cn(e,t){return e.toBits(t)}const cn=12;class Od extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),go(this,t)},transform(r,i){const s=this;if(s.password){const a=da(s,r.subarray(0,cn));if(s.password=null,a[cn-1]!=s.passwordVerification)throw new Error(oo);r=r.subarray(cn)}i.enqueue(da(s,r))}})}}class Rd extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),go(this,t)},transform(r,i){const s=this;let a,o;if(s.password){s.password=null;const l=co(new Uint8Array(cn));l[cn-1]=s.passwordVerification,a=new Uint8Array(r.length+l.length),a.set(fa(s,l),0),o=cn}else a=new Uint8Array(r.length),o=0;a.set(fa(s,r),o),i.enqueue(a)}})}}function da(e,t){const n=new Uint8Array(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function xo(e){const t=e.keys[2]|2;return yo(Math.imul(t,t^1)>>>8)}function yo(e){return e&255}function ua(e){return e&4294967295}const ha="deflate-raw";class Md extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:r,CompressionStreamNative:i}){super({});const{compressed:s,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:f,level:d}=t,u=this;let p,w,v=bo(super.readable);(!a||l)&&f&&([v,p]=v.tee(),p=ct(p,new io)),s&&(v=ko(v,o,{level:d,chunkSize:n},i,r)),a&&(l?v=ct(v,new Rd(t)):(w=new kd(t),v=ct(v,w))),vo(u,v,async()=>{let h;a&&!l&&(h=w.signature),(!a||l)&&f&&(h=await p.getReader().read(),h=new DataView(h.value.buffer).getUint32(0)),u.signature=h})}}class Id extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:r,DecompressionStreamNative:i}){super({});const{zipCrypto:s,encrypted:a,signed:o,signature:l,compressed:f,useCompressionStream:d}=t;let u,p,w=bo(super.readable);a&&(s?w=ct(w,new Od(t)):(p=new vd(t),w=ct(w,p))),f&&(w=ko(w,d,{chunkSize:n},i,r)),(!a||s)&&o&&([w,u]=w.tee(),u=ct(u,new io)),vo(this,w,async()=>{if((!a||s)&&o){const v=await u.getReader().read(),h=new DataView(v.value.buffer);if(l!=h.getUint32(0,!1))throw new Error(lo)}})}}function bo(e){return ct(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function vo(e,t,n){t=ct(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function ko(e,t,n,r,i){try{const s=t&&r?r:i;e=ct(e,new s(ha,n))}catch(s){if(t)e=ct(e,new i(ha,n));else throw s}return e}function ct(e,t){return e.pipeThrough(t)}const Fd="message",Ld="start",Cd="pull",ma="data",Nd="ack",Pd="close",So="deflate",Eo="inflate";class Ud extends TransformStream{constructor(t,n){super({});const r=this,{codecType:i}=t;let s;i.startsWith(So)?s=Md:i.startsWith(Eo)&&(s=Id);let a=0;const o=new s(t,n),l=super.readable,f=new TransformStream({transform(d,u){d&&d.length&&(a+=d.length,u.enqueue(d))},flush(){const{signature:d}=o;Object.assign(r,{signature:d,size:a})}});Object.defineProperty(r,"readable",{get(){return l.pipeThrough(o).pipeThrough(f)}})}}const Yd=typeof Worker!=mr;class ni{constructor(t,{readable:n,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:f},d){const{signal:u}=a;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new Wd(n,a,s),{signal:u}),writable:r,options:Object.assign({},i),scripts:f,transferStreams:l,terminate(){const{worker:p,busy:w}=t;p&&!w&&(p.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,d(t)}}),(o&&Yd?jd:Hd)(t,s)}}class Wd extends TransformStream{constructor(t,{onstart:n,onprogress:r,size:i,onend:s},{chunkSize:a}){let o=0;super({start(){n&&ri(n,i)},async transform(l,f){o+=l.length,r&&await ri(r,o,i),f.enqueue(l)},flush(){t.size=o,s&&ri(s,o)}},{highWaterMark:1,size:()=>a})}}async function ri(e,...t){try{await e(...t)}catch{}}function Hd(e,t){return{run:()=>Bd(e,t)}}function jd(e,{baseURL:t,chunkSize:n}){return e.interface||Object.assign(e,{worker:Zd(e.scripts[0],t,e),interface:{run:()=>Vd(e,{chunkSize:n})}}),e.interface}async function Bd({options:e,readable:t,writable:n,onTaskFinished:r},i){const s=new Ud(e,i);try{await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,size:o}=s;return{signature:a,size:o}}finally{r()}}async function Vd(e,t){let n,r;const i=new Promise((p,w)=>{n=p,r=w});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});const{readable:s,options:a,scripts:o}=e,{writable:l,closed:f}=Gd(e.writable);Ei({type:Ld,scripts:o.slice(1),options:a,config:t,readable:s,writable:l},e)||Object.assign(e,{reader:s.getReader(),writer:l.getWriter()});const u=await i;try{await l.close()}catch{}return await f,u}function Gd(e){const t=e.getWriter();let n;const r=new Promise(s=>n=s);return{writable:new WritableStream({async write(s){await t.ready,await t.write(s)},close(){t.releaseLock(),n()},abort(s){return t.abort(s)}}),closed:r}}let pa=!0,_a=!0;function Zd(e,t,n){const r={type:"module"};let i,s;typeof e==eo&&(e=e());try{i=new URL(e,t)}catch{i=e}if(pa)try{s=new Worker(i)}catch{pa=!1,s=new Worker(i,r)}else s=new Worker(i,r);return s.addEventListener(Fd,a=>qd(a,n)),s}function Ei(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:s,readable:a,writable:o}=e;const l=[];if(s){const{buffer:f,length:d}=s;d!=f.byteLength&&(s=new Uint8Array(s)),e.value=s.buffer,l.push(e.value)}if(i&&_a?(a&&l.push(a),o&&l.push(o)):e.readable=e.writable=null,l.length)try{return t.postMessage(e,l),!0}catch{_a=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(s){throw n&&n.releaseLock(),r(),s}}async function qd({data:e},t){const{type:n,value:r,messageId:i,result:s,error:a}=e,{reader:o,writer:l,resolveResult:f,rejectResult:d,onTaskFinished:u}=t;try{if(a){const{message:w,stack:v,code:h,name:c}=a,m=new Error(w);Object.assign(m,{stack:v,code:h,name:c}),p(m)}else{if(n==Cd){const{value:w,done:v}=await o.read();Ei({type:ma,value:w,done:v,messageId:i},t)}n==ma&&(await l.ready,await l.write(new Uint8Array(r)),Ei({type:Nd,messageId:i},t)),n==Pd&&p(null,s)}}catch(w){p(w)}function p(w,v){w?d(w):f(v),l&&l.releaseLock(),u()}}let Gt=[];const ii=[];let wa=0;async function Do(e,t){const{options:n,config:r}=t,{transferStreams:i,useWebWorkers:s,useCompressionStream:a,codecType:o,compressed:l,signed:f,encrypted:d}=n,{workerScripts:u,maxWorkers:p,terminateWorkerTimeout:w}=r;t.transferStreams=i||i===fe;const v=!l&&!f&&!d&&!t.transferStreams;t.useWebWorkers=!v&&(s||s===fe&&r.useWebWorkers),t.scripts=t.useWebWorkers&&u?u[o]:[],n.useCompressionStream=a||a===fe&&r.useCompressionStream;let h;const c=Gt.find(_=>!_.busy);if(c)ga(c),h=new ni(c,e,t,m);else if(Gt.lengthii.push({resolve:_,stream:e,workerOptions:t}));return h.run();function m(_){if(ii.length){const[{resolve:b,stream:k,workerOptions:g}]=ii.splice(0,1);b(new ni(_,k,g,m))}else _.worker?(ga(_),Number.isFinite(w)&&w>=0&&(_.terminateTimeout=setTimeout(()=>{Gt=Gt.filter(b=>b!=_),_.terminate()},w))):Gt=Gt.filter(b=>b!=_)}}function ga(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function zd(e){const t=()=>URL.createObjectURL(new Blob([`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:"PBKDF2"},B=t.assign({hash:{name:"HMAC"}},R),E=t.assign({iterations:1e3,hash:{name:"SHA-1"}},R),M=["deriveBits"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&"function"==typeof T.importKey,L=N&&W&&"function"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s("Invalid password")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s("Invalid signature")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey("raw",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s("Invalid password");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s("Invalid signature")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)("deflate-raw",n))}catch(r){if(!t)throw r;e=pe(e,new s("deflate-raw",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=le:s.startsWith("inflate")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:"pull",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:"data",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:"close",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&ke(e),"data"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe="oversubscribed dynamic bit lengths tree":-5!=a&&0!==r[0]||(f.Oe="incomplete dynamic bit lengths tree",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe="oversubscribed literal/length tree":-4!=h&&(w.Oe="incomplete literal/length tree",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe="oversubscribed distance tree":-5==h?(w.Oe="incomplete distance tree",h=-3):-4!=h&&(w.Oe="empty distance tree with lengths",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe="invalid distance code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe="invalid literal/length code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe="invalid literal/length code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe="invalid distance code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe="invalid block type",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe="invalid stored block lengths",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe="too many length or distance symbols",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe="invalid bit length repeat",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe="need dictionary",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye}; -`],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}const To="HTTP error ",Rr="HTTP Range not supported",$d="Writer iterator completed too soon",Kd="text/plain",Xd="Content-Length",Jd="Content-Range",Qd="Accept-Ranges",ef="Range",tf="Content-Type",nf="HEAD",$i="GET",Ao="bytes",rf=64*1024,Ki="writable";class Mr{constructor(){this.size=0}init(){this.initialized=!0}}class Wt extends Mr{get readable(){const t=this,{chunkSize:n=rf}=t,r=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:s=0,size:a,diskNumberStart:o}=r,{chunkOffset:l}=this;i.enqueue(await Ie(t,s+l,Math.min(n,a-l),o)),l+n>a?i.close():this.chunkOffset+=n}});return r}}class Oo extends Mr{constructor(){super();const t=this,n=new WritableStream({write(r){return t.writeUint8Array(r)}});Object.defineProperty(t,Ki,{get(){return n}})}writeUint8Array(){}}class Di extends Wt{constructor(t){super();let n=t.length;for(;t.charAt(n-1)=="=";)n--;const r=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:r,size:Math.floor((n-r)*.75)})}readUint8Array(t,n){const{dataStart:r,dataURI:i}=this,s=new Uint8Array(n),a=Math.floor(t/3)*4,o=atob(i.substring(a+r,Math.ceil((t+n)/3)*4+r)),l=t-Math.floor(a/4)*3;for(let f=l;f2?n.data+=btoa(i):n.pending=i}getData(){return this.data+btoa(this.pending)}}class mn extends Wt{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){const r=this;return new Uint8Array(await r.blob.slice(t,t+n).arrayBuffer())}}class Kt extends Mr{constructor(t){super();const n=this,r=new TransformStream,i=[];t&&i.push([tf,t]),Object.defineProperty(n,Ki,{get(){return r.writable}}),n.blob=new Response(r.readable,{headers:i}).blob()}getData(){return this.blob}}class Ro extends mn{constructor(t){super(new Blob([t],{type:Kd}))}}class Ti extends Kt{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:n}=this,r=await super.getData();if(r.text&&n)return r.text();{const i=new FileReader;return new Promise((s,a)=>{Object.assign(i,{onload:({target:o})=>s(o.result),onerror:()=>a(i.error)}),i.readAsText(r,t)})}}}class sf extends Wt{constructor(t,n){super(),Mo(this,t,n)}async init(){super.init(),await Io(this,Ai,xa)}readUint8Array(t,n){return Fo(this,t,n,Ai,xa)}}class af extends Wt{constructor(t,n){super(),Mo(this,t,n)}async init(){super.init(),await Io(this,Oi,ya)}readUint8Array(t,n){return Fo(this,t,n,Oi,ya)}}function Mo(e,t,n){const{preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s}=n;n=Object.assign({},n),delete n.preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.useXHR,Object.assign(e,{url:t,options:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s})}async function Io(e,t,n){const{url:r,useRangeHeader:i,forceRangeRequests:s}=e;if(lf(r)&&(i||s)){const{headers:a}=await t($i,e,Lo(e));if(!s&&a.get(Qd)!=Ao)throw new Error(Rr);{let o;const l=a.get(Jd);if(l){const f=l.trim().split(/\s*\/\s*/);if(f.length){const d=f[1];d&&d!="*"&&(o=Number(d))}}o===fe?await ba(e,t,n):e.size=o}}else await ba(e,t,n)}async function Fo(e,t,n,r,i){const{data:s,useRangeHeader:a,forceRangeRequests:o,options:l}=e;if(a||o){const f=await r($i,e,Lo(e,t,n));if(f.status!=206)throw new Error(Rr);return new Uint8Array(await f.arrayBuffer())}else return s||await i(e,l),new Uint8Array(s.subarray(t,t+n))}function Lo(e,t=0,n=1){return Object.assign({},Xi(e),{[ef]:Ao+"="+t+"-"+(t+n-1)})}function Xi({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function xa(e){await Co(e,Ai)}async function ya(e){await Co(e,Oi)}async function Co(e,t){const n=await t($i,e,Xi(e));e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function ba(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t(nf,e,Xi(e))).headers.get(Xd);i?e.size=Number(i):await n(e,e.options)}}async function Ai(e,{options:t,url:n},r){const i=await fetch(n,Object.assign({},t,{method:e,headers:r}));if(i.status<400)return i;throw i.status==416?new Error(Rr):new Error(To+(i.statusText||i.status))}function Oi(e,{url:t},n){return new Promise((r,i)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",()=>{if(s.status<400){const a=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(o=>{const l=o.trim().split(/\s*:\s*/);l[0]=l[0].trim().replace(/^[a-z]|-[a-z]/g,f=>f.toUpperCase()),a.push(l)}),r({status:s.status,arrayBuffer:()=>s.response,headers:new Map(a)})}else i(s.status==416?new Error(Rr):new Error(To+(s.statusText||s.status)))},!1),s.addEventListener("error",a=>i(a.detail.error),!1),s.open(e,t),n)for(const a of Object.entries(n))s.setRequestHeader(a[0],a[1]);s.responseType="arraybuffer",s.send()})}class va extends Wt{constructor(t,n={}){super(),Object.assign(this,{url:t,reader:n.useXHR?new af(t,n):new sf(t,n)})}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(t,n){return this.reader.readUint8Array(t,n)}}class Ri extends Wt{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,n){return this.array.slice(t,t+n)}}class gr extends Oo{init(t=0){super.init(),Object.assign(this,{offset:0,array:new Uint8Array(t)})}writeUint8Array(t){const n=this;if(n.offset+t.length>n.array.length){const r=n.array;n.array=new Uint8Array(r.length+t.length),n.array.set(r)}n.array.set(t,n.offset),n.offset+=t.length}getData(){return this.array}}class of extends Wt{constructor(t){super(),this.readers=t}async init(){super.init();const t=this,{readers:n}=t;t.lastDiskNumber=0,await Promise.all(n.map(async r=>{await r.init(),t.size+=r.size}))}async readUint8Array(t,n,r=0){const i=this,{readers:s}=this;let a,o=r;o==-1&&(o=s.length-1);let l=t;for(;l>=s[o].size;)l-=s[o].size,o++;const f=s[o],d=f.size;if(l+n<=d)a=await Ie(f,l,n);else{const u=d-l;a=new Uint8Array(n),a.set(await Ie(f,l,u)),a.set(await i.readUint8Array(t+u,n-u,r),u)}return i.lastDiskNumber=Math.max(o,i.lastDiskNumber),a}}class ka extends Mr{constructor(t,n=4294967296){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,availableSize:n});let i,s,a;const o=new WritableStream({async write(d){if(a)if(i.size+d.length>=n){const u=n-i.size;await l(d.slice(0,u)),await f(),r.diskOffset+=i.size,r.diskNumber++,a=null,await this.write(d.slice(u))}else d.length&&await l(d),r.availableSize=n-i.size;else{const{value:u,done:p}=await t.next();if(p&&!u)throw new Error($d);i=u,i.size=0,s=u.writable,a=s.getWriter(),await this.write(d)}},async close(){await a.ready,await f()}});Object.defineProperty(r,Ki,{get(){return o}});async function l(d){await a.ready,await a.write(d),i.size+=d.length,r.size+=d.length}async function f(){s.size=i.size,await a.close()}}}function lf(e){const{baseURL:t}=Vi(),{protocol:n}=new URL(e,t);return n=="http:"||n=="https:"}async function ze(e,t){e.init&&!e.initialized&&await e.init(t)}function Ie(e,t,n,r){return e.readUint8Array(t,n,r)}const No="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),cf=No.length==256;function df(e){if(cf){let t="";for(let n=0;nthis[n]=t[n])}}const si="File format is not recognized",mf="End of central directory not found",pf="End of Zip64 central directory not found",_f="End of Zip64 central directory locator not found",wf="Central directory header not found",gf="Local file header not found",xf="Zip64 extra field not found",yf="File contains encrypted entry",bf="Encryption method not supported",Sa="Compression method not supported",Ea="Split zip file",Da="utf-8",Ta="cp437",vf=[[Ho,pe],[jo,pe],[Bo,pe],[Ii,ke]],kf={[ke]:{getValue:_e,bytes:4},[pe]:{getValue:lr,bytes:8}};class Sf{constructor(t,n={}){t instanceof ReadableStream&&(t={readable:t}),Object.assign(this,{reader:t,options:n,config:Vi()})}async*getEntriesGenerator(t={}){const n=this;let{reader:r}=n;const{config:i}=n;if(await ze(r),(r.size===fe||!r.readUint8Array)&&(Array.isArray(r)?r=new of(r):r=new mn(await new Response(r.readable).blob()),await ze(r)),r.size=r.size)throw new Error(si);let _=0,b=await Ie(r,l,o,v),k=Te(b);if(o){const S=s.offset-o;if(_e(k,_)!=gi&&l!=S){const E=l;l=S,c=l-E,b=await Ie(r,l,o,v),k=Te(b)}}if(l<0||l>=r.size)throw new Error(si);const g=tt(n,t,"filenameEncoding"),y=tt(n,t,"commentEncoding");for(let S=0;SE.getData(mt,Ht,jt),_=we;const{onprogress:Tt}=t;if(Tt)try{await Tt(S+1,h,new xr(E))}catch{}yield Ht}const x=tt(n,t,"extractPrependedData"),D=tt(n,t,"extractAppendedData");return x&&(n.prependedData=m>0?await Ie(r,0,m):new Uint8Array),n.comment=d?await Ie(r,f+an,d):new Uint8Array,D&&(n.appendedData=u>>8&255:p>>>24&255),signature:p,compressed:f!=0,encrypted:k,useWebWorkers:tt(i,r,"useWebWorkers"),useCompressionStream:tt(i,r,"useCompressionStream"),transferStreams:tt(i,r,"transferStreams")},config:d,streamOptions:{signal:E,size:D,onstart:A,onprogress:U,onend:F}};return S.size+=(await Do({readable:x,writable:S},B)).size,tt(i,r,"preventClose")||await S.close(),t.getData?t.getData():S}}function $o(e,t,n){const r=e.rawBitFlag=be(t,n+2),i=(r&yi)==yi,s=_e(t,n+6);Object.assign(e,{encrypted:i,version:be(t,n),bitFlag:{level:(r&sd)>>1,dataDescriptor:(r&bi)==bi,languageEncodingFlag:(r&vi)==vi},rawLastModDate:s,lastModDate:Mf(s),filenameLength:be(t,n+22),extraFieldLength:be(t,n+24)})}async function Ko(e,t,n,r){const{rawExtraField:i}=t,s=t.extraField=new Map,a=Te(new Uint8Array(i));let o=0;try{for(;ot[i]==s);for(let i=0,s=0;i{if(e.data.length>=a+4){const f=_e(n,a);t[o]=e[o]=new Date(f*1e3);const d=s[l];e[d]=f}a+=4})}async function Rf(e,t,n,r,i){const s=new Uint8Array(4),a=Te(s);If(a,0,t);const o=r+i;return await l(r)||await l(Math.min(o,n));async function l(f){const d=n-f,u=await Ie(e,d,f);for(let p=u.length-r;p>=0;p--)if(u[p]==s[0]&&u[p+1]==s[1]&&u[p+2]==s[2]&&u[p+3]==s[3])return{offset:d+p,buffer:u.slice(p,p+r).buffer}}}function tt(e,t,n){return t[n]===fe?e.options[n]:t[n]}function Mf(e){const t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function ai(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function dn(e,t){return e.getUint8(t)}function be(e,t){return e.getUint16(t,!0)}function _e(e,t){return e.getUint32(t,!0)}function lr(e,t){return Number(e.getBigUint64(t,!0))}function If(e,t,n){e.setUint32(t,n,!0)}function Te(e){return new DataView(e.buffer)}const Ff="File already exists",Lf="Zip file comment exceeds 64KB",Cf="File entry comment exceeds 64KB",Nf="File entry name exceeds 64KB",Oa="Version exceeds 65535",Pf="The strength must equal 1, 2, or 3",Uf="Extra field type exceeds 65535",Yf="Extra field data exceeds 64KB",ts="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Ra=new Uint8Array([7,0,2,0,65,69,3,0,0]),Xo=28;let oi=0;const Ma=[];class Wf{constructor(t,n={}){t.writable===fe&&typeof t.next==eo&&(t=new ka(t)),t instanceof WritableStream&&(t={writable:t}),t.writable.size===fe&&(t.writable.size=0);const r=t instanceof ka;r||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0}),Object.assign(this,{writer:t,addSplitZipSignature:r,options:n,config:Vi(),files:new Map,filenames:new Set,offset:t.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set})}async add(t="",n,r={}){const i=this,{pendingAddFileCalls:s,config:a}=i;oiMa.push(l));let o;try{if(t=t.trim(),i.filenames.has(t))throw new Error(Ff);return i.filenames.add(t),o=Hf(i,t,n,r),s.add(o),await o}catch(l){throw i.filenames.delete(t),l}finally{s.delete(o);const l=Ma.shift();l?l():oi--}}async close(t=new Uint8Array,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:s}=i;for(;r.size;)await Promise.all(Array.from(r));return await $f(this,t,n),!i.preventClose&&!n.preventClose&&await s.close(),i.getData?i.getData():s}}async function Hf(e,t,n,r){t=t.trim(),r.directory&&!t.endsWith(or)?t+=or:r.directory=t.endsWith(or);const i=Si(t);if(ee(i)>ke)throw new Error(Nf);const s=r.comment||"",a=Si(s);if(ee(a)>ke)throw new Error(Cf);const o=e.options.version||r.version||0;if(o>ke)throw new Error(Oa);const l=e.options.versionMadeBy||r.versionMadeBy||20;if(l>ke)throw new Error(Oa);const f=xe(e,r,Ji)||new Date,d=xe(e,r,Qi),u=xe(e,r,es),p=xe(e,r,"password"),w=xe(e,r,"encryptionStrength")||3,v=xe(e,r,"zipCrypto");if(p!==fe&&w!==fe&&(w<1||w>3))throw new Error(Pf);let h=new Uint8Array;const{extraField:c}=r;if(c){let he=0,V=0;c.forEach(Z=>he+=4+ee(Z)),h=new Uint8Array(he),c.forEach((Z,Se)=>{if(Se>ke)throw new Error(Uf);if(ee(Z)>ke)throw new Error(Yf);ve(h,new Uint16Array([Se]),V),ve(h,new Uint16Array([ee(Z)]),V+2),ve(h,Z,V+4),V+=4+ee(Z)})}let m=xe(e,r,"extendedTimestamp");m===fe&&(m=!0);let _=0,b=0,k=xe(e,r,"keepOrder");k===fe&&(k=!0);let g=0,y=xe(e,r,qo);y===fe&&(y=!0);const x=xe(e,r,Go)||0,D=xe(e,r,Zo)||0;let S=xe(e,r,zo);n&&(n instanceof ReadableStream&&(n={readable:n}),await ze(n),n.size===fe?(r.dataDescriptor=!0,(S||S===fe)&&(S=!0,_=pe)):(g=n.size,_=Xf(g)));const{diskOffset:E}=e.writer;if(e.offset+e.pendingEntriesSize-E>=pe||g>=pe||_>=pe){if(S===!1||!k)throw new Error(ts);S=!0}S=S||!1;const A=xe(e,r,"level"),U=xe(e,r,"useWebWorkers"),F=xe(e,r,"bufferedWrite");let B=xe(e,r,"dataDescriptor"),N=xe(e,r,"dataDescriptorSignature");const Y=xe(e,r,"signal"),j=xe(e,r,"useCompressionStream");B===fe&&(B=!0),B&&N===fe&&(N=!1),r=Object.assign({},r,{rawFilename:i,rawComment:a,version:o,versionMadeBy:l,lastModDate:f,lastAccessDate:d,creationDate:u,rawExtraField:h,zip64:S,password:p,level:A,useWebWorkers:U,encryptionStrength:w,extendedTimestamp:m,zipCrypto:v,bufferedWrite:F,keepOrder:k,dataDescriptor:B,dataDescriptorSignature:N,signal:Y,msDosCompatible:y,internalFileAttribute:x,externalFileAttribute:D,useCompressionStream:j});const q=Vf(r),we=Gf(r);b=ee(q.localHeaderArray,we.dataDescriptorArray)+_,e.pendingEntriesSize+=b;let W;try{W=await jf(e,t,n,{headerInfo:q,dataDescriptorInfo:we},r)}finally{e.pendingEntriesSize-=b}return Object.assign(W,{name:t,comment:s,extraField:c}),new xr(W)}async function jf(e,t,n,r,i){const{files:s,writer:a}=e,{keepOrder:o,dataDescriptor:l,signal:f}=i,d=Array.from(s.values()).pop();let u={},p,w,v,h,c,m;s.set(t,u);try{let k;o&&(k=d&&d.lock,_()),i.bufferedWrite||e.lockWriter||!l?(m=new Kt,m.writable.size=0,p=!0,await ze(a)):(m=a,e.lockWriter=Promise.resolve(),w=()=>delete e.lockWriter),await ze(m);const{writable:g,diskNumber:y}=a;let{diskOffset:x}=a;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const D=new Uint8Array(4),S=He(D);Q(S,0,ji),await Pt(g,D),e.offset+=4}if(p||await k,c=!0,u.diskNumberStart=y,u=await Bf(n,m,u,r,e.config,i),c=!1,s.set(t,u),u.filename=t,p){await m.writable.close();let D=await m.getData();await k,await b(),h=!0,l||(D=await qf(u,D,g,i)),u.diskNumberStart=a.diskNumber,x=a.diskOffset,await D.stream().pipeTo(g,{preventClose:!0,signal:f}),g.size+=D.size,h=!1}if(u.offset=e.offset-x,u.zip64)zf(u);else if(u.offset>=pe)throw new Error(ts);return e.offset+=u.length,u}catch(k){throw(p&&h||!p&&c)&&(e.hasCorruptedEntries=!0,k&&(k.corruptedEntry=!0),p?e.offset+=m.writable.size:e.offset=m.writable.size),s.delete(t),k}finally{v&&v(),w&&w()}function _(){u.lock=new Promise(k=>v=k)}async function b(){const{lockWriter:k}=e;if(k)return await k.then(()=>delete e.lockWriter),b();e.lockWriter=new Promise(g=>w=g)}}async function Bf(e,t,{diskNumberStart:n,lock:r},i,s,a){const{headerInfo:o,dataDescriptorInfo:l}=i,{localHeaderArray:f,headerArray:d,lastModDate:u,rawLastModDate:p,encrypted:w,compressed:v,version:h,compressionMethod:c,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b}=o,{dataDescriptorArray:k}=l,{rawFilename:g,lastAccessDate:y,creationDate:x,password:D,level:S,zip64:E,zipCrypto:A,dataDescriptor:U,directory:F,versionMadeBy:B,rawComment:N,rawExtraField:Y,useWebWorkers:j,onstart:q,onprogress:we,onend:W,signal:he,encryptionStrength:V,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,useCompressionStream:Ht}=a,Tt={lock:r,versionMadeBy:B,zip64:E,directory:Boolean(F),filenameUTF8:!0,rawFilename:g,commentUTF8:!0,rawComment:N,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b,rawExtraField:Y,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,diskNumberStart:n};let mt=0,jt=0,wn;const{writable:Ve}=t;if(e){e.chunkSize=no(s),await Pt(Ve,f);const gn=e.readable,Ee=gn.size=e.size,Ue={options:{codecType:So,level:S,password:D,encryptionStrength:V,zipCrypto:w&&A,passwordVerification:w&&A&&p>>8&255,signed:!0,compressed:v,encrypted:w,useWebWorkers:j,useCompressionStream:Ht,transferStreams:!1},config:s,streamOptions:{signal:he,size:Ee,onstart:q,onprogress:we,onend:W}},Jt=await Do({readable:gn,writable:Ve},Ue);Ve.size+=Jt.size,wn=Jt.signature,jt=e.size=gn.size,mt=Jt.size}else await Pt(Ve,f);const At=E?new Uint8Array(Xo+4):new Uint8Array;return e&&Zf({signature:wn,rawExtraFieldZip64:At,compressedSize:mt,uncompressedSize:jt,headerInfo:o,dataDescriptorInfo:l},a),U&&await Pt(Ve,k),Object.assign(Tt,{compressedSize:mt,lastModDate:u,rawLastModDate:p,creationDate:x,lastAccessDate:y,encrypted:w,length:ee(f,k)+mt,compressionMethod:c,version:h,headerArray:d,signature:wn,rawExtraFieldZip64:At}),Tt}function Vf(e){const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,password:s,level:a,zip64:o,zipCrypto:l,dataDescriptor:f,directory:d,rawExtraField:u,encryptionStrength:p,extendedTimestamp:w}=e,v=a!==0&&!d,h=Boolean(s&&ee(s));let c;if(h&&!l){c=new Uint8Array(ee(Ra)+2);const N=He(c);re(N,0,Xa),ve(c,Ra,2),yr(N,8,p)}else c=new Uint8Array;let m,_;if(w){_=new Uint8Array(9+(r?4:0)+(i?4:0));const N=He(_);re(N,0,Bi),re(N,2,ee(_)-4);const Y=1+(r?2:0)+(i?4:0);yr(N,4,Y),Q(N,5,Math.floor(n.getTime()/1e3)),r&&Q(N,9,Math.floor(r.getTime()/1e3)),i&&Q(N,13,Math.floor(i.getTime()/1e3));try{m=new Uint8Array(36);const j=He(m),q=li(n);re(j,0,Ja),re(j,2,32),re(j,8,Qa),re(j,10,24),Pe(j,12,q),Pe(j,20,li(r)||q),Pe(j,28,li(i)||q)}catch{m=new Uint8Array}}else m=_=new Uint8Array;let b=vi;f&&(b=b|bi);let k=Ga;v&&(k=wi);let g=e.version||ad;o&&(g=g>sa?g:sa),h&&(b=b|yi,l||(g=g>aa?g:aa,k=Za,v&&(c[9]=wi)));const y=new Uint8Array(26),x=He(y);re(x,0,g),re(x,2,b),re(x,4,k);const D=new Uint32Array(1),S=He(D);let E;noa?E=oa:E=n,re(S,0,(E.getHours()<<6|E.getMinutes())<<5|E.getSeconds()/2),re(S,2,(E.getFullYear()-1980<<4|E.getMonth()+1)<<5|E.getDate());const A=D[0];Q(x,6,A),re(x,22,ee(t));const U=ee(c,_,m,u);re(x,24,U);const F=new Uint8Array(30+ee(t)+U),B=He(F);return Q(B,0,qa),ve(F,y,4),ve(F,t,30),ve(F,c,30+ee(t)),ve(F,_,30+ee(t,c)),ve(F,m,30+ee(t,c,_)),ve(F,u,30+ee(t,c,_,m)),{localHeaderArray:F,headerArray:y,headerView:x,lastModDate:n,rawLastModDate:A,encrypted:h,compressed:v,version:g,compressionMethod:k,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:m,rawExtraFieldAES:c}}function Gf(e){const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i=new Uint8Array,s,a=0;return n&&(i=new Uint8Array(t?r?24:20:r?16:12),s=He(i),r&&(a=4,Q(s,0,td))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}}function Zf(e,t){const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:s,headerInfo:a,dataDescriptorInfo:o}=e,{headerView:l,encrypted:f}=a,{dataDescriptorView:d,dataDescriptorOffset:u}=o,{zip64:p,zipCrypto:w,dataDescriptor:v}=t;if((!f||w)&&n!==fe&&(Q(l,10,n),v&&Q(d,u,n)),p){const h=He(r);re(h,0,Ka),re(h,2,Xo),Q(l,14,pe),Pe(h,12,BigInt(i)),Q(l,18,pe),Pe(h,4,BigInt(s)),v&&(Pe(d,u+4,BigInt(i)),Pe(d,u+12,BigInt(s)))}else Q(l,14,i),Q(l,18,s),v&&(Q(d,u+4,i),Q(d,u+8,s))}async function qf(e,t,n,{zipCrypto:r}){const i=await Kf(t,0,26),s=new DataView(i);return(!e.encrypted||r)&&Q(s,14,e.signature),e.zip64?(Q(s,18,pe),Q(s,22,pe)):(Q(s,18,e.compressedSize),Q(s,22,e.uncompressedSize)),await Pt(n,new Uint8Array(i)),t.slice(i.byteLength)}function zf(e){const{rawExtraFieldZip64:t,offset:n,diskNumberStart:r}=e,i=He(t);Pe(i,20,BigInt(n)),Q(i,28,r)}async function $f(e,t,n){const{files:r,writer:i}=e;let s=0,a=0;const{diskOffset:o,writable:l}=i;let{diskNumber:f}=i,d=e.offset-o,u=r.size;for(const[,{rawFilename:k,rawExtraFieldZip64:g,rawExtraFieldAES:y,rawExtraField:x,rawComment:D,rawExtraFieldExtendedTimestamp:S,rawExtraFieldNTFS:E}]of r)a+=46+ee(k,D,g,y,S,E,x);let p=n.zip64||e.options.zip64||!1;if(d>=pe||a>=pe||u>=ke){if(n.zip64===!1||e.options.zip64===!1)throw new Error(ts);p=!0}const w=new Uint8Array(a),v=He(w);for(const[k,g]of Array.from(r.values()).entries()){const{offset:y,rawFilename:x,rawExtraFieldZip64:D,rawExtraFieldAES:S,rawExtraFieldNTFS:E,rawExtraField:A,rawComment:U,versionMadeBy:F,headerArray:B,directory:N,zip64:Y,msDosCompatible:j,internalFileAttribute:q,externalFileAttribute:we,extendedTimestamp:W,lastModDate:he,diskNumberStart:V}=g;let Z;if(W){Z=new Uint8Array(9);const ue=He(Z);re(ue,0,Bi),re(ue,2,ee(Z)-4),yr(ue,4,1),Q(ue,5,Math.floor(he.getTime()/1e3))}else Z=new Uint8Array;const Se=ee(D,S,Z,E,A);if(Q(v,s,gi),re(v,s+4,F),ve(w,B,s+6),re(v,s+30,Se),re(v,s+32,ee(U)),re(v,s+34,Y?ke:V),re(v,s+36,q),we?Q(v,s+38,we):N&&j&&yr(v,s+38,ki),Q(v,s+42,Y?pe:y),ve(w,x,s+46),ve(w,D,s+46+ee(x)),ve(w,S,s+46+ee(x,D)),ve(w,Z,s+46+ee(x,D,S)),ve(w,E,s+46+ee(x,D,S,Z)),ve(w,A,s+46+ee(x,D,S,Z,E)),ve(w,U,s+46+ee(x)+Se),s+=46+ee(x,U)+Se,n.onprogress)try{await n.onprogress(k+1,r.size,new xr(g))}catch{}}await ze(i),await Pt(l,w);const h=new Uint8Array(p?nd:an),c=He(h);let m=i.diskNumber;const{availableSize:_}=i;_n&&(t+=n.length)),t}class Jo{constructor(t,n,r,i){const s=this;if(t.root&&i&&i.getChildByName(n))throw new Error("Entry filename already exists");r||(r={}),Object.assign(s,{fs:t,name:n,data:r.data,id:t.entries.length,parent:i,children:[],uncompressedSize:0}),t.entries.push(s),i&&s.parent.children.push(s)}moveTo(t){const n=this;n.fs.move(n,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){const n=this;let r=n.name,i=n.parent;for(;i&&i!=t;)r=(i.name?i.name+"/":"")+r,i=i.parent;return r}isDescendantOf(t){let n=this.parent;for(;n&&n.id!=t.id;)n=n.parent;return Boolean(n)}}class Qo extends Jo{constructor(t,n,r,i){super(t,n,r,i);const s=this;s.Reader=r.Reader,s.Writer=r.Writer,r.getData&&(s.getData=r.getData)}async getData(t,n={}){const r=this;if(!t||t.constructor==r.Writer&&r.data)return r.data;{const i=r.reader=new r.Reader(r.data,n);await Promise.all([ze(i),ze(t,r.data.uncompressedSize)]);const s=i.readable;return s.size=r.uncompressedSize=i.size,await s.pipeTo(t.writable),t.getData?t.getData():t.writable}}getText(t,n){return this.getData(new Ti(t),n)}getBlob(t,n){return this.getData(new Kt(t),n)}getData64URI(t,n){return this.getData(new wr(t),n)}getUint8Array(t){return this.getData(new gr,t)}getWritable(t=new WritableStream,n){return this.getData({writable:t},n)}replaceBlob(t){Object.assign(this,{data:t,Reader:mn,Writer:Kt,reader:null})}replaceText(t){Object.assign(this,{data:t,Reader:Ro,Writer:Ti,reader:null})}replaceData64URI(t){Object.assign(this,{data:t,Reader:Di,Writer:wr,reader:null})}replaceUint8Array(t){Object.assign(this,{data:t,Reader:Ri,Writer:gr,reader:null})}replaceReadable(t){Object.assign(this,{data:null,Reader:function(){return{readable:t}},Writer:null,reader:null})}}class Hn extends Jo{constructor(t,n,r,i){super(t,n,r,i),this.directory=!0}addDirectory(t){return pt(this,t,null,!0)}addText(t,n){return pt(this,t,{data:n,Reader:Ro,Writer:Ti})}addBlob(t,n){return pt(this,t,{data:n,Reader:mn,Writer:Kt})}addData64URI(t,n){return pt(this,t,{data:n,Reader:Di,Writer:wr})}addUint8Array(t,n){return pt(this,t,{data:n,Reader:Ri,Writer:gr})}addHttpContent(t,n,r={}){return pt(this,t,{data:n,Reader:class extends va{constructor(i){super(i,r)}}})}addReadable(t,n){return pt(this,t,{Reader:function(){return{readable:n}}})}addFileSystemEntry(t){return ru(this,t)}addData(t,n){return pt(this,t,n)}async importBlob(t,n={}){await this.importZip(new mn(t),n)}async importData64URI(t,n={}){await this.importZip(new Di(t),n)}async importUint8Array(t,n={}){await this.importZip(new Ri(t),n)}async importHttpContent(t,n={}){await this.importZip(new va(t,n),n)}async importReadable(t,n={}){await this.importZip({readable:t},n)}exportBlob(t={}){return this.exportZip(new Kt("application/zip"),t)}exportData64URI(t={}){return this.exportZip(new wr("application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new gr,t)}async exportWritable(t=new WritableStream,n={}){return await this.exportZip({writable:t},n),t}async importZip(t,n){await ze(t),(await new Sf(t,n).getEntries()).forEach(s=>{let a=this;const o=s.filename.split("/"),l=o.pop();o.forEach(f=>a=a.getChildByName(f)||new Hn(this.fs,f,null,a)),s.directory||pt(a,l,{data:s,Reader:tu(Object.assign({},n))})})}async exportZip(t,n){const r=this;await Promise.all([el(r),ze(t)]);const i=new Wf(t,n);return await nu(i,r,eu([r],"uncompressedSize"),n),await i.close(),t.getData?t.getData():t.writable}getChildByName(t){const n=this.children;for(let r=0;r{n.id==e.id&&t.splice(r,1)})}async function nu(e,t,n,r){const i=t,s=new Map;await a(e,t);async function a(o,l){await f();async function f(){if(r.bufferedWrite)await Promise.all(l.children.map(d));else for(const u of l.children)await d(u)}async function d(u){const p=r.relativePath?u.getRelativeName(i):u.getFullname();await o.add(p,u.reader,Object.assign({directory:u.directory},Object.assign({},r,{onprogress:async w=>{if(r.onprogress){s.set(p,w);try{await r.onprogress(Array.from(s.values()).reduce((v,h)=>v+h),n)}catch{}}}}))),await a(o,u)}}}async function ru(e,t){if(t.isDirectory){const i=e.addDirectory(t.name);return await n(i,t),i}else return new Promise((i,s)=>t.file(a=>i(e.addBlob(t.name,a)),s));async function n(i,s){const a=await r(s);for(const o of a)o.isDirectory?await n(i.addDirectory(o.name),o):await new Promise((l,f)=>{o.file(d=>{const u=i.addBlob(o.name,d);u.uncompressedSize=d.size,l(u)},f)})}function r(i){return new Promise((s,a)=>{let o=[];i.isDirectory&&l(i.createReader()),i.isFile&&s(o);function l(f){f.readEntries(d=>{d.length?(o=o.concat(d),l(f)):s(o)},a)}})}}function tn(e){e.entries=[],e.root=new Hn(e)}function pt(e,t,n,r){if(e.directory)return r?new Hn(e.fs,t,n,e):new Qo(e.fs,t,n,e);throw new Error("Parent entry is not a directory")}let tl;try{tl=import.meta.url}catch{}Gi({baseURL:tl});zd(Gi);Gi({Deflate:Fc,Inflate:ed});function Ir(e){return e.slice(e.lastIndexOf(Fr)+1)}const Fr="/";async function iu(e,t,n){const r=e.vaultPath+"/.obsidian/"+t+".json";let i;return e.adapter.exists(r)&&(i=JSON.parse(await e.adapter.readFile(r))),n(i)}class su{constructor(t){Bt(this,"zipFS");Bt(this,"chunks",[]);Bt(this,"chunkIndex",0);this.zipBlob=t}async initReadingVault(){this.zipFS=new Qf.FS,await this.zipFS.importBlob(this.zipBlob)}readDirectory(t){return this.zipFS.find(t).children.map(r=>({isDirectory:()=>!!r.directory,getName:()=>r.getFullname()}))}readFile(t){return this.zipFS.find(t).getText("utf-8")}exists(t){return!!this.zipFS.find(t)}resolve(t){return t}resolveInDir(t,n){return t+Fr+n}removeFile(t){}renameFile(t,n){}flushResultsFromInitialProcessing(t){}appendToResultFile(t,n){this.chunks.push(n)}appendToPostProcessingFile(t,n){this.chunks[this.chunkIndex]=n,this.chunkIndex++}initPostProcessingResultFile(t){}chunkIter(){const t=this.chunks;let n=0;return{[Symbol.asyncIterator](){return{async next(){if(n{if(s.forEach((o,l)=>s[l]+=a),r==="seenOne"&&a!=="["&&(r="normal"),r==="seenOneOut"&&a!=="]"&&(r="normal"),a==="["&&(i+=1,r==="seenOne"?(s.push(""),r="normal"):r==="normal"&&(r="seenOne")),a==="]"&&i>0){if(i-=1,r==="seenOneOut"){const o=s.pop();o&&(!t||s.length===0)&&n.push(o.slice(0,-2)),r="normal"}else r==="normal"&&(r="seenOneOut");i===0&&(r="normal")}}),n}function lu(e){return Ir(e)!==e}class ci{constructor(){Bt(this,"nameWasCalledAsFile",[]);Bt(this,"pathMap",new Map);Bt(this,"nameMap",new Map)}accessAsFile(t,n,r){const i=this.pathMap.get(n);if(i)return this.nameMap.get(t)||this.nameMap.set(t,i),i;const s=this.nameMap.get(t);if(s&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,s),this.nameWasCalledAsFile.push(t),s;const a=r();return this.pathMap.set(n,a),this.nameMap.get(t)||this.nameMap.set(t,a),this.nameWasCalledAsFile.push(t),a}accessAsLink(t,n){const r=this.findData(t);if(r)return r;const i=lu(t),s=n();return i?this.pathMap.set(t,s):this.nameMap.set(t,s),s}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Lr(e){e.totalNodes++,e.leafNodes++}function nl(e){e.leafNodes--,e.topLevelNodes++}function cu(e,t,n=au,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new ci,headingTracker:new ci,dummyHeadingLinkTracker:new Map,blockLinkTracker:new ci,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function kt(e){return Lr(e.summary),e.idGenerator()}function du(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map);let s=i.get(r);return s||(s={uid:kt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function fu(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map);let a=s.get(i);return a||(a={uid:kt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function uu(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function hu(e){let t;return[e.split(` +var wc=Object.defineProperty;var gc=(e,t,n)=>t in e?wc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Bt=(e,t,n)=>(gc(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const In=15,mi=30,pi=19,xc=29,ur=256,Hi=ur+1+xc,Is=2*Hi+1,yn=256,yc=7,Fs=16,Ls=17,Cs=18,$r=8*2,hr=-1,bc=1,qn=2,vc=0,rn=0,Ns=1,kc=3,Le=4,Qe=0,Wa=1,zn=2,et=-2,Sc=-3,Qt=-5;function Tr(e){return Ar(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function Ar(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?Ar(n):n),[])}const Ps=[0,1,2,3].concat(...Tr([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function se(){const e=this;function t(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,l=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,f=e.stat_desc.max_length;let d,u,p,w,D,h,c=0;for(w=0;w<=In;w++)i.bl_count[w]=0;for(s[i.heap[i.heap_max]*2+1]=0,d=i.heap_max+1;df&&(w=f,c++),s[u*2+1]=w,!(u>e.max_code)&&(i.bl_count[w]++,D=0,u>=o&&(D=l[u-o]),h=s[u*2],i.opt_len+=h*(w+D),a&&(i.static_len+=h*(a[u*2+1]+D)));if(c!==0){do{for(w=f-1;i.bl_count[w]===0;)w--;i.bl_count[w]--,i.bl_count[w+1]+=2,i.bl_count[f]--,c-=2}while(c>0);for(w=f;w!==0;w--)for(u=i.bl_count[w];u!==0;)p=i.heap[--d],!(p>e.max_code)&&(s[p*2+1]!=w&&(i.opt_len+=(w-s[p*2+1])*s[p*2],s[p*2+1]=w),u--)}}function n(i,s){let a=0;do a|=i&1,i>>>=1,a<<=1;while(--s>0);return a>>>1}function r(i,s,a){const l=[];let o=0,f,d,u;for(f=1;f<=In;f++)l[f]=o=o+a[f-1]<<1;for(d=0;d<=s;d++)u=i[d*2+1],u!==0&&(i[d*2]=n(l[u]++,u))}e.build_tree=function(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,l=e.stat_desc.elems;let o,f,d=-1,u;for(i.heap_len=0,i.heap_max=Is,o=0;o=1;o--)i.pqdownheap(s,o);u=l;do o=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(s,1),f=i.heap[1],i.heap[--i.heap_max]=o,i.heap[--i.heap_max]=f,s[u*2]=s[o*2]+s[f*2],i.depth[u]=Math.max(i.depth[o],i.depth[f])+1,s[o*2+1]=s[f*2+1]=u,i.heap[1]=u++,i.pqdownheap(s,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],t(i),r(s,e.max_code,i.bl_count)}}se._length_code=[0,1,2,3,4,5,6,7].concat(...Tr([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));se.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];se.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];se.d_code=function(e){return e<256?Ps[e]:Ps[256+(e>>>7)]};se.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];se.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];se.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];se.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function De(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}const Ec=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],Dc=Tr([[144,8],[112,9],[24,7],[8,8]]);De.static_ltree=Ar(Ec.map((e,t)=>[e,Dc[t]]));const Tc=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],Ac=Tr([[30,5]]);De.static_dtree=Ar(Tc.map((e,t)=>[e,Ac[t]]));De.static_l_desc=new De(De.static_ltree,se.extra_lbits,ur+1,Hi,In);De.static_d_desc=new De(De.static_dtree,se.extra_dbits,0,mi,In);De.static_bl_desc=new De(null,se.extra_blbits,0,pi,yc);const Oc=9,Rc=8;function at(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const Ha=0,sr=1,qt=2,Je=[new at(0,0,0,0,Ha),new at(4,4,8,4,sr),new at(4,5,16,8,sr),new at(4,6,32,32,sr),new at(4,4,16,16,qt),new at(8,16,32,32,qt),new at(8,16,128,128,qt),new at(8,32,128,256,qt),new at(32,128,258,1024,qt),new at(32,258,258,4096,qt)],$n=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ge=0,Kn=1,bn=2,Xn=3,Mc=32,Kr=42,Jn=113,vn=666,Xr=8,Ic=0,Jr=1,Fc=2,ce=3,ar=258,Ye=ar+ce+1;function Us(e,t,n,r){const i=e[t*2],s=e[n*2];return i=3&&j[se.bl_order[T]*2+1]===0;T--);return e.opt_len+=3*(T+1)+5+5+4,T}function Ve(T){e.pending_buf[e.pending++]=T}function Tt(T){Ve(T&255),Ve(T>>>8&255)}function gn(T){Ve(T>>8&255),Ve(T&255&255)}function Ee(T,R){let O;const I=R;ge>$r-I?(O=T,ue|=O<>>$r-ge,ge+=I-$r):(ue|=T<=8&&(Ve(ue&255),ue>>>=8,ge-=8)}function dc(){Ee(Jr<<1,3),Ue(yn,De.static_ltree),Es(),1+Se+10-ge<9&&(Ee(Jr<<1,3),Ue(yn,De.static_ltree),Es()),Se=7}function xn(T,R){let O,I,P;if(e.dist_buf[V]=T,e.lc_buf[V]=R&255,V++,T===0?N[R*2]++:(Z++,T--,N[(se._length_code[R]+ur+1)*2]++,Y[se.d_code(T)*2]++),(V&8191)===0&&A>2){for(O=V*8,I=g-m,P=0;P>>=3,Z8?Tt(ue):ge>0&&Ve(ue&255),ue=0,ge=0}function fc(T,R,O){Ts(),Se=8,O&&(Tt(R),Tt(~R)),e.pending_buf.set(o.subarray(T,T+R),e.pending),e.pending+=R}function As(T,R,O){Ee((Ic<<1)+(O?1:0),3),fc(T,R,!0)}function uc(T,R,O){let I,P,G=0;A>0?(q.build_tree(e),we.build_tree(e),G=wn(),I=e.opt_len+3+7>>>3,P=e.static_len+3+7>>>3,P<=I&&(I=P)):I=P=R+5,R+4<=I&&T!=-1?As(T,R,O):P==I?(Ee((Jr<<1)+(O?1:0),3),Ds(De.static_ltree,De.static_dtree)):(Ee((Fc<<1)+(O?1:0),3),cc(q.max_code+1,we.max_code+1,G+1),Ds(N,Y)),Dt(),O&&Ts()}function At(T){uc(m>=0?m:-1,g-m,T),m=g,t.flush_pending()}function qr(){let T,R,O,I;do{if(I=f-x-g,I===0&&g===0&&x===0)I=s;else if(I==-1)I--;else if(g>=s+s-Ye){o.set(o.subarray(s,s+s),0),y-=s,g-=s,m-=s,T=w,O=T;do R=u[--O]&65535,u[O]=R>=s?R-s:0;while(--T!==0);T=s,O=T;do R=d[--O]&65535,d[O]=R>=s?R-s:0;while(--T!==0);I+=s}if(t.avail_in===0)return;T=t.read_buf(o,g+x,I),x+=T,x>=ce&&(p=o[g]&255,p=(p<r-5&&(R=r-5);;){if(x<=1){if(qr(),x===0&&T==rn)return Ge;if(x===0)break}if(g+=x,x=0,O=m+R,(g===0||g>=O)&&(x=g-O,g=O,At(!1),t.avail_out===0)||g-m>=s-Ye&&(At(!1),t.avail_out===0))return Ge}return At(T==Le),t.avail_out===0?T==Le?bn:Ge:T==Le?Xn:Kn}function Os(T){let R=k,O=g,I,P,G=E;const K=g>s-Ye?g-(s-Ye):0;let Me=B;const Xe=l,zr=g+ar;let Rs=o[O+G-1],Ms=o[O+G];E>=F&&(R>>=2),Me>x&&(Me=x);do if(I=T,!(o[I+G]!=Ms||o[I+G-1]!=Rs||o[I]!=o[O]||o[++I]!=o[O+1])){O+=2,I++;do;while(o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&OG){if(y=T,G=P,P>=Me)break;Rs=o[O+G-1],Ms=o[O+G]}}while((T=d[T&Xe]&65535)>K&&--R!==0);return G<=x?G:x}function mc(T){let R=0,O;for(;;){if(x=ce&&(p=(p<=ce)if(O=xn(g-y,_-ce),x-=_,_<=S&&x>=ce){_--;do g++,p=(p<=ce&&(p=(p<4096)&&(_=ce-1)),E>=ce&&_<=E){I=g+x-ce,O=xn(g-1-b,E-ce),x-=E-1,E-=2;do++g<=I&&(p=(p<Oc||I!=Xr||O<9||O>15||R<0||R>9||G<0||G>qn?et:(T.dstate=e,a=O,s=1<9||O<0||O>qn?et:(Je[A].func!=Je[R].func&&T.total_in!==0&&(I=T.deflate(Ns)),A!=R&&(A=R,S=Je[A].max_lazy,F=Je[A].good_length,B=Je[A].nice_length,k=Je[A].max_chain),U=O,I)},e.deflateSetDictionary=function(T,R,O){let I=O,P,G=0;if(!R||n!=Kr)return et;if(Is-Ye&&(I=s-Ye,G=O-I),o.set(R.subarray(G,G+I),0),g=I,m=I,p=o[0]&255,p=(p<Le||R<0)return et;if(!T.next_out||!T.next_in&&T.avail_in!==0||n==vn&&R!=Le)return T.msg=$n[zn-et],et;if(T.avail_out===0)return T.msg=$n[zn-Qt],Qt;if(t=T,G=i,i=R,n==Kr&&(I=Xr+(a-8<<4)<<8,P=(A-1&255)>>1,P>3&&(P=3),I|=P<<6,g!==0&&(I|=Mc),I+=31-I%31,n=Jn,gn(I)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,Qe}else if(t.avail_in===0&&R<=G&&R!=Le)return t.msg=$n[zn-Qt],Qt;if(n==vn&&t.avail_in!==0)return T.msg=$n[zn-Qt],Qt;if(t.avail_in!==0||x!==0||R!=rn&&n!=vn){switch(K=-1,Je[A].func){case Ha:K=hc(R);break;case sr:K=mc(R);break;case qt:K=pc(R);break}if((K==bn||K==Xn)&&(n=vn),K==Ge||K==bn)return t.avail_out===0&&(i=-1),Qe;if(K==Kn){if(R==Ns)dc();else if(As(0,0,!1),R==kc)for(O=0;On&&(i=n),i===0?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Cc(e){const t=this,n=new ja,r=Nc(e&&e.chunkSize?e.chunkSize:64*1024),i=rn,s=new Uint8Array(r);let a=e?e.level:hr;typeof a>"u"&&(a=hr),n.deflateInit(a),n.next_out=s,t.append=function(l,o){let f,d,u=0,p=0,w=0;const D=[];if(!!l.length){n.next_in_index=0,n.next_in=l,n.avail_in=l.length;do{if(n.next_out_index=0,n.avail_out=r,f=n.deflate(i),f!=Qe)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?D.push(new Uint8Array(s)):D.push(s.slice(0,n.next_out_index))),w+=n.next_out_index,o&&n.next_in_index>0&&n.next_in_index!=u&&(o(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return D.length>1?(d=new Uint8Array(w),D.forEach(function(h){d.set(h,p),p+=h.length})):d=D[0]||new Uint8Array,d}},t.flush=function(){let l,o,f=0,d=0;const u=[];do{if(n.next_out_index=0,n.avail_out=r,l=n.deflate(Le),l!=Wa&&l!=Qe)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&u.push(s.slice(0,n.next_out_index)),d+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),o=new Uint8Array(d),u.forEach(function(p){o.set(p,f),f+=p.length}),o}}function Nc(e){return e+5*(Math.floor(e/16383)+1)}const Pc=15,J=0,yt=1,Uc=2,Ne=-2,ae=-3,Ys=-4,bt=-5,We=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ba=1440,Yc=0,Wc=4,Hc=9,jc=5,Bc=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Vc=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Gc=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Zc=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],qc=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],zc=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ot=15;function _i(){const e=this;let t,n,r,i,s,a;function l(f,d,u,p,w,D,h,c,m,_,b){let v,g,y,x,E,k,S,A,U,F,B,N,Y,j,q;F=0,E=u;do r[f[d+F]]++,F++,E--;while(E!==0);if(r[0]==u)return h[0]=-1,c[0]=0,J;for(A=c[0],k=1;k<=Ot&&r[k]===0;k++);for(S=k,AE&&(A=E),c[0]=A,j=1<N+A;){if(x++,N+=A,q=y-N,q=q>A?A:q,(g=1<<(k=S-N))>v+1&&(g-=v+1,Y=S,kBa)return ae;s[x]=B=_[0],_[0]+=q,x!==0?(a[x]=E,i[0]=k,i[1]=A,k=E>>>N-A,i[2]=B-s[x-1]-k,m.set(i,(s[x-1]+k)*3)):h[0]=B}for(i[1]=S-N,F>=u?i[0]=128+64:b[F]>>N;k>>=1)E^=k;for(E^=k,U=(1<257?(_==ae?m.msg="oversubscribed distance tree":_==bt?(m.msg="incomplete distance tree",_=ae):_!=Ys&&(m.msg="empty distance tree with lengths",_=ae),_):J)}}_i.inflate_trees_fixed=function(e,t,n,r){return e[0]=Hc,t[0]=jc,n[0]=Bc,r[0]=Vc,J};const Qn=0,Ws=1,Hs=2,js=3,Bs=4,Vs=5,Gs=6,Qr=7,Zs=8,er=9;function $c(){const e=this;let t,n=0,r,i=0,s=0,a=0,l=0,o=0,f=0,d=0,u,p=0,w,D=0;function h(c,m,_,b,v,g,y,x){let E,k,S,A,U,F,B,N,Y,j,q,we,W,he,V,Z;B=x.next_in_index,N=x.avail_in,U=y.bitb,F=y.bitk,Y=y.write,j=Y>=k[Z+1],F-=k[Z+1],y.win[Y++]=k[Z+2],j--;continue}do{if(U>>=k[Z+1],F-=k[Z+1],(A&16)!==0){for(A&=15,W=k[Z+2]+(U&We[A]),U>>=A,F-=A;F<15;)N--,U|=(x.read_byte(B++)&255)<>=k[Z+1],F-=k[Z+1],(A&16)!==0){for(A&=15;F>=A,F-=A,j-=W,Y>=he)V=Y-he,Y-V>0&&2>Y-V?(y.win[Y++]=y.win[V++],y.win[Y++]=y.win[V++],W-=2):(y.win.set(y.win.subarray(V,V+2),Y),Y+=2,V+=2,W-=2);else{V=Y-he;do V+=y.end;while(V<0);if(A=y.end-V,W>A){if(W-=A,Y-V>0&&A>Y-V)do y.win[Y++]=y.win[V++];while(--A!==0);else y.win.set(y.win.subarray(V,V+A),Y),Y+=A,V+=A,A=0;V=0}}if(Y-V>0&&W>Y-V)do y.win[Y++]=y.win[V++];while(--W!==0);else y.win.set(y.win.subarray(V,V+W),Y),Y+=W,V+=W,W=0;break}else if((A&64)===0)E+=k[Z+2],E+=U&We[A],Z=(S+E)*3,A=k[Z];else return x.msg="invalid distance code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae;while(!0);break}if((A&64)===0){if(E+=k[Z+2],E+=U&We[A],Z=(S+E)*3,(A=k[Z])===0){U>>=k[Z+1],F-=k[Z+1],y.win[Y++]=k[Z+2],j--;break}}else return(A&32)!==0?(W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,yt):(x.msg="invalid literal/length code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae)}while(!0)}while(j>=258&&N>=10);return W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,J}e.init=function(c,m,_,b,v,g){t=Qn,f=c,d=m,u=_,p=b,w=v,D=g,r=null},e.proc=function(c,m,_){let b,v,g,y=0,x=0,E=0,k,S,A,U;for(E=m.next_in_index,k=m.avail_in,y=c.bitb,x=c.bitk,S=c.write,A=S=258&&k>=10&&(c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,_=h(f,d,u,p,w,D,c,m),E=m.next_in_index,k=m.avail_in,y=c.bitb,x=c.bitk,S=c.write,A=S>>=r[v+1],x-=r[v+1],g=r[v],g===0){a=r[v+2],t=Gs;break}if((g&16)!==0){l=g&15,n=r[v+2],t=Hs;break}if((g&64)===0){s=g,i=v/3+r[v+2];break}if((g&32)!==0){t=Qr;break}return t=er,m.msg="invalid literal/length code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,c.inflate_flush(m,_);case Hs:for(b=l;x>=b,x-=b,s=d,r=w,i=D,t=js;case js:for(b=s;x>=r[v+1],x-=r[v+1],g=r[v],(g&16)!==0){l=g&15,o=r[v+2],t=Bs;break}if((g&64)===0){s=g,i=v/3+r[v+2];break}return t=er,m.msg="invalid distance code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,c.inflate_flush(m,_);case Bs:for(b=l;x>=b,x-=b,t=Vs;case Vs:for(U=S-o;U<0;)U+=c.end;for(;n!==0;){if(A===0&&(S==c.end&&c.read!==0&&(S=0,A=S7&&(x-=8,k++,E--),c.write=S,_=c.inflate_flush(m,_),S=c.write,A=Sh.avail_out&&(m=h.avail_out),m!==0&&c==bt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m,b==n.end&&(b=0,n.write==n.end&&(n.write=0),m=n.write-b,m>h.avail_out&&(m=h.avail_out),m!==0&&c==bt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m),h.next_out_index=_,n.read=b,c},n.proc=function(h,c){let m,_,b,v,g,y,x,E;for(v=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y>>1){case 0:_>>>=3,b-=3,m=b&7,_>>>=m,b-=m,r=ei;break;case 1:k=[],S=[],A=[[]],U=[[]],_i.inflate_trees_fixed(k,S,A,U),d.init(k[0],S[0],A[0],0,U[0],0),_>>>=3,b-=3,r=tr;break;case 2:_>>>=3,b-=3,r=$s;break;case 3:return _>>>=3,b-=3,r=Vt,h.msg="invalid block type",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c)}break;case ei:for(;b<32;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(v++)&255)<>>16&65535)!=(_&65535))return r=Vt,h.msg="invalid stored block lengths",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);i=_&65535,_=b=0,r=i!==0?zs:u!==0?nr:en;break;case zs:if(g===0||x===0&&(y==n.end&&n.read!==0&&(y=0,x=yg&&(m=g),m>x&&(m=x),n.win.set(h.read_buf(v,m),y),v+=m,g-=m,y+=m,x-=m,(i-=m)!==0)break;r=u!==0?nr:en;break;case $s:for(;b<14;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(v++)&255)<29||(m>>5&31)>29)return r=Vt,h.msg="too many length or distance symbols",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);if(m=258+(m&31)+(m>>5&31),!l||l.length>>=14,b-=14,a=0,r=Ks;case Ks:for(;a<4+(s>>>10);){for(;b<3;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(v++)&255)<>>=3,b-=3}for(;a<19;)l[qs[a++]]=0;if(o[0]=7,m=D.inflate_trees_bits(l,o,f,p,h),m!=J)return c=m,c==ae&&(l=null,r=Vt),n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);a=0,r=Xs;case Xs:for(;m=s,!(a>=258+(m&31)+(m>>5&31));){let j,q;for(m=o[0];b>>=m,b-=m,l[a++]=q;else{for(E=q==18?7:q-14,j=q==18?11:3;b>>=m,b-=m,j+=_&We[E],_>>>=E,b-=E,E=a,m=s,E+j>258+(m&31)+(m>>5&31)||q==16&&E<1)return l=null,r=Vt,h.msg="invalid bit length repeat",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);q=q==16?l[E-1]:0;do l[E++]=q;while(--j!==0);a=E}}if(f[0]=-1,F=[],B=[],N=[],Y=[],F[0]=9,B[0]=6,m=s,m=D.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),l,F,B,N,Y,p,h),m!=J)return m==ae&&(l=null,r=Vt),c=m,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);d.init(F[0],B[0],p,N[0],p,Y[0]),r=tr;case tr:if(n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,(c=d.proc(n,h,c))!=yt)return n.inflate_flush(h,c);if(c=J,d.free(h),v=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y15?(e.inflateEnd(n),Ne):(e.wbits=r,n.istate.blocks=new Kc(n,1<>4)+8>a.wbits){a.mode=Rt,n.msg="invalid win size",a.marker=5;break}a.mode=Qs;case Qs:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,s=n.read_byte(n.next_in_index++)&255,((a.method<<8)+s)%31!==0){a.mode=Rt,n.msg="incorrect header check",a.marker=5;break}if((s&Xc)===0){a.mode=kn;break}a.mode=ea;case ea:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,a.mode=ta;case ta:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,a.mode=na;case na:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,a.mode=ra;case ra:return n.avail_in===0?i:(i=r,n.avail_in--,n.total_in++,a.need+=n.read_byte(n.next_in_index++)&255,a.mode=ti,Uc);case ti:return a.mode=Rt,n.msg="need dictionary",a.marker=0,Ne;case kn:if(i=a.blocks.proc(n,i),i==ae){a.mode=Rt,a.marker=0;break}if(i==J&&(i=r),i!=yt)return i;i=r,a.blocks.reset(n,a.was),a.mode=ia;case ia:return n.avail_in=0,yt;case Rt:return ae;default:return Ne}},e.inflateSetDictionary=function(n,r,i){let s=0,a=i;if(!n||!n.istate||n.istate.mode!=ti)return Ne;const l=n.istate;return a>=1<0&&n.next_in_index!=p&&(o(n.next_in_index),p=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return f.length>1?(u=new Uint8Array(D),f.forEach(function(h){u.set(h,w),w+=h.length})):u=f[0]||new Uint8Array,u}},t.flush=function(){n.inflateEnd()}}const pe=4294967295,ke=65535,wi=8,Ga=0,Za=99,qa=67324752,ji=134695760,rd=ji,gi=33639248,za=101010256,xi=101075792,$a=117853008,an=22,An=20,On=56,id=an+An+On,Ka=1,Xa=39169,Ja=10,Qa=1,Bi=21589,sd=28789,ad=25461,yi=1,od=6,bi=8,vi=2048,ki=16,ld=20,sa=45,aa=51,or="/",oa=new Date(2107,11,31),la=new Date(1980,0,1),fe=void 0,mr="undefined",eo="function";class ca{constructor(t){return class extends TransformStream{constructor(n,r){const i=new t(r);super({transform(s,a){a.enqueue(i.append(s))},flush(s){const a=i.flush();a&&s.enqueue(a)}})}}}}const cd=64;let to=2;try{typeof navigator!=mr&&navigator.hardwareConcurrency&&(to=navigator.hardwareConcurrency)}catch{}const dd={chunkSize:512*1024,maxWorkers:to,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:fe,CompressionStreamNative:typeof CompressionStream!=mr&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=mr&&DecompressionStream},Ft=Object.assign({},dd);function Vi(){return Ft}function no(e){return Math.max(e.chunkSize,cd)}function Gi(e){const{baseURL:t,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:i,useCompressionStream:s,useWebWorkers:a,Deflate:l,Inflate:o,CompressionStream:f,DecompressionStream:d,workerScripts:u}=e;if(Mt("baseURL",t),Mt("chunkSize",n),Mt("maxWorkers",r),Mt("terminateWorkerTimeout",i),Mt("useCompressionStream",s),Mt("useWebWorkers",a),l&&(Ft.CompressionStream=new ca(l)),o&&(Ft.DecompressionStream=new ca(o)),Mt("CompressionStream",f),Mt("DecompressionStream",d),u!==fe){const{deflate:p,inflate:w}=u;if((p||w)&&(Ft.workerScripts||(Ft.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");Ft.workerScripts.deflate=p}if(w){if(!Array.isArray(w))throw new Error("workerScripts.inflate must be an array");Ft.workerScripts.inflate=w}}}function Mt(e,t){t!==fe&&(Ft[e]=t)}const Sn={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin",cap:["cap","pcap"],"cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",javascript:"js",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":"odm","vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-debian-package":["deb","udeb"],"x-director":["dcr","dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-koan":["skp","skd","skt","skm"],"x-kpresenter":["kpr","kpt"],"x-kword":["kwd","kwt"],"x-latex":"latex","x-lha":"lha","x-lyx":"lyx","x-lzh":"lzh","x-lzx":"lzx","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-ms-wmd":"wmd","x-ms-wmz":"wmz","x-msdos-program":["com","exe","bat","dll"],"x-msi":"msi","x-netcdf":["nc","cdf"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":"rpm","x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tcl":"tcl","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-troff":["t","tr","roff"],"x-troff-man":"man","x-troff-me":"me","x-troff-ms":"ms","x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix",json:"json","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":"mathml",mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","x-msdownload":["exe","dll","com","bat","msi"],"x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tads":"gam","x-tex":"tex","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-compressed":"tgz","x-gzip":"gz","x-perfmon":["pma","pmc","pml","pmr","pmw"],"x-pkcs7-mime":["p7c","p7m"],"ynd.ms-pkipko":"pko"},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":["aif","aiff","aifc"],"x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2","x-wav":"wav",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":["mmd","mmod"],"x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":["sd","sdf"],"x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","mpc","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":["val","aso"],"x-pdb":["pdb","ent"],"x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-photoshop":"psd","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",pipeg:"jfif"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":["x3d","x3dz"],"x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:["tm","ts"],"tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{avif:".avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","vrml","wrl","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const t in Sn)if(Sn.hasOwnProperty(t)){for(const n in Sn[t])if(Sn[t].hasOwnProperty(n)){const r=Sn[t][n];if(typeof r=="string")e[r]=t+"/"+n;else for(let i=0;i>>1^3988292384:t=t>>>1;ro[e]=t}class pr{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let r=0,i=t.length|0;r>>8^ro[(n^t[r])&255];this.crc=n}get(){return~this.crc}}class io extends TransformStream{constructor(){const t=new pr;super({transform(n){t.append(n)},flush(n){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t.get()),n.enqueue(r)}})}}function Si(e){if(typeof TextEncoder>"u"){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n0&&t&&(e[n-1]=Fe.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let a=0;a>>t),n=e[a]<<32-t;const i=e.length?e[e.length-1]:0,s=Fe.getPartial(i);return r.push(Fe.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},_r={bytes:{fromBits(e){const n=Fe.bitLength(e)/8,r=new Uint8Array(n);let i;for(let s=0;s>>24,i<<=8;return r},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let l=t.blockSize+r-(t.blockSize+r&t.blockSize-1);l<=i;l+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=Fe.concat(t,[Fe.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r},_S(e,t){return t<>>32-e},_block(e){const t=this,n=t._h,r=Array(80);for(let f=0;f<16;f++)r[f]=e[f];let i=n[0],s=n[1],a=n[2],l=n[3],o=n[4];for(let f=0;f<=79;f++){f>=16&&(r[f]=t._S(1,r[f-3]^r[f-8]^r[f-14]^r[f-16]));const d=t._S(5,i)+t._f(f,s,a,l)+o+r[f]+t._key[Math.floor(f/20)]|0;o=l,l=a,a=t._S(30,s),s=i,i=d}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+l|0,n[4]=n[4]+o|0}};const so={};so.aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,l,o=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),l=[]],s=i;s<4*i+28;s++){let f=a[s-1];(s%i===0||i===8&&s%i===4)&&(f=n[f>>>24]<<24^n[f>>16&255]<<16^n[f>>8&255]<<8^n[f&255],s%i===0&&(f=f<<8^f>>>24^o<<24,o=o<<1^(o>>7)*283)),a[s]=a[s-i]^f}for(let f=0;s;f++,s--){const d=a[f&3?s:s-4];s<=4||f<4?l[f]=d:l[f]=r[0][n[d>>>24]]^r[1][n[d>>16&255]]^r[2][n[d>>8&255]]^r[3][n[d&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,l,o,f;for(let d=0;d<256;d++)s[(i[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!n[d];d^=l||1,a=s[a]||1){let u=a^a<<1^a<<2^a<<3^a<<4;u=u>>8^u&255^99,n[d]=u,r[u]=d,f=i[o=i[l=i[d]]];let p=f*16843009^o*65537^l*257^d*16843008,w=i[u]*257^u*16843008;for(let D=0;D<4;D++)e[D][d]=w=w<<24^w>>>8,t[D][u]=p=p<<24^p>>>8}for(let d=0;d<5;d++)e[d]=e[d].slice(0),t[d]=t[d].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],l=s[1],o=s[2],f=s[3],d=s[4];let u=e[0]^n[0],p=e[t?3:1]^n[1],w=e[2]^n[2],D=e[t?1:3]^n[3],h=4,c,m,_;for(let b=0;b>>24]^l[p>>16&255]^o[w>>8&255]^f[D&255]^n[h],m=a[p>>>24]^l[w>>16&255]^o[D>>8&255]^f[u&255]^n[h+1],_=a[w>>>24]^l[D>>16&255]^o[u>>8&255]^f[p&255]^n[h+2],D=a[D>>>24]^l[u>>16&255]^o[p>>8&255]^f[w&255]^n[h+3],h+=4,u=c,p=m,w=_;for(let b=0;b<4;b++)i[t?3&-b:b]=d[u>>>24]<<24^d[p>>16&255]<<16^d[w>>8&255]<<8^d[D&255]^n[h++],c=u,u=p,p=w,w=D,D=c;return i}};const fd={getRandomValues(e){const t=new Uint32Array(e.buffer),n=r=>{let i=987654321;const s=4294967295;return function(){return i=36969*(i&65535)+(i>>16)&s,r=18e3*(r&65535)+(r>>16)&s,(((i<<16)+r&s)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r>24&255)===255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=Fe.bitLength(t);for(let s=0;s>5)+1<<2;let s,a,l,o,f;const d=new ArrayBuffer(i),u=new DataView(d);let p=0;const w=Fe;for(t=_r.bytes.toBits(t),f=1;p<(i||1);f++){for(s=a=e.encrypt(w.concat(t,[f])),l=1;li&&(e=n.hash(e));for(let s=0;sthis.resolveReady=i),password:t,signed:n,strength:r-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:l,strength:o,resolveReady:f,ready:d}=a;l?(await Dd(a,o,l,qe(i,0,Fn[o]+2)),i=qe(i,Fn[o]+2),f()):await d;const u=new Uint8Array(i.length-It-(i.length-It)%on);s.enqueue(_o(a,i,u,0,It,!0))},async flush(i){const{signed:s,ctr:a,hmac:l,pending:o,ready:f}=this;await f;const d=qe(o,0,o.length-It),u=qe(o,o.length-It);let p=new Uint8Array;if(d.length){const w=Cn(lt,d);l.update(w);const D=a.update(w);p=Ln(lt,D)}if(s){const w=qe(Ln(lt,l.digest()),0,It);for(let D=0;Dthis.resolveReady=i),password:t,strength:n-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:l,strength:o,resolveReady:f,ready:d}=a;let u=new Uint8Array;l?(u=await Td(a,o,l),f()):await d;const p=new Uint8Array(u.length+i.length-i.length%on);p.set(u,0),s.enqueue(_o(a,i,p,u.length,0))},async flush(i){const{ctr:s,hmac:a,pending:l,ready:o}=this;await o;let f=new Uint8Array;if(l.length){const d=s.update(Cn(lt,l));a.update(d),f=Ln(lt,d)}r.signature=Ln(lt,a.digest()).slice(0,It),i.enqueue(qi(f,r.signature))}}),r=this}}function _o(e,t,n,r,i,s){const{ctr:a,hmac:l,pending:o}=e,f=t.length-i;o.length&&(t=qi(o,t),n=Rd(n,f-f%on));let d;for(d=0;d<=f-on;d+=on){const u=Cn(lt,qe(t,d,d+on));s&&l.update(u);const p=a.update(u);s||l.update(p),n.set(Ln(lt,p),d+r)}return e.pending=qe(t,d),n}async function Dd(e,t,n,r){const i=await wo(e,t,n,qe(r,0,Fn[t])),s=qe(r,Fn[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new Error(oo)}async function Td(e,t,n){const r=co(new Uint8Array(Fn[t])),i=await wo(e,t,n,r);return qi(r,i)}async function wo(e,t,n,r){e.password=null;const i=Si(n),s=await Ad(hd,i,_d,!1,wd),a=await Od(Object.assign({salt:r},uo),s,8*(En[t]*2+2)),l=new Uint8Array(a),o=Cn(lt,qe(l,0,En[t])),f=Cn(lt,qe(l,En[t],En[t]*2)),d=qe(l,En[t]*2);return Object.assign(e,{keys:{key:o,authentication:f,passwordVerification:d},ctr:new vd(new bd(o),Array.from(gd)),hmac:new kd(f)}),d}function Ad(e,t,n,r,i){return xd?Wn.importKey(e,t,n,r,i):Yn.importKey(t)}async function Od(e,t,n){return yd?await Wn.deriveBits(e,t,n):Yn.pbkdf2(t,e.salt,uo.iterations,n)}function qi(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Rd(e,t){if(t&&t>e.length){const n=e;e=new Uint8Array(t),e.set(n,0)}return e}function qe(e,t,n){return e.subarray(t,n)}function Ln(e,t){return e.fromBits(t)}function Cn(e,t){return e.toBits(t)}const cn=12;class Md extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),go(this,t)},transform(r,i){const s=this;if(s.password){const a=da(s,r.subarray(0,cn));if(s.password=null,a[cn-1]!=s.passwordVerification)throw new Error(oo);r=r.subarray(cn)}i.enqueue(da(s,r))}})}}class Id extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),go(this,t)},transform(r,i){const s=this;let a,l;if(s.password){s.password=null;const o=co(new Uint8Array(cn));o[cn-1]=s.passwordVerification,a=new Uint8Array(r.length+o.length),a.set(fa(s,o),0),l=cn}else a=new Uint8Array(r.length),l=0;a.set(fa(s,r),l),i.enqueue(a)}})}}function da(e,t){const n=new Uint8Array(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function xo(e){const t=e.keys[2]|2;return yo(Math.imul(t,t^1)>>>8)}function yo(e){return e&255}function ua(e){return e&4294967295}const ha="deflate-raw";class Fd extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:r,CompressionStreamNative:i}){super({});const{compressed:s,encrypted:a,useCompressionStream:l,zipCrypto:o,signed:f,level:d}=t,u=this;let p,w,D=bo(super.readable);(!a||o)&&f&&([D,p]=D.tee(),p=ct(p,new io)),s&&(D=ko(D,l,{level:d,chunkSize:n},i,r)),a&&(o?D=ct(D,new Id(t)):(w=new Ed(t),D=ct(D,w))),vo(u,D,async()=>{let h;a&&!o&&(h=w.signature),(!a||o)&&f&&(h=await p.getReader().read(),h=new DataView(h.value.buffer).getUint32(0)),u.signature=h})}}class Ld extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:r,DecompressionStreamNative:i}){super({});const{zipCrypto:s,encrypted:a,signed:l,signature:o,compressed:f,useCompressionStream:d}=t;let u,p,w=bo(super.readable);a&&(s?w=ct(w,new Md(t)):(p=new Sd(t),w=ct(w,p))),f&&(w=ko(w,d,{chunkSize:n},i,r)),(!a||s)&&l&&([w,u]=w.tee(),u=ct(u,new io)),vo(this,w,async()=>{if((!a||s)&&l){const D=await u.getReader().read(),h=new DataView(D.value.buffer);if(o!=h.getUint32(0,!1))throw new Error(lo)}})}}function bo(e){return ct(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function vo(e,t,n){t=ct(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function ko(e,t,n,r,i){try{const s=t&&r?r:i;e=ct(e,new s(ha,n))}catch(s){if(t)e=ct(e,new i(ha,n));else throw s}return e}function ct(e,t){return e.pipeThrough(t)}const Cd="message",Nd="start",Pd="pull",ma="data",Ud="ack",Yd="close",So="deflate",Eo="inflate";class Wd extends TransformStream{constructor(t,n){super({});const r=this,{codecType:i}=t;let s;i.startsWith(So)?s=Fd:i.startsWith(Eo)&&(s=Ld);let a=0;const l=new s(t,n),o=super.readable,f=new TransformStream({transform(d,u){d&&d.length&&(a+=d.length,u.enqueue(d))},flush(){const{signature:d}=l;Object.assign(r,{signature:d,size:a})}});Object.defineProperty(r,"readable",{get(){return o.pipeThrough(l).pipeThrough(f)}})}}const Hd=typeof Worker!=mr;class ni{constructor(t,{readable:n,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:l,transferStreams:o,scripts:f},d){const{signal:u}=a;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new jd(n,a,s),{signal:u}),writable:r,options:Object.assign({},i),scripts:f,transferStreams:o,terminate(){const{worker:p,busy:w}=t;p&&!w&&(p.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,d(t)}}),(l&&Hd?Vd:Bd)(t,s)}}class jd extends TransformStream{constructor(t,{onstart:n,onprogress:r,size:i,onend:s},{chunkSize:a}){let l=0;super({start(){n&&ri(n,i)},async transform(o,f){l+=o.length,r&&await ri(r,l,i),f.enqueue(o)},flush(){t.size=l,s&&ri(s,l)}},{highWaterMark:1,size:()=>a})}}async function ri(e,...t){try{await e(...t)}catch{}}function Bd(e,t){return{run:()=>Gd(e,t)}}function Vd(e,{baseURL:t,chunkSize:n}){return e.interface||Object.assign(e,{worker:zd(e.scripts[0],t,e),interface:{run:()=>Zd(e,{chunkSize:n})}}),e.interface}async function Gd({options:e,readable:t,writable:n,onTaskFinished:r},i){const s=new Wd(e,i);try{await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,size:l}=s;return{signature:a,size:l}}finally{r()}}async function Zd(e,t){let n,r;const i=new Promise((p,w)=>{n=p,r=w});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});const{readable:s,options:a,scripts:l}=e,{writable:o,closed:f}=qd(e.writable);Ei({type:Nd,scripts:l.slice(1),options:a,config:t,readable:s,writable:o},e)||Object.assign(e,{reader:s.getReader(),writer:o.getWriter()});const u=await i;try{await o.close()}catch{}return await f,u}function qd(e){const t=e.getWriter();let n;const r=new Promise(s=>n=s);return{writable:new WritableStream({async write(s){await t.ready,await t.write(s)},close(){t.releaseLock(),n()},abort(s){return t.abort(s)}}),closed:r}}let pa=!0,_a=!0;function zd(e,t,n){const r={type:"module"};let i,s;typeof e==eo&&(e=e());try{i=new URL(e,t)}catch{i=e}if(pa)try{s=new Worker(i)}catch{pa=!1,s=new Worker(i,r)}else s=new Worker(i,r);return s.addEventListener(Cd,a=>$d(a,n)),s}function Ei(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:s,readable:a,writable:l}=e;const o=[];if(s){const{buffer:f,length:d}=s;d!=f.byteLength&&(s=new Uint8Array(s)),e.value=s.buffer,o.push(e.value)}if(i&&_a?(a&&o.push(a),l&&o.push(l)):e.readable=e.writable=null,o.length)try{return t.postMessage(e,o),!0}catch{_a=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(s){throw n&&n.releaseLock(),r(),s}}async function $d({data:e},t){const{type:n,value:r,messageId:i,result:s,error:a}=e,{reader:l,writer:o,resolveResult:f,rejectResult:d,onTaskFinished:u}=t;try{if(a){const{message:w,stack:D,code:h,name:c}=a,m=new Error(w);Object.assign(m,{stack:D,code:h,name:c}),p(m)}else{if(n==Pd){const{value:w,done:D}=await l.read();Ei({type:ma,value:w,done:D,messageId:i},t)}n==ma&&(await o.ready,await o.write(new Uint8Array(r)),Ei({type:Ud,messageId:i},t)),n==Yd&&p(null,s)}}catch(w){p(w)}function p(w,D){w?d(w):f(D),o&&o.releaseLock(),u()}}let Gt=[];const ii=[];let wa=0;async function Do(e,t){const{options:n,config:r}=t,{transferStreams:i,useWebWorkers:s,useCompressionStream:a,codecType:l,compressed:o,signed:f,encrypted:d}=n,{workerScripts:u,maxWorkers:p,terminateWorkerTimeout:w}=r;t.transferStreams=i||i===fe;const D=!o&&!f&&!d&&!t.transferStreams;t.useWebWorkers=!D&&(s||s===fe&&r.useWebWorkers),t.scripts=t.useWebWorkers&&u?u[l]:[],n.useCompressionStream=a||a===fe&&r.useCompressionStream;let h;const c=Gt.find(_=>!_.busy);if(c)ga(c),h=new ni(c,e,t,m);else if(Gt.lengthii.push({resolve:_,stream:e,workerOptions:t}));return h.run();function m(_){if(ii.length){const[{resolve:b,stream:v,workerOptions:g}]=ii.splice(0,1);b(new ni(_,v,g,m))}else _.worker?(ga(_),Number.isFinite(w)&&w>=0&&(_.terminateTimeout=setTimeout(()=>{Gt=Gt.filter(b=>b!=_),_.terminate()},w))):Gt=Gt.filter(b=>b!=_)}}function ga(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function Kd(e){const t=()=>URL.createObjectURL(new Blob([`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:"PBKDF2"},B=t.assign({hash:{name:"HMAC"}},R),E=t.assign({iterations:1e3,hash:{name:"SHA-1"}},R),M=["deriveBits"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&"function"==typeof T.importKey,L=N&&W&&"function"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s("Invalid password")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s("Invalid signature")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey("raw",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s("Invalid password");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s("Invalid signature")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)("deflate-raw",n))}catch(r){if(!t)throw r;e=pe(e,new s("deflate-raw",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=le:s.startsWith("inflate")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:"pull",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:"data",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:"close",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&ke(e),"data"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe="oversubscribed dynamic bit lengths tree":-5!=a&&0!==r[0]||(f.Oe="incomplete dynamic bit lengths tree",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe="oversubscribed literal/length tree":-4!=h&&(w.Oe="incomplete literal/length tree",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe="oversubscribed distance tree":-5==h?(w.Oe="incomplete distance tree",h=-3):-4!=h&&(w.Oe="empty distance tree with lengths",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe="invalid distance code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe="invalid literal/length code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe="invalid literal/length code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe="invalid distance code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe="invalid block type",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe="invalid stored block lengths",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe="too many length or distance symbols",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe="invalid bit length repeat",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe="need dictionary",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye}; +`],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}const To="HTTP error ",Rr="HTTP Range not supported",Xd="Writer iterator completed too soon",Jd="text/plain",Qd="Content-Length",ef="Content-Range",tf="Accept-Ranges",nf="Range",rf="Content-Type",sf="HEAD",$i="GET",Ao="bytes",af=64*1024,Ki="writable";class Mr{constructor(){this.size=0}init(){this.initialized=!0}}class Yt extends Mr{get readable(){const t=this,{chunkSize:n=af}=t,r=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:s=0,size:a,diskNumberStart:l}=r,{chunkOffset:o}=this;i.enqueue(await Ie(t,s+o,Math.min(n,a-o),l)),o+n>a?i.close():this.chunkOffset+=n}});return r}}class Oo extends Mr{constructor(){super();const t=this,n=new WritableStream({write(r){return t.writeUint8Array(r)}});Object.defineProperty(t,Ki,{get(){return n}})}writeUint8Array(){}}class Di extends Yt{constructor(t){super();let n=t.length;for(;t.charAt(n-1)=="=";)n--;const r=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:r,size:Math.floor((n-r)*.75)})}readUint8Array(t,n){const{dataStart:r,dataURI:i}=this,s=new Uint8Array(n),a=Math.floor(t/3)*4,l=atob(i.substring(a+r,Math.ceil((t+n)/3)*4+r)),o=t-Math.floor(a/4)*3;for(let f=o;f2?n.data+=btoa(i):n.pending=i}getData(){return this.data+btoa(this.pending)}}class mn extends Yt{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){const r=this;return new Uint8Array(await r.blob.slice(t,t+n).arrayBuffer())}}class Kt extends Mr{constructor(t){super();const n=this,r=new TransformStream,i=[];t&&i.push([rf,t]),Object.defineProperty(n,Ki,{get(){return r.writable}}),n.blob=new Response(r.readable,{headers:i}).blob()}getData(){return this.blob}}class Ro extends mn{constructor(t){super(new Blob([t],{type:Jd}))}}class Ti extends Kt{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:n}=this,r=await super.getData();if(r.text&&n)return r.text();{const i=new FileReader;return new Promise((s,a)=>{Object.assign(i,{onload:({target:l})=>s(l.result),onerror:()=>a(i.error)}),i.readAsText(r,t)})}}}class of extends Yt{constructor(t,n){super(),Mo(this,t,n)}async init(){super.init(),await Io(this,Ai,xa)}readUint8Array(t,n){return Fo(this,t,n,Ai,xa)}}class lf extends Yt{constructor(t,n){super(),Mo(this,t,n)}async init(){super.init(),await Io(this,Oi,ya)}readUint8Array(t,n){return Fo(this,t,n,Oi,ya)}}function Mo(e,t,n){const{preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s}=n;n=Object.assign({},n),delete n.preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.useXHR,Object.assign(e,{url:t,options:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s})}async function Io(e,t,n){const{url:r,useRangeHeader:i,forceRangeRequests:s}=e;if(df(r)&&(i||s)){const{headers:a}=await t($i,e,Lo(e));if(!s&&a.get(tf)!=Ao)throw new Error(Rr);{let l;const o=a.get(ef);if(o){const f=o.trim().split(/\s*\/\s*/);if(f.length){const d=f[1];d&&d!="*"&&(l=Number(d))}}l===fe?await ba(e,t,n):e.size=l}}else await ba(e,t,n)}async function Fo(e,t,n,r,i){const{data:s,useRangeHeader:a,forceRangeRequests:l,options:o}=e;if(a||l){const f=await r($i,e,Lo(e,t,n));if(f.status!=206)throw new Error(Rr);return new Uint8Array(await f.arrayBuffer())}else return s||await i(e,o),new Uint8Array(s.subarray(t,t+n))}function Lo(e,t=0,n=1){return Object.assign({},Xi(e),{[nf]:Ao+"="+t+"-"+(t+n-1)})}function Xi({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function xa(e){await Co(e,Ai)}async function ya(e){await Co(e,Oi)}async function Co(e,t){const n=await t($i,e,Xi(e));e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function ba(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t(sf,e,Xi(e))).headers.get(Qd);i?e.size=Number(i):await n(e,e.options)}}async function Ai(e,{options:t,url:n},r){const i=await fetch(n,Object.assign({},t,{method:e,headers:r}));if(i.status<400)return i;throw i.status==416?new Error(Rr):new Error(To+(i.statusText||i.status))}function Oi(e,{url:t},n){return new Promise((r,i)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",()=>{if(s.status<400){const a=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(l=>{const o=l.trim().split(/\s*:\s*/);o[0]=o[0].trim().replace(/^[a-z]|-[a-z]/g,f=>f.toUpperCase()),a.push(o)}),r({status:s.status,arrayBuffer:()=>s.response,headers:new Map(a)})}else i(s.status==416?new Error(Rr):new Error(To+(s.statusText||s.status)))},!1),s.addEventListener("error",a=>i(a.detail.error),!1),s.open(e,t),n)for(const a of Object.entries(n))s.setRequestHeader(a[0],a[1]);s.responseType="arraybuffer",s.send()})}class va extends Yt{constructor(t,n={}){super(),Object.assign(this,{url:t,reader:n.useXHR?new lf(t,n):new of(t,n)})}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(t,n){return this.reader.readUint8Array(t,n)}}class Ri extends Yt{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,n){return this.array.slice(t,t+n)}}class gr extends Oo{init(t=0){super.init(),Object.assign(this,{offset:0,array:new Uint8Array(t)})}writeUint8Array(t){const n=this;if(n.offset+t.length>n.array.length){const r=n.array;n.array=new Uint8Array(r.length+t.length),n.array.set(r)}n.array.set(t,n.offset),n.offset+=t.length}getData(){return this.array}}class cf extends Yt{constructor(t){super(),this.readers=t}async init(){super.init();const t=this,{readers:n}=t;t.lastDiskNumber=0,await Promise.all(n.map(async r=>{await r.init(),t.size+=r.size}))}async readUint8Array(t,n,r=0){const i=this,{readers:s}=this;let a,l=r;l==-1&&(l=s.length-1);let o=t;for(;o>=s[l].size;)o-=s[l].size,l++;const f=s[l],d=f.size;if(o+n<=d)a=await Ie(f,o,n);else{const u=d-o;a=new Uint8Array(n),a.set(await Ie(f,o,u)),a.set(await i.readUint8Array(t+u,n-u,r),u)}return i.lastDiskNumber=Math.max(l,i.lastDiskNumber),a}}class ka extends Mr{constructor(t,n=4294967296){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,availableSize:n});let i,s,a;const l=new WritableStream({async write(d){if(a)if(i.size+d.length>=n){const u=n-i.size;await o(d.slice(0,u)),await f(),r.diskOffset+=i.size,r.diskNumber++,a=null,await this.write(d.slice(u))}else d.length&&await o(d),r.availableSize=n-i.size;else{const{value:u,done:p}=await t.next();if(p&&!u)throw new Error(Xd);i=u,i.size=0,s=u.writable,a=s.getWriter(),await this.write(d)}},async close(){await a.ready,await f()}});Object.defineProperty(r,Ki,{get(){return l}});async function o(d){await a.ready,await a.write(d),i.size+=d.length,r.size+=d.length}async function f(){s.size=i.size,await a.close()}}}function df(e){const{baseURL:t}=Vi(),{protocol:n}=new URL(e,t);return n=="http:"||n=="https:"}async function ze(e,t){e.init&&!e.initialized&&await e.init(t)}function Ie(e,t,n,r){return e.readUint8Array(t,n,r)}const No="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),ff=No.length==256;function uf(e){if(ff){let t="";for(let n=0;nthis[n]=t[n])}}const si="File format is not recognized",_f="End of central directory not found",wf="End of Zip64 central directory not found",gf="End of Zip64 central directory locator not found",xf="Central directory header not found",yf="Local file header not found",bf="Zip64 extra field not found",vf="File contains encrypted entry",kf="Encryption method not supported",Sa="Compression method not supported",Ea="Split zip file",Da="utf-8",Ta="cp437",Sf=[[Ho,pe],[jo,pe],[Bo,pe],[Ii,ke]],Ef={[ke]:{getValue:_e,bytes:4},[pe]:{getValue:lr,bytes:8}};class Df{constructor(t,n={}){t instanceof ReadableStream&&(t={readable:t}),Object.assign(this,{reader:t,options:n,config:Vi()})}async*getEntriesGenerator(t={}){const n=this;let{reader:r}=n;const{config:i}=n;if(await ze(r),(r.size===fe||!r.readUint8Array)&&(Array.isArray(r)?r=new cf(r):r=new mn(await new Response(r.readable).blob()),await ze(r)),r.size=r.size)throw new Error(si);let _=0,b=await Ie(r,o,l,D),v=Te(b);if(l){const k=s.offset-l;if(_e(v,_)!=gi&&o!=k){const S=o;o=k,c=o-S,b=await Ie(r,o,l,D),v=Te(b)}}if(o<0||o>=r.size)throw new Error(si);const g=tt(n,t,"filenameEncoding"),y=tt(n,t,"commentEncoding");for(let k=0;kS.getData(mt,Ht,jt),_=we;const{onprogress:Dt}=t;if(Dt)try{await Dt(k+1,h,new xr(S))}catch{}yield Ht}const x=tt(n,t,"extractPrependedData"),E=tt(n,t,"extractAppendedData");return x&&(n.prependedData=m>0?await Ie(r,0,m):new Uint8Array),n.comment=d?await Ie(r,f+an,d):new Uint8Array,E&&(n.appendedData=u>>8&255:p>>>24&255),signature:p,compressed:f!=0,encrypted:v,useWebWorkers:tt(i,r,"useWebWorkers"),useCompressionStream:tt(i,r,"useCompressionStream"),transferStreams:tt(i,r,"transferStreams")},config:d,streamOptions:{signal:S,size:E,onstart:A,onprogress:U,onend:F}};return k.size+=(await Do({readable:x,writable:k},B)).size,tt(i,r,"preventClose")||await k.close(),t.getData?t.getData():k}}function $o(e,t,n){const r=e.rawBitFlag=be(t,n+2),i=(r&yi)==yi,s=_e(t,n+6);Object.assign(e,{encrypted:i,version:be(t,n),bitFlag:{level:(r&od)>>1,dataDescriptor:(r&bi)==bi,languageEncodingFlag:(r&vi)==vi},rawLastModDate:s,lastModDate:Ff(s),filenameLength:be(t,n+22),extraFieldLength:be(t,n+24)})}async function Ko(e,t,n,r){const{rawExtraField:i}=t,s=t.extraField=new Map,a=Te(new Uint8Array(i));let l=0;try{for(;lt[i]==s);for(let i=0,s=0;i{if(e.data.length>=a+4){const f=_e(n,a);t[l]=e[l]=new Date(f*1e3);const d=s[o];e[d]=f}a+=4})}async function If(e,t,n,r,i){const s=new Uint8Array(4),a=Te(s);Lf(a,0,t);const l=r+i;return await o(r)||await o(Math.min(l,n));async function o(f){const d=n-f,u=await Ie(e,d,f);for(let p=u.length-r;p>=0;p--)if(u[p]==s[0]&&u[p+1]==s[1]&&u[p+2]==s[2]&&u[p+3]==s[3])return{offset:d+p,buffer:u.slice(p,p+r).buffer}}}function tt(e,t,n){return t[n]===fe?e.options[n]:t[n]}function Ff(e){const t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function ai(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function dn(e,t){return e.getUint8(t)}function be(e,t){return e.getUint16(t,!0)}function _e(e,t){return e.getUint32(t,!0)}function lr(e,t){return Number(e.getBigUint64(t,!0))}function Lf(e,t,n){e.setUint32(t,n,!0)}function Te(e){return new DataView(e.buffer)}const Cf="File already exists",Nf="Zip file comment exceeds 64KB",Pf="File entry comment exceeds 64KB",Uf="File entry name exceeds 64KB",Oa="Version exceeds 65535",Yf="The strength must equal 1, 2, or 3",Wf="Extra field type exceeds 65535",Hf="Extra field data exceeds 64KB",ts="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Ra=new Uint8Array([7,0,2,0,65,69,3,0,0]),Xo=28;let oi=0;const Ma=[];class jf{constructor(t,n={}){t.writable===fe&&typeof t.next==eo&&(t=new ka(t)),t instanceof WritableStream&&(t={writable:t}),t.writable.size===fe&&(t.writable.size=0);const r=t instanceof ka;r||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0}),Object.assign(this,{writer:t,addSplitZipSignature:r,options:n,config:Vi(),files:new Map,filenames:new Set,offset:t.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set})}async add(t="",n,r={}){const i=this,{pendingAddFileCalls:s,config:a}=i;oiMa.push(o));let l;try{if(t=t.trim(),i.filenames.has(t))throw new Error(Cf);return i.filenames.add(t),l=Bf(i,t,n,r),s.add(l),await l}catch(o){throw i.filenames.delete(t),o}finally{s.delete(l);const o=Ma.shift();o?o():oi--}}async close(t=new Uint8Array,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:s}=i;for(;r.size;)await Promise.all(Array.from(r));return await Xf(this,t,n),!i.preventClose&&!n.preventClose&&await s.close(),i.getData?i.getData():s}}async function Bf(e,t,n,r){t=t.trim(),r.directory&&!t.endsWith(or)?t+=or:r.directory=t.endsWith(or);const i=Si(t);if(ee(i)>ke)throw new Error(Uf);const s=r.comment||"",a=Si(s);if(ee(a)>ke)throw new Error(Pf);const l=e.options.version||r.version||0;if(l>ke)throw new Error(Oa);const o=e.options.versionMadeBy||r.versionMadeBy||20;if(o>ke)throw new Error(Oa);const f=xe(e,r,Ji)||new Date,d=xe(e,r,Qi),u=xe(e,r,es),p=xe(e,r,"password"),w=xe(e,r,"encryptionStrength")||3,D=xe(e,r,"zipCrypto");if(p!==fe&&w!==fe&&(w<1||w>3))throw new Error(Yf);let h=new Uint8Array;const{extraField:c}=r;if(c){let he=0,V=0;c.forEach(Z=>he+=4+ee(Z)),h=new Uint8Array(he),c.forEach((Z,Se)=>{if(Se>ke)throw new Error(Wf);if(ee(Z)>ke)throw new Error(Hf);ve(h,new Uint16Array([Se]),V),ve(h,new Uint16Array([ee(Z)]),V+2),ve(h,Z,V+4),V+=4+ee(Z)})}let m=xe(e,r,"extendedTimestamp");m===fe&&(m=!0);let _=0,b=0,v=xe(e,r,"keepOrder");v===fe&&(v=!0);let g=0,y=xe(e,r,qo);y===fe&&(y=!0);const x=xe(e,r,Go)||0,E=xe(e,r,Zo)||0;let k=xe(e,r,zo);n&&(n instanceof ReadableStream&&(n={readable:n}),await ze(n),n.size===fe?(r.dataDescriptor=!0,(k||k===fe)&&(k=!0,_=pe)):(g=n.size,_=Qf(g)));const{diskOffset:S}=e.writer;if(e.offset+e.pendingEntriesSize-S>=pe||g>=pe||_>=pe){if(k===!1||!v)throw new Error(ts);k=!0}k=k||!1;const A=xe(e,r,"level"),U=xe(e,r,"useWebWorkers"),F=xe(e,r,"bufferedWrite");let B=xe(e,r,"dataDescriptor"),N=xe(e,r,"dataDescriptorSignature");const Y=xe(e,r,"signal"),j=xe(e,r,"useCompressionStream");B===fe&&(B=!0),B&&N===fe&&(N=!1),r=Object.assign({},r,{rawFilename:i,rawComment:a,version:l,versionMadeBy:o,lastModDate:f,lastAccessDate:d,creationDate:u,rawExtraField:h,zip64:k,password:p,level:A,useWebWorkers:U,encryptionStrength:w,extendedTimestamp:m,zipCrypto:D,bufferedWrite:F,keepOrder:v,dataDescriptor:B,dataDescriptorSignature:N,signal:Y,msDosCompatible:y,internalFileAttribute:x,externalFileAttribute:E,useCompressionStream:j});const q=Zf(r),we=qf(r);b=ee(q.localHeaderArray,we.dataDescriptorArray)+_,e.pendingEntriesSize+=b;let W;try{W=await Vf(e,t,n,{headerInfo:q,dataDescriptorInfo:we},r)}finally{e.pendingEntriesSize-=b}return Object.assign(W,{name:t,comment:s,extraField:c}),new xr(W)}async function Vf(e,t,n,r,i){const{files:s,writer:a}=e,{keepOrder:l,dataDescriptor:o,signal:f}=i,d=Array.from(s.values()).pop();let u={},p,w,D,h,c,m;s.set(t,u);try{let v;l&&(v=d&&d.lock,_()),i.bufferedWrite||e.lockWriter||!o?(m=new Kt,m.writable.size=0,p=!0,await ze(a)):(m=a,e.lockWriter=Promise.resolve(),w=()=>delete e.lockWriter),await ze(m);const{writable:g,diskNumber:y}=a;let{diskOffset:x}=a;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const E=new Uint8Array(4),k=He(E);Q(k,0,ji),await Nt(g,E),e.offset+=4}if(p||await v,c=!0,u.diskNumberStart=y,u=await Gf(n,m,u,r,e.config,i),c=!1,s.set(t,u),u.filename=t,p){await m.writable.close();let E=await m.getData();await v,await b(),h=!0,o||(E=await $f(u,E,g,i)),u.diskNumberStart=a.diskNumber,x=a.diskOffset,await E.stream().pipeTo(g,{preventClose:!0,signal:f}),g.size+=E.size,h=!1}if(u.offset=e.offset-x,u.zip64)Kf(u);else if(u.offset>=pe)throw new Error(ts);return e.offset+=u.length,u}catch(v){throw(p&&h||!p&&c)&&(e.hasCorruptedEntries=!0,v&&(v.corruptedEntry=!0),p?e.offset+=m.writable.size:e.offset=m.writable.size),s.delete(t),v}finally{D&&D(),w&&w()}function _(){u.lock=new Promise(v=>D=v)}async function b(){const{lockWriter:v}=e;if(v)return await v.then(()=>delete e.lockWriter),b();e.lockWriter=new Promise(g=>w=g)}}async function Gf(e,t,{diskNumberStart:n,lock:r},i,s,a){const{headerInfo:l,dataDescriptorInfo:o}=i,{localHeaderArray:f,headerArray:d,lastModDate:u,rawLastModDate:p,encrypted:w,compressed:D,version:h,compressionMethod:c,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b}=l,{dataDescriptorArray:v}=o,{rawFilename:g,lastAccessDate:y,creationDate:x,password:E,level:k,zip64:S,zipCrypto:A,dataDescriptor:U,directory:F,versionMadeBy:B,rawComment:N,rawExtraField:Y,useWebWorkers:j,onstart:q,onprogress:we,onend:W,signal:he,encryptionStrength:V,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,useCompressionStream:Ht}=a,Dt={lock:r,versionMadeBy:B,zip64:S,directory:Boolean(F),filenameUTF8:!0,rawFilename:g,commentUTF8:!0,rawComment:N,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b,rawExtraField:Y,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,diskNumberStart:n};let mt=0,jt=0,wn;const{writable:Ve}=t;if(e){e.chunkSize=no(s),await Nt(Ve,f);const gn=e.readable,Ee=gn.size=e.size,Ue={options:{codecType:So,level:k,password:E,encryptionStrength:V,zipCrypto:w&&A,passwordVerification:w&&A&&p>>8&255,signed:!0,compressed:D,encrypted:w,useWebWorkers:j,useCompressionStream:Ht,transferStreams:!1},config:s,streamOptions:{signal:he,size:Ee,onstart:q,onprogress:we,onend:W}},Jt=await Do({readable:gn,writable:Ve},Ue);Ve.size+=Jt.size,wn=Jt.signature,jt=e.size=gn.size,mt=Jt.size}else await Nt(Ve,f);const Tt=S?new Uint8Array(Xo+4):new Uint8Array;return e&&zf({signature:wn,rawExtraFieldZip64:Tt,compressedSize:mt,uncompressedSize:jt,headerInfo:l,dataDescriptorInfo:o},a),U&&await Nt(Ve,v),Object.assign(Dt,{compressedSize:mt,lastModDate:u,rawLastModDate:p,creationDate:x,lastAccessDate:y,encrypted:w,length:ee(f,v)+mt,compressionMethod:c,version:h,headerArray:d,signature:wn,rawExtraFieldZip64:Tt}),Dt}function Zf(e){const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,password:s,level:a,zip64:l,zipCrypto:o,dataDescriptor:f,directory:d,rawExtraField:u,encryptionStrength:p,extendedTimestamp:w}=e,D=a!==0&&!d,h=Boolean(s&&ee(s));let c;if(h&&!o){c=new Uint8Array(ee(Ra)+2);const N=He(c);re(N,0,Xa),ve(c,Ra,2),yr(N,8,p)}else c=new Uint8Array;let m,_;if(w){_=new Uint8Array(9+(r?4:0)+(i?4:0));const N=He(_);re(N,0,Bi),re(N,2,ee(_)-4);const Y=1+(r?2:0)+(i?4:0);yr(N,4,Y),Q(N,5,Math.floor(n.getTime()/1e3)),r&&Q(N,9,Math.floor(r.getTime()/1e3)),i&&Q(N,13,Math.floor(i.getTime()/1e3));try{m=new Uint8Array(36);const j=He(m),q=li(n);re(j,0,Ja),re(j,2,32),re(j,8,Qa),re(j,10,24),Pe(j,12,q),Pe(j,20,li(r)||q),Pe(j,28,li(i)||q)}catch{m=new Uint8Array}}else m=_=new Uint8Array;let b=vi;f&&(b=b|bi);let v=Ga;D&&(v=wi);let g=e.version||ld;l&&(g=g>sa?g:sa),h&&(b=b|yi,o||(g=g>aa?g:aa,v=Za,D&&(c[9]=wi)));const y=new Uint8Array(26),x=He(y);re(x,0,g),re(x,2,b),re(x,4,v);const E=new Uint32Array(1),k=He(E);let S;noa?S=oa:S=n,re(k,0,(S.getHours()<<6|S.getMinutes())<<5|S.getSeconds()/2),re(k,2,(S.getFullYear()-1980<<4|S.getMonth()+1)<<5|S.getDate());const A=E[0];Q(x,6,A),re(x,22,ee(t));const U=ee(c,_,m,u);re(x,24,U);const F=new Uint8Array(30+ee(t)+U),B=He(F);return Q(B,0,qa),ve(F,y,4),ve(F,t,30),ve(F,c,30+ee(t)),ve(F,_,30+ee(t,c)),ve(F,m,30+ee(t,c,_)),ve(F,u,30+ee(t,c,_,m)),{localHeaderArray:F,headerArray:y,headerView:x,lastModDate:n,rawLastModDate:A,encrypted:h,compressed:D,version:g,compressionMethod:v,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:m,rawExtraFieldAES:c}}function qf(e){const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i=new Uint8Array,s,a=0;return n&&(i=new Uint8Array(t?r?24:20:r?16:12),s=He(i),r&&(a=4,Q(s,0,rd))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}}function zf(e,t){const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:s,headerInfo:a,dataDescriptorInfo:l}=e,{headerView:o,encrypted:f}=a,{dataDescriptorView:d,dataDescriptorOffset:u}=l,{zip64:p,zipCrypto:w,dataDescriptor:D}=t;if((!f||w)&&n!==fe&&(Q(o,10,n),D&&Q(d,u,n)),p){const h=He(r);re(h,0,Ka),re(h,2,Xo),Q(o,14,pe),Pe(h,12,BigInt(i)),Q(o,18,pe),Pe(h,4,BigInt(s)),D&&(Pe(d,u+4,BigInt(i)),Pe(d,u+12,BigInt(s)))}else Q(o,14,i),Q(o,18,s),D&&(Q(d,u+4,i),Q(d,u+8,s))}async function $f(e,t,n,{zipCrypto:r}){const i=await Jf(t,0,26),s=new DataView(i);return(!e.encrypted||r)&&Q(s,14,e.signature),e.zip64?(Q(s,18,pe),Q(s,22,pe)):(Q(s,18,e.compressedSize),Q(s,22,e.uncompressedSize)),await Nt(n,new Uint8Array(i)),t.slice(i.byteLength)}function Kf(e){const{rawExtraFieldZip64:t,offset:n,diskNumberStart:r}=e,i=He(t);Pe(i,20,BigInt(n)),Q(i,28,r)}async function Xf(e,t,n){const{files:r,writer:i}=e;let s=0,a=0;const{diskOffset:l,writable:o}=i;let{diskNumber:f}=i,d=e.offset-l,u=r.size;for(const[,{rawFilename:v,rawExtraFieldZip64:g,rawExtraFieldAES:y,rawExtraField:x,rawComment:E,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:S}]of r)a+=46+ee(v,E,g,y,k,S,x);let p=n.zip64||e.options.zip64||!1;if(d>=pe||a>=pe||u>=ke){if(n.zip64===!1||e.options.zip64===!1)throw new Error(ts);p=!0}const w=new Uint8Array(a),D=He(w);for(const[v,g]of Array.from(r.values()).entries()){const{offset:y,rawFilename:x,rawExtraFieldZip64:E,rawExtraFieldAES:k,rawExtraFieldNTFS:S,rawExtraField:A,rawComment:U,versionMadeBy:F,headerArray:B,directory:N,zip64:Y,msDosCompatible:j,internalFileAttribute:q,externalFileAttribute:we,extendedTimestamp:W,lastModDate:he,diskNumberStart:V}=g;let Z;if(W){Z=new Uint8Array(9);const ue=He(Z);re(ue,0,Bi),re(ue,2,ee(Z)-4),yr(ue,4,1),Q(ue,5,Math.floor(he.getTime()/1e3))}else Z=new Uint8Array;const Se=ee(E,k,Z,S,A);if(Q(D,s,gi),re(D,s+4,F),ve(w,B,s+6),re(D,s+30,Se),re(D,s+32,ee(U)),re(D,s+34,Y?ke:V),re(D,s+36,q),we?Q(D,s+38,we):N&&j&&yr(D,s+38,ki),Q(D,s+42,Y?pe:y),ve(w,x,s+46),ve(w,E,s+46+ee(x)),ve(w,k,s+46+ee(x,E)),ve(w,Z,s+46+ee(x,E,k)),ve(w,S,s+46+ee(x,E,k,Z)),ve(w,A,s+46+ee(x,E,k,Z,S)),ve(w,U,s+46+ee(x)+Se),s+=46+ee(x,U)+Se,n.onprogress)try{await n.onprogress(v+1,r.size,new xr(g))}catch{}}await ze(i),await Nt(o,w);const h=new Uint8Array(p?id:an),c=He(h);let m=i.diskNumber;const{availableSize:_}=i;_n&&(t+=n.length)),t}class Jo{constructor(t,n,r,i){const s=this;if(t.root&&i&&i.getChildByName(n))throw new Error("Entry filename already exists");r||(r={}),Object.assign(s,{fs:t,name:n,data:r.data,id:t.entries.length,parent:i,children:[],uncompressedSize:0}),t.entries.push(s),i&&s.parent.children.push(s)}moveTo(t){const n=this;n.fs.move(n,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){const n=this;let r=n.name,i=n.parent;for(;i&&i!=t;)r=(i.name?i.name+"/":"")+r,i=i.parent;return r}isDescendantOf(t){let n=this.parent;for(;n&&n.id!=t.id;)n=n.parent;return Boolean(n)}}class Qo extends Jo{constructor(t,n,r,i){super(t,n,r,i);const s=this;s.Reader=r.Reader,s.Writer=r.Writer,r.getData&&(s.getData=r.getData)}async getData(t,n={}){const r=this;if(!t||t.constructor==r.Writer&&r.data)return r.data;{const i=r.reader=new r.Reader(r.data,n);await Promise.all([ze(i),ze(t,r.data.uncompressedSize)]);const s=i.readable;return s.size=r.uncompressedSize=i.size,await s.pipeTo(t.writable),t.getData?t.getData():t.writable}}getText(t,n){return this.getData(new Ti(t),n)}getBlob(t,n){return this.getData(new Kt(t),n)}getData64URI(t,n){return this.getData(new wr(t),n)}getUint8Array(t){return this.getData(new gr,t)}getWritable(t=new WritableStream,n){return this.getData({writable:t},n)}replaceBlob(t){Object.assign(this,{data:t,Reader:mn,Writer:Kt,reader:null})}replaceText(t){Object.assign(this,{data:t,Reader:Ro,Writer:Ti,reader:null})}replaceData64URI(t){Object.assign(this,{data:t,Reader:Di,Writer:wr,reader:null})}replaceUint8Array(t){Object.assign(this,{data:t,Reader:Ri,Writer:gr,reader:null})}replaceReadable(t){Object.assign(this,{data:null,Reader:function(){return{readable:t}},Writer:null,reader:null})}}class Hn extends Jo{constructor(t,n,r,i){super(t,n,r,i),this.directory=!0}addDirectory(t){return pt(this,t,null,!0)}addText(t,n){return pt(this,t,{data:n,Reader:Ro,Writer:Ti})}addBlob(t,n){return pt(this,t,{data:n,Reader:mn,Writer:Kt})}addData64URI(t,n){return pt(this,t,{data:n,Reader:Di,Writer:wr})}addUint8Array(t,n){return pt(this,t,{data:n,Reader:Ri,Writer:gr})}addHttpContent(t,n,r={}){return pt(this,t,{data:n,Reader:class extends va{constructor(i){super(i,r)}}})}addReadable(t,n){return pt(this,t,{Reader:function(){return{readable:n}}})}addFileSystemEntry(t){return su(this,t)}addData(t,n){return pt(this,t,n)}async importBlob(t,n={}){await this.importZip(new mn(t),n)}async importData64URI(t,n={}){await this.importZip(new Di(t),n)}async importUint8Array(t,n={}){await this.importZip(new Ri(t),n)}async importHttpContent(t,n={}){await this.importZip(new va(t,n),n)}async importReadable(t,n={}){await this.importZip({readable:t},n)}exportBlob(t={}){return this.exportZip(new Kt("application/zip"),t)}exportData64URI(t={}){return this.exportZip(new wr("application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new gr,t)}async exportWritable(t=new WritableStream,n={}){return await this.exportZip({writable:t},n),t}async importZip(t,n){await ze(t),(await new Df(t,n).getEntries()).forEach(s=>{let a=this;const l=s.filename.split("/"),o=l.pop();l.forEach(f=>a=a.getChildByName(f)||new Hn(this.fs,f,null,a)),s.directory||pt(a,o,{data:s,Reader:ru(Object.assign({},n))})})}async exportZip(t,n){const r=this;await Promise.all([el(r),ze(t)]);const i=new jf(t,n);return await iu(i,r,nu([r],"uncompressedSize"),n),await i.close(),t.getData?t.getData():t.writable}getChildByName(t){const n=this.children;for(let r=0;r{n.id==e.id&&t.splice(r,1)})}async function iu(e,t,n,r){const i=t,s=new Map;await a(e,t);async function a(l,o){await f();async function f(){if(r.bufferedWrite)await Promise.all(o.children.map(d));else for(const u of o.children)await d(u)}async function d(u){const p=r.relativePath?u.getRelativeName(i):u.getFullname();await l.add(p,u.reader,Object.assign({directory:u.directory},Object.assign({},r,{onprogress:async w=>{if(r.onprogress){s.set(p,w);try{await r.onprogress(Array.from(s.values()).reduce((D,h)=>D+h),n)}catch{}}}}))),await a(l,u)}}}async function su(e,t){if(t.isDirectory){const i=e.addDirectory(t.name);return await n(i,t),i}else return new Promise((i,s)=>t.file(a=>i(e.addBlob(t.name,a)),s));async function n(i,s){const a=await r(s);for(const l of a)l.isDirectory?await n(i.addDirectory(l.name),l):await new Promise((o,f)=>{l.file(d=>{const u=i.addBlob(l.name,d);u.uncompressedSize=d.size,o(u)},f)})}function r(i){return new Promise((s,a)=>{let l=[];i.isDirectory&&o(i.createReader()),i.isFile&&s(l);function o(f){f.readEntries(d=>{d.length?(l=l.concat(d),o(f)):s(l)},a)}})}}function tn(e){e.entries=[],e.root=new Hn(e)}function pt(e,t,n,r){if(e.directory)return r?new Hn(e.fs,t,n,e):new Qo(e.fs,t,n,e);throw new Error("Parent entry is not a directory")}let tl;try{tl=import.meta.url}catch{}Gi({baseURL:tl});Kd(Gi);Gi({Deflate:Cc,Inflate:nd});function Ir(e){return e.slice(e.lastIndexOf(Fr)+1)}const Fr="/";async function au(e,t,n){const r=e.vaultPath+"/.obsidian/"+t+".json";let i;return e.adapter.exists(r)&&(i=JSON.parse(await e.adapter.readFile(r))),n(i)}class ou{constructor(t){Bt(this,"zipFS");Bt(this,"chunks",[]);Bt(this,"chunkIndex",0);this.zipBlob=t}async initReadingVault(){this.zipFS=new tu.FS,await this.zipFS.importBlob(this.zipBlob)}readDirectory(t){return this.zipFS.find(t).children.map(r=>({isDirectory:()=>!!r.directory,getName:()=>r.getFullname()}))}readFile(t){return this.zipFS.find(t).getText("utf-8")}exists(t){return!!this.zipFS.find(t)}resolve(t){return t}resolveInDir(t,n){return t+Fr+n}removeFile(t){}renameFile(t,n){}flushResultsFromInitialProcessing(t){}appendToResultFile(t,n){this.chunks.push(n)}appendToPostProcessingFile(t,n){this.chunks[this.chunkIndex]=n,this.chunkIndex++}initPostProcessingResultFile(t){}chunkIter(){const t=this.chunks;let n=0;return{[Symbol.asyncIterator](){return{async next(){if(n{if(s.forEach((l,o)=>s[o]+=a),r==="seenOne"&&a!=="["&&(r="normal"),r==="seenOneOut"&&a!=="]"&&(r="normal"),a==="["&&(i+=1,r==="seenOne"?(s.push(""),r="normal"):r==="normal"&&(r="seenOne")),a==="]"&&i>0){if(i-=1,r==="seenOneOut"){const l=s.pop();l&&(!t||s.length===0)&&n.push(l.slice(0,-2)),r="normal"}else r==="normal"&&(r="seenOneOut");i===0&&(r="normal")}}),n}function du(e){return Ir(e)!==e}class ci{constructor(){Bt(this,"nameWasCalledAsFile",[]);Bt(this,"pathMap",new Map);Bt(this,"nameMap",new Map)}accessAsFile(t,n,r){const i=this.pathMap.get(n);if(i)return this.nameMap.get(t)||this.nameMap.set(t,i),i;const s=this.nameMap.get(t);if(s&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,s),this.nameWasCalledAsFile.push(t),s;const a=r();return this.pathMap.set(n,a),this.nameMap.get(t)||this.nameMap.set(t,a),this.nameWasCalledAsFile.push(t),a}accessAsLink(t,n){const r=this.findData(t);if(r)return r;const i=du(t),s=n();return i?this.pathMap.set(t,s):this.nameMap.set(t,s),s}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Lr(e){e.totalNodes++,e.leafNodes++}function nl(e){e.leafNodes--,e.topLevelNodes++}function fu(e,t,n=lu,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new ci,headingTracker:new ci,dummyHeadingLinkTracker:new Map,blockLinkTracker:new ci,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function Wt(e){return Lr(e.summary),e.idGenerator()}function uu(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map);let s=i.get(r);return s||(s={uid:Wt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function hu(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map);let a=s.get(i);return a||(a={uid:Wt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function mu(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function pu(e){let t;return[e.split(` `).map(r=>{const i=r.split(" "),s=i[i.length-1];if(s.startsWith("^"))return t=s,i.slice(0,-1).join(" ")}).join(` -`),t]}function rl(e,t,n,r,i,s){const a=[t],o=[e];for(const l of n){const f=i(l);mu(f,l,a,o,r),s==null||s(f,l)}}function mu(e,t,n,r,i){var o;pu(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(o=a.children)!=null?o:[],a.children.push(e)),n.push(t),r.push(e)}function pu(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function il(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=il(n.children,r);if(i)return i}}return null}function _u(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function wu(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const o=t.findData(s);if(o){const l={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};rl(f,l,o,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=il(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function gu(e,t){const[n,r]=wu(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Lr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let o=a;s.forEach(l=>{o=o.replace(l.old,l.new)}),await t.adapter.appendToPostProcessingFile(i,o)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var sl=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(sl||{});function xu(e,t){return ou(e,!0).filter(n=>n.trim()!=="").map(n=>{const r=n.split("|"),i=r[0],s=r[1],a=vu(i,t),o=s!==void 0&&s.trim()!==""?"["+s.trim()+"]([["+a+"]])":"[["+a+"]]";return[n,a,o]})}function yu(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function bu(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function vu(e,t){const n=yu(e);switch(bu(n)){case 0:return ku(n[0],t);case 2:return du(n,t);case 1:return _u(n,t);default:throw"Invalid link type detected: "+n}}function ku(e,t){return t.defaultLinkTracker.accessAsLink(e,()=>(Lr(t.summary),{uid:t.idGenerator(),obsidianLink:e,type:1})).uid}function Su(e,t,n,r){const[i,s]=hu(n);return s?[fu([e,s],t,r),i]:[kt(r),n]}function Eu(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,()=>(Lr(n.summary),{uid:n.idGenerator(),obsidianLink:r,type:0}));return i.type=0,i.uid}function Du(e){const t=[];for(const n of e.getData())n.type===sl.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function Tu(e){return[...e.invalidLinks,...Du(e.defaultLinkTracker),...uu(e.blockLinkTracker)]}function Au(e,t,n){const r=Tu(n).sort((a,o)=>a.link.localeCompare(o.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:kt(n),name:i,createdAt:t,editedAt:t,type:"node"};return nl(n.summary),s.children=r,s}function ns(e){return e===" "||e===" "}function jn(e,t){let n=0;for(;ns(e[t+n]);)n++;return n}function Ou(e,t){let n=t,r=e[t];for(;ns(r);)n--,r=e[n];return n+1}function Yt(e,t){let n=0;for(;!rs(e[t+n]);)n++;return t+n}function al(e,t){const n=e[t-1];return rs(n)}function rs(e){return e===void 0||e===` -`}function ol(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function is(e,t){let n=!0;const r=t+jn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ol(e,r));const a=Ou(e,r-1)-1,o=e[a];return rs(o)&&n?{type:dt.BULLET,level:r-a-1}:null}function Ru(e,t,n){let r=t+n.level;if(ol(e,r))return r;r+=1+1;const i=jn(e,r);return r+i}function Mu(e,t,n){let r=Yt(e,t+n.level+1+1),i=e[r];for(;;){const s=jn(e,r+1);if(s==n.level+2&&!is(e,r+1+s))r=Yt(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Iu(e,t){return e+t.level}function Fu(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=jn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function ll(e,t){if(!al(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=Yt(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],o=e[i+2];for(;[s,a,o].every(d=>d!==void 0)&&[s,a,o].join("")!=="```";)i++,s=e[i],a=e[i+1],o=e[i+2];if([s,a,o].some(d=>d===void 0))return null;const l=Yt(e,i+3);return e.slice(i+3,l).trim()!==""?null:{type:dt.CODEBLOCK,level:l-t+(e[l]===` -`?1:0),codeLanguage:r!==""?r:void 0}}return null}function Lu(e,t){return Yt(e,t)}function cl(e,t){const n=Yt(e,t),r=e.slice(t,n);return dl(r)?{type:dt.DATAVIEWATTRIBUTE,level:0}:null}function dl(e){const t=e.split("::");return t.length===2&&t[0].trim()===t[0]&&t[0]!==""&&t[1]!==""&&t[1]!==" "&&ns(t[1][0])}function fl(e,t){if(!al(e,t))return null;const n=Cu(e,t);return n>0&&e[t+n]===" "?{type:dt.HEADING,level:n}:null}function Cu(e,t){let n=t,r=0;for(;e[n]==="#";)n++,r++;return r}function Nu(e,t,n){const r=t+n.level+1,i=jn(e,r);return r+i}function Pu(e,t,n){return Yt(e,t+n.level+1)}function Uu(e,t){let n=Yt(e,t),r=e[n],i=r;for(n++,r=e[n];;){if(r===void 0)return[n];if(r===` +`),t]}function rl(e,t,n,r,i,s){const a=[t],l=[e];for(const o of n){const f=i(o);_u(f,o,a,l,r),s==null||s(f,o)}}function _u(e,t,n,r,i){var l;wu(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(l=a.children)!=null?l:[],a.children.push(e)),n.push(t),r.push(e)}function wu(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function il(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=il(n.children,r);if(i)return i}}return null}function gu(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function xu(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const l=t.findData(s);if(l){const o={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};rl(f,o,l,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=il(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function yu(e,t){const[n,r]=xu(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Lr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let l=a;s.forEach(o=>{l=l.replace(o.old,o.new)}),await t.adapter.appendToPostProcessingFile(i,l)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var sl=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(sl||{});function bu(e,t){const n=vu(e.name,t);if(n.length>0){const r=new Set;e.refs||(e.refs=[]);for(const[i,s,a]of n)r.add(s),e.name=e.name.replaceAll("[["+i+"]]",a);e.refs.push(...Array.from(r.values()))}}function vu(e,t){return cu(e,!0).map(n=>[n,n.split("|").map(r=>r.trim())]).filter(n=>n[1][0]!=="").map(n=>{const r=n[1],i=r[0],s=r[1],a=Eu(i,t),l=s!==void 0&&s.trim()!==""?"["+s.trim()+"]([["+a+"]])":"[["+a+"]]";return[n[0],a,l]})}function ku(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function Su(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function Eu(e,t){const n=ku(e);switch(Su(n)){case 0:return Du(n[0],t);case 2:return uu(n,t);case 1:return gu(n,t);default:throw"Invalid link type detected: "+n}}function Du(e,t){return t.defaultLinkTracker.accessAsLink(e,()=>(Lr(t.summary),{uid:t.idGenerator(),obsidianLink:e,type:1})).uid}function al(e,t,n,r){const[i,s]=pu(n);return s?[hu([e,s],t,r),i]:[Wt(r),n]}function Tu(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,()=>(Lr(n.summary),{uid:n.idGenerator(),obsidianLink:r,type:0}));return i.type=0,i.uid}function Au(e){const t=[];for(const n of e.getData())n.type===sl.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function Ou(e){return[...e.invalidLinks,...Au(e.defaultLinkTracker),...mu(e.blockLinkTracker)]}function Ru(e,t,n){const r=Ou(n).sort((a,l)=>a.link.localeCompare(l.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:Wt(n),name:i,createdAt:t,editedAt:t,type:"node"};return nl(n.summary),s.children=r,s}function ns(e){return e===" "||e===" "}function jn(e,t){let n=0;for(;ns(e[t+n]);)n++;return n}function Mu(e,t){let n=t,r=e[t];for(;ns(r);)n--,r=e[n];return n+1}function Ut(e,t){let n=0;for(;!rs(e[t+n]);)n++;return t+n}function ol(e,t){const n=e[t-1];return rs(n)}function rs(e){return e===void 0||e===` +`}function ll(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function is(e,t){let n=!0;const r=t+jn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ll(e,r));const a=Mu(e,r-1)-1,l=e[a];return rs(l)&&n?{type:dt.BULLET,level:r-a-1}:null}function Iu(e,t,n){let r=t+n.level;if(ll(e,r))return r;r+=1+1;const i=jn(e,r);return r+i}function Fu(e,t,n){let r=Ut(e,t+n.level+1+1),i=e[r];for(;;){const s=jn(e,r+1);if(s==n.level+2&&!is(e,r+1+s))r=Ut(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Lu(e,t){return e+t.level}function Cu(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=jn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function cl(e,t){if(!ol(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=Ut(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],l=e[i+2];for(;[s,a,l].every(d=>d!==void 0)&&[s,a,l].join("")!=="```";)i++,s=e[i],a=e[i+1],l=e[i+2];if([s,a,l].some(d=>d===void 0))return null;const o=Ut(e,i+3);return e.slice(i+3,o).trim()!==""?null:{type:dt.CODEBLOCK,level:o-t+(e[o]===` +`?1:0),codeLanguage:r!==""?r:void 0}}return null}function Nu(e,t){return Ut(e,t)}function dl(e,t){const n=Ut(e,t),r=e.slice(t,n);return fl(r)?{type:dt.DATAVIEWATTRIBUTE,level:0}:null}function fl(e){const t=e.split("::");return t.length===2&&t[0].trim()===t[0]&&t[0]!==""&&t[1]!==""&&t[1]!==" "&&ns(t[1][0])}function ul(e,t){if(!ol(e,t))return null;const n=Pu(e,t);return n>0&&e[t+n]===" "?{type:dt.HEADING,level:n}:null}function Pu(e,t){let n=t,r=0;for(;e[n]==="#";)n++,r++;return r}function Uu(e,t,n){const r=t+n.level+1,i=jn(e,r);return r+i}function Yu(e,t,n){return Ut(e,t+n.level+1)}function Wu(e,t){let n=Ut(e,t),r=e[n],i=r;for(n++,r=e[n];;){if(r===void 0)return[n];if(r===` `&&i===` -`)return[n-1];{const s=Yu(e,n);if(s)return[n-1,s]}i=r,n++,r=e[n]}}function Yu(e,t){let n=fl(e,t);return n||(n=cl(e,t),n)||(n=is(e,t),n)||(n=ll(e,t),n)?n:null}var dt=(e=>(e.ROOT="Root",e.HEADING="Heading",e.BULLET="Bullet Node",e.PARAGRAPH="Paragraph",e.CODEBLOCK="Code Block",e.DATAVIEWATTRIBUTE="Data View Attribute",e))(dt||{});function Wu(e,t=0){const n=[];for(let r=t;rzu(i,t,n,r))))}function zu(e,t,n,r){let i=e;r&&(i=qu(e));let s=t.get(i);return s===void 0&&(s=n(),t.set(i,s)),s}function $u(e){return Array.from(e.entries()).map(t=>({name:t[0],uid:t[1]}))}function Ku(e){if(e.startsWith("[ ] "))return"todo";if(e.startsWith("[x] ")||e.startsWith("[X] "))return"done"}function Xu(e,t){if(t.type===dt.BULLET){const n=Ku(e);if(n)return[e.slice(4),n]}return null}function Ju(e){const t=[];let n=Fi(e,0);for(;n!==null;){let r;Array.isArray(n)?(t.push(n),r=n[2]):r=n,n=Fi(e,r)}return t}function Fi(e,t){let n,r="",i="";for(let s=t;s{const o=a[0],l=a[1];if(i.every(f=>o.trim()!==f.name||l.trim()!==f.mediaUrl)){const f=a[3],d=kt(n);e.name=e.name.replaceAll(f,"[["+d+"]]"),i.push({uid:d,name:o.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:l.trim()})}}),e.children=[...(s=e.children)!=null?s:[],...i]}function ml(e,t,n,r,i,s){let a=s;return t&&t.length>0&&(a=s!=null?s:[],a==null||a.push(...t.map(o=>({uid:kt(r),name:o,type:"node",createdAt:n,editedAt:n})))),n0(e,r.attributes),r.summary.fields++,{uid:i!=null?i:kt(r),name:e,type:"field",createdAt:n,editedAt:n,children:a}}function t0(e,t,n){return ml(e.key,e.values,t,n)}function n0(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function r0(e,t,n){return{uid:kt(n),name:Fu(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function i0(e,t,n,r){if(e.type===dt.DATAVIEWATTRIBUTE||dl(t.name)){const i=t.name.split("::");return ml(i[0],[i[1].trim()],n,r,t.uid)}}function s0(e,t,n,r,i){var w;if(n.type===dt.CODEBLOCK)return r0(n,r,i);const[s,a]=Su(e,t,n.content,i),o={uid:s,name:a,createdAt:r,editedAt:r,type:"node"},[l,f]=(w=Xu(a,n))!=null?w:[a,void 0];o.name=l,o.todoState=f,o.name=o.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=Zu(o.name);if(d){const v=d[d.length-1];o.name.endsWith(v)&&(o.name=o.name.slice(0,-v.length)),o.supertags=ul(d,i.superTagTracker,i.idGenerator,!0)}const u=xu(o.name,i);if(u.length>0){const v=new Set;o.refs||(o.refs=[]);for(const[h,c,m]of u)v.add(c),o.name=o.name.replaceAll("[["+h+"]]",m);o.refs.push(...Array.from(v.values()))}e0(o,r,i);const p=i0(n,o,r,i);return p!=null?p:o}function a0(e){if(e.startsWith(`--- +`)return[n-1];{const s=Hu(e,n);if(s)return[n-1,s]}i=r,n++,r=e[n]}}function Hu(e,t){let n=ul(e,t);return n||(n=dl(e,t),n)||(n=is(e,t),n)||(n=cl(e,t),n)?n:null}var dt=(e=>(e.ROOT="Root",e.HEADING="Heading",e.BULLET="Bullet Node",e.PARAGRAPH="Paragraph",e.CODEBLOCK="Code Block",e.DATAVIEWATTRIBUTE="Data View Attribute",e))(dt||{});function ju(e,t=0){const n=[];for(let r=t;rKu(i,t,n,r))))}function Ku(e,t,n,r){let i=e;r&&(i=$u(e));let s=t.get(i);return s===void 0&&(s=n(),t.set(i,s)),s}function Xu(e){return Array.from(e.entries()).map(t=>({name:t[0],uid:t[1]}))}function Ju(e){if(e.startsWith("[ ] "))return"todo";if(e.startsWith("[x] ")||e.startsWith("[X] "))return"done"}function Qu(e,t){if(t===dt.BULLET){const n=Ju(e);if(n)return[e.slice(4),n]}return null}function e0(e){const t=[];let n=Fi(e,0);for(;n!==null;){let r;Array.isArray(n)?(t.push(n),r=n[2]):r=n,n=Fi(e,r)}return t}function Fi(e,t){let n,r="",i="";for(let s=t;s{const l=a[0],o=a[1];if(i.every(f=>l.trim()!==f.name||o.trim()!==f.mediaUrl)){const f=a[3],d=Wt(n);e.name=e.name.replaceAll(f,"[["+d+"]]"),i.push({uid:d,name:l.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:o.trim()})}}),e.children=[...(s=e.children)!=null?s:[],...i]}function pl(e,t,n,r,i,s){var u;const[a,l]=(u=Qu(r.name,s))!=null?u:[r.name,void 0];r.name=a,r.todoState=l;const[o,f]=al(e,t,r.name,i);r.uid=o,r.name=f,r.name=r.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=zu(r.name);if(d){const p=d[d.length-1];r.name.endsWith(p)&&(r.name=r.name.slice(0,-p.length)),r.supertags=hl(d,i.superTagTracker,i.idGenerator,!0)}return bu(r,i),n0(r,n,i),r}function _l(e,t,n,r,i,s,a,l){let o=l;return r&&r.length>0&&(o=l!=null?l:[],o==null||o.push(...r.map(f=>pl(e,t,i,{name:f,type:"node",createdAt:i,editedAt:i},s)))),i0(n,s.attributes),s.summary.fields++,{uid:a!=null?a:Wt(s),name:n,type:"field",createdAt:i,editedAt:i,children:o}}function r0(e,t,n,r,i){return _l(e,t,n.key,n.values,r,i)}function i0(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function s0(e,t,n){return{uid:Wt(n),name:Cu(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function a0(e,t,n,r,i){if(n.type===dt.DATAVIEWATTRIBUTE||fl(n.content)){const[s,a]=al(e,t,n.content,i),l=a.split("::");return _l(e,t,l[0],[l[1].trim()],r,i,s)}}function o0(e,t,n,r,i){if(n.type===dt.CODEBLOCK)return s0(n,r,i);const s=a0(e,t,n,r,i);return s||pl(e,t,r,{name:n.content,createdAt:r,editedAt:r,type:"node"},i,n.type)}function l0(e){if(e.startsWith(`--- `)){const t=e.indexOf(` --- -`);if(t!==-1)return[o0(e.slice(4,t)),t+5]}return null}function o0(e){const t=e.split(` -`).map(r=>r.trim()).filter(r=>r!==""),n=[];for(let r=0;ra.trim()).filter(a=>a!=="");if(!(s[0]==="publish"||s[0]==="cssclass"||s[0]==="aliases"))if(s.length===2)if(s[1].startsWith("[")&&s[1].endsWith("]")){const a=s[1].slice(1,-1).split(",").map(o=>o.trim()).filter(o=>o!=="");n.push({key:s[0],values:a})}else n.push({key:s[0],values:[s[1]]});else{const a={key:s[0],values:[]};let o=1,l=t[r+o];for(;l!==void 0&&l.startsWith("- ");)a.values.push(l.slice(2)),o++,l=t[r+o];r+=o-1,n.push(a)}}return n}//! moment.js +`);if(t!==-1)return[c0(e.slice(4,t)),t+5]}return null}function c0(e){const t=e.split(` +`).map(r=>r.trim()).filter(r=>r!==""),n=[];for(let r=0;ra.trim()).filter(a=>a!=="");if(!(s[0]==="publish"||s[0]==="cssclass"||s[0]==="aliases"))if(s.length===2)if(s[1].startsWith("[")&&s[1].endsWith("]")){const a=s[1].slice(1,-1).split(",").map(l=>l.trim()).filter(l=>l!=="");n.push({key:s[0],values:a})}else n.push({key:s[0],values:[s[1]]});else{const a={key:s[0],values:[]};let l=1,o=t[r+l];for(;o!==void 0&&o.startsWith("- ");)a.values.push(o.slice(2)),l++,o=t[r+l];r+=l-1,n.push(a)}}return n}//! moment.js //! version : 2.29.4 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com -var pl;function L(){return pl.apply(null,arguments)}function l0(e){pl=e}function rt(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function $t(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function te(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ss(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(te(e,t))return!1;return!0}function Ce(e){return e===void 0}function St(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Bn(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function _l(e,t){var n=[],r,i=e.length;for(r=0;r>>0,r;for(r=0;r0)for(n=0;n>>0,r;for(r=0;r0)for(n=0;n=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var cs=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,fi={},fn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(fn[e]=i),t&&(fn[t[0]]=function(){return ft(i.apply(this,arguments),t[1],t[2])}),n&&(fn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function h0(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function m0(e){var t=e.match(cs),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var p0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function _0(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(cs).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var w0="Invalid date";function g0(){return this._invalidDate}var x0="%d",y0=/\d{1,2}/;function b0(e){return this._ordinal.replace("%d",e)}var v0={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function k0(e,t,n,r){var i=this._relativeTime[n];return ht(i)?i(e,t,n,r):i.replace(/%d/i,e)}function S0(e,t){var n=this._relativeTime[e>0?"future":"past"];return ht(n)?n(t):n.replace(/%s/i,t)}var Rn={};function Oe(e,t){var n=e.toLowerCase();Rn[n]=Rn[n+"s"]=Rn[t]=e}function Ke(e){return typeof e=="string"?Rn[e]||Rn[e.toLowerCase()]:void 0}function ds(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var yl={};function Re(e,t){yl[e]=t}function E0(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:yl[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Nr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function pn(e,t){return function(n){return n!=null?(bl(this,e,n),L.updateOffset(this,t),this):br(this,e)}}function br(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function bl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Nr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),jr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function D0(e){return e=Ke(e),ht(this[e])?this[e]():this}function T0(e,t){if(typeof e=="object"){e=ds(e);var n=E0(e),r,i=n.length;for(r=0;r68?1900:2e3)};var Ml=pn("FullYear",!0);function Z0(){return Nr(this.year())}function q0(e,t,n,r,i,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function Nn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Nn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Il(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),o=1+7*(t-1)+s+a,l,f;return o<=0?(l=e-1,f=Mn(l)+o):o>Mn(e)?(l=e+1,f=o-Mn(e)):(l=e,f=o),{year:l,dayOfYear:f}}function Pn(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+vt(a,t,n)):i>vt(e.year(),t,n)?(s=i-vt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function vt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(Mn(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Oe("week","w");Oe("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Zn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function z0(e){return Pn(e,this._week.dow,this._week.doy).week}var $0={dow:0,doy:6};function K0(){return this._week.dow}function X0(){return this._week.doy}function J0(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Q0(e){var t=Pn(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Oe("day","d");Oe("weekday","e");Oe("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Zn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Zn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function eh(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function th(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function hs(e,t){return e.slice(t,7).concat(e.slice(0,t))}var nh="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Fl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),rh="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ih=Gn,sh=Gn,ah=Gn;function oh(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?hs(n,this._week.dow):e?n[e.day()]:n}function lh(e){return e===!0?hs(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ch(e){return e===!0?hs(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function dh(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ut([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function fh(e,t,n){var r,i,s;if(this._weekdaysParseExact)return dh.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ut([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function uh(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=eh(e,this.localeData()),this.add(e-t,"d")):t}function hh(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function mh(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=th(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function ph(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||ms.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=ih),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function _h(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||ms.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=sh),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function wh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||ms.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ah),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ms(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,o,l,f;for(s=0;s<7;s++)a=ut([2e3,1]).day(s),o=je(this.weekdaysMin(a,"")),l=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(o),n.push(l),r.push(f),i.push(o),i.push(l),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ps(){return this.hours()%12||12}function gh(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,ps);H("k",["kk",2],0,gh);H("hmm",0,0,function(){return""+ps.apply(this)+ft(this.minutes(),2)});H("hmmss",0,0,function(){return""+ps.apply(this)+ft(this.minutes(),2)+ft(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+ft(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+ft(this.minutes(),2)+ft(this.seconds(),2)});function Ll(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Ll("a",!0);Ll("A",!1);Oe("hour","h");Re("hour",13);function Cl(e,t){return t._meridiemParse}C("a",Cl);C("A",Cl);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",Sl);C("hmmss",El);C("Hmm",Sl);C("Hmmss",El);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i))});function xh(e){return(e+"").toLowerCase().charAt(0)==="p"}var yh=/[ap]\.?m?\.?/i,bh=pn("Hours",!0);function vh(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Nl={calendar:f0,longDateFormat:p0,invalidDate:w0,ordinal:x0,dayOfMonthOrdinalParse:y0,relativeTime:v0,months:N0,monthsShort:Dl,week:$0,weekdays:nh,weekdaysMin:rh,weekdaysShort:Fl,meridiemParse:yh},de={},Dn={},Un;function kh(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=Br(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&kh(s,r)>=n-1)break;n--}t++}return Un}function Eh(e){return e.match("^[^/\\\\]*$")!=null}function Br(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&Eh(e))try{t=Un._abbr,n=require,n("./locale/"+e),Ut(t)}catch{de[e]=null}return de[e]}function Ut(e,t){var n;return e&&(Ce(t)?n=Et(e):n=_s(e,t),n?Un=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Un._abbr}function _s(e,t){if(t!==null){var n,r=Nl;if(t.abbr=e,de[e]!=null)gl("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=Br(t.parentLocale),n!=null)r=n._config;else return Dn[t.parentLocale]||(Dn[t.parentLocale]=[]),Dn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new ls(Ci(r,t)),Dn[e]&&Dn[e].forEach(function(i){_s(i.name,i.config)}),Ut(e),de[e]}else return delete de[e],null}function Dh(e,t){if(t!=null){var n,r,i=Nl;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Ci(de[e]._config,t)):(r=Br(e),r!=null&&(i=r._config),t=Ci(i,t),r==null&&(t.abbr=e),n=new ls(t),n.parentLocale=de[e],de[e]=n),Ut(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Ut()&&Ut(e)):de[e]!=null&&delete de[e]);return de[e]}function Et(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Un;if(!rt(e)){if(t=Br(e),t)return t;e=[e]}return Sh(e)}function Th(){return Ni(de)}function ws(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[gt]<0||n[gt]>11?gt:n[ot]<1||n[ot]>jr(n[Ae],n[gt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[xt]!==0||n[zt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[xt]<0||n[xt]>59?xt:n[zt]<0||n[zt]>999?zt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=F0),z(e)._overflowWeekday&&t===-1&&(t=L0),z(e).overflow=t),e}var Ah=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Oh=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Rh=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ui=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mh=/^\/?Date\((-?\d+)/i,Ih=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Fh={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Pl(e){var t,n,r=e._i,i=Ah.exec(r)||Oh.exec(r),s,a,o,l,f=ir.length,d=ui.length;if(i){for(z(e).iso=!0,t=0,n=f;tMn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Nn(a,0,e._dayOfYear),e._a[gt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[xt]===0&&e._a[zt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Nn:q0).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function Hh(e){var t,n,r,i,s,a,o,l,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=sn(t.GG,e._a[Ae],Pn(oe(),1,4).year),r=sn(t.W,1),i=sn(t.E,1),(i<1||i>7)&&(l=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Pn(oe(),s,a),n=sn(t.gg,e._a[Ae],f.year),r=sn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>vt(n,s,a)?z(e)._overflowWeeks=!0:l!=null?z(e)._overflowWeekday=!0:(o=Il(n,r,i,s,a),e._a[Ae]=o.year,e._dayOfYear=o.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function xs(e){if(e._f===L.ISO_8601){Pl(e);return}if(e._f===L.RFC_2822){Ul(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,o=t.length,l=0,f,d;for(i=xl(e._f,e._locale).match(cs)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),l+=r.length),fn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),I0(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=o-l,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=jh(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Ae]=e._locale.erasConvertYear(f,e._a[Ae])),gs(e),ws(e)}function jh(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Bh(e){var t,n,r,i,s,a,o=!1,l=e._f.length;if(l===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Cr()});function Hl(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function d1(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return os(e,this),e=Yl(e),e._a?(t=e._isUTC?ut(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&t1(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function f1(){return this.isValid()?!this._isUTC:!1}function u1(){return this.isValid()?this._isUTC:!1}function Bl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var h1=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,m1=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:St(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=h1.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[xt])*i,ms:$(Ui(r[zt]*1e3))*i}):(r=m1.exec(e))?(i=r[1]==="-"?-1:1,n={y:Zt(r[2],i),M:Zt(r[3],i),w:Zt(r[4],i),d:Zt(r[5],i),h:Zt(r[6],i),m:Zt(r[7],i),s:Zt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=p1(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Vr(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Vr.prototype;st.invalid=e1;function Zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Pa(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function p1(e,t){var n;return e.isValid()&&t.isValid()?(t=bs(t,e),e.isBefore(t)?n=Pa(e,t):(n=Pa(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Vl(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(gl(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),Gl(this,i,e),this}}function Gl(e,t,n,r){var i=t._milliseconds,s=Ui(t._days),a=Ui(t._months);!e.isValid()||(r=r==null?!0:r,a&&Al(e,br(e,"Month")+a*n),s&&bl(e,"Date",br(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var _1=Vl(1,"add"),w1=Vl(-1,"subtract");function Zl(e){return typeof e=="string"||e instanceof String}function g1(e){return it(e)||Bn(e)||Zl(e)||St(e)||y1(e)||x1(e)||e===null||e===void 0}function x1(e){var t=$t(e)&&!ss(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ht(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function L1(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function C1(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function N1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function P1(e){return this.from(oe(),e)}function U1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Y1(e){return this.to(oe(),e)}function ql(e){var t;return e===void 0?this._locale._abbr:(t=Et(e),t!=null&&(this._locale=t),this)}var zl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function $l(){return this._locale}var Sr=1e3,un=60*Sr,Er=60*un,Kl=(365*400+97)*24*Er;function hn(e,t){return(e%t+t)%t}function Xl(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Kl:new Date(e,t,n).valueOf()}function Jl(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Kl:Date.UTC(e,t,n)}function W1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Jl:Xl,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hn(t+(this._isUTC?0:this.utcOffset()*un),Er);break;case"minute":t=this._d.valueOf(),t-=hn(t,un);break;case"second":t=this._d.valueOf(),t-=hn(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function H1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Jl:Xl,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-hn(t+(this._isUTC?0:this.utcOffset()*un),Er)-1;break;case"minute":t=this._d.valueOf(),t+=un-hn(t,un)-1;break;case"second":t=this._d.valueOf(),t+=Sr-hn(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function j1(){return this._d.valueOf()-(this._offset||0)*6e4}function B1(){return Math.floor(this.valueOf()/1e3)}function V1(){return new Date(this.valueOf())}function G1(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Z1(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function q1(){return this.isValid()?this.toISOString():null}function z1(){return as(this)}function $1(){return Ct({},z(this))}function K1(){return z(this).overflow}function X1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",vs);C("NN",vs);C("NNN",vs);C("NNNN",lm);C("NNNNN",cm);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",_n);C("yy",_n);C("yyy",_n);C("yyyy",_n);C("yo",dm);ie(["y","yy","yyy","yyyy"],Ae);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ae]=n._locale.eraYearOrdinalParse(e,i):t[Ae]=parseInt(e,10)});function J1(e,t){var n,r,i,s=this._eras||Et("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function em(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function tm(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),wm.call(this,e,t,n,r,i))}function wm(e,t,n,r,i){var s=Il(e,t,n,r,i),a=Nn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Oe("quarter","Q");Re("quarter",7);C("Q",vl);ie("Q",function(e,t){t[gt]=($(e)-1)*3});function gm(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Oe("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var ec=pn("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Oe("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Ur);C("DDDD",kl);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function xm(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Oe("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var ym=pn("Minutes",!1);H("s",["ss",2],0,"second");Oe("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],xt);var bm=pn("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Oe("millisecond","ms");Re("millisecond",16);C("S",Ur,vl);C("SS",Ur,Be);C("SSS",Ur,kl);var Nt,tc;for(Nt="SSSS";Nt.length<=9;Nt+="S")C(Nt,_n);function vm(e,t){t[zt]=$(("0."+e)*1e3)}for(Nt="S";Nt.length<=9;Nt+="S")ie(Nt,vm);tc=pn("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function km(){return this._isUTC?"UTC":""}function Sm(){return this._isUTC?"Coordinated Universal Time":""}var M=Vn.prototype;M.add=_1;M.calendar=k1;M.clone=S1;M.diff=M1;M.endOf=H1;M.format=C1;M.from=N1;M.fromNow=P1;M.to=U1;M.toNow=Y1;M.get=D0;M.invalidAt=K1;M.isAfter=E1;M.isBefore=D1;M.isBetween=T1;M.isSame=A1;M.isSameOrAfter=O1;M.isSameOrBefore=R1;M.isValid=z1;M.lang=zl;M.locale=ql;M.localeData=$l;M.max=zh;M.min=qh;M.parsingFlags=$1;M.set=T0;M.startOf=W1;M.subtract=w1;M.toArray=G1;M.toObject=Z1;M.toDate=V1;M.toISOString=F1;M.inspect=L1;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=q1;M.toString=I1;M.unix=B1;M.valueOf=j1;M.creationData=X1;M.eraName=tm;M.eraNarrow=nm;M.eraAbbr=rm;M.eraYear=im;M.year=Ml;M.isLeapYear=Z0;M.weekYear=fm;M.isoWeekYear=um;M.quarter=M.quarters=gm;M.month=Ol;M.daysInMonth=B0;M.week=M.weeks=J0;M.isoWeek=M.isoWeeks=Q0;M.weeksInYear=pm;M.weeksInWeekYear=_m;M.isoWeeksInYear=hm;M.isoWeeksInISOWeekYear=mm;M.date=ec;M.day=M.days=uh;M.weekday=hh;M.isoWeekday=mh;M.dayOfYear=xm;M.hour=M.hours=bh;M.minute=M.minutes=ym;M.second=M.seconds=bm;M.millisecond=M.milliseconds=tc;M.utcOffset=r1;M.utc=s1;M.local=a1;M.parseZone=o1;M.hasAlignedHourOffset=l1;M.isDST=c1;M.isLocal=f1;M.isUtcOffset=u1;M.isUtc=Bl;M.isUTC=Bl;M.zoneAbbr=km;M.zoneName=Sm;M.dates=$e("dates accessor is deprecated. Use date instead.",ec);M.months=$e("months accessor is deprecated. Use month instead",Ol);M.years=$e("years accessor is deprecated. Use year instead",Ml);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",i1);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",d1);function Em(e){return oe(e*1e3)}function Dm(){return oe.apply(null,arguments).parseZone()}function nc(e){return e}var ne=ls.prototype;ne.calendar=u0;ne.longDateFormat=_0;ne.invalidDate=g0;ne.ordinal=b0;ne.preparse=nc;ne.postformat=nc;ne.relativeTime=k0;ne.pastFuture=S0;ne.set=d0;ne.eras=J1;ne.erasParse=Q1;ne.erasConvertYear=em;ne.erasAbbrRegex=am;ne.erasNameRegex=sm;ne.erasNarrowRegex=om;ne.months=Y0;ne.monthsShort=W0;ne.monthsParse=j0;ne.monthsRegex=G0;ne.monthsShortRegex=V0;ne.week=z0;ne.firstDayOfYear=X0;ne.firstDayOfWeek=K0;ne.weekdays=oh;ne.weekdaysMin=ch;ne.weekdaysShort=lh;ne.weekdaysParse=fh;ne.weekdaysRegex=ph;ne.weekdaysShortRegex=_h;ne.weekdaysMinRegex=wh;ne.isPM=xh;ne.meridiem=vh;function Dr(e,t,n,r){var i=Et(),s=ut().set(r,t);return i[n](s,e)}function rc(e,t,n){if(St(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function Ss(e,t,n,r){typeof e=="boolean"?(St(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,St(t)&&(n=t,t=void 0),t=t||"");var i=Et(),s=e?i._week.dow:0,a,o=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)o[a]=Dr(t,(a+s)%7,r,"day");return o}function Tm(e,t){return rc(e,t,"months")}function Am(e,t){return rc(e,t,"monthsShort")}function Om(e,t,n){return Ss(e,t,n,"weekdays")}function Rm(e,t,n){return Ss(e,t,n,"weekdaysShort")}function Mm(e,t,n){return Ss(e,t,n,"weekdaysMin")}Ut("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Ut);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",Et);var _t=Math.abs;function Im(){var e=this._data;return this._milliseconds=_t(this._milliseconds),this._days=_t(this._days),this._months=_t(this._months),e.milliseconds=_t(e.milliseconds),e.seconds=_t(e.seconds),e.minutes=_t(e.minutes),e.hours=_t(e.hours),e.months=_t(e.months),e.years=_t(e.years),this}function ic(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Fm(e,t){return ic(this,e,t,1)}function Lm(e,t){return ic(this,e,t,-1)}function Ua(e){return e<0?Math.floor(e):Math.ceil(e)}function Cm(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,o,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Ua(Wi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),l=Ze(sc(t)),n+=l,t-=Ua(Wi(l)),o=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=o,this}function sc(e){return e*4800/146097}function Wi(e){return e*146097/4800}function Nm(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+sc(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Wi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Pm(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Dt(e){return function(){return this.as(e)}}var Um=Dt("ms"),Ym=Dt("s"),Wm=Dt("m"),Hm=Dt("h"),jm=Dt("d"),Bm=Dt("w"),Vm=Dt("M"),Gm=Dt("Q"),Zm=Dt("y");function qm(){return st(this)}function zm(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Xt(e){return function(){return this.isValid()?this._data[e]:NaN}}var $m=Xt("milliseconds"),Km=Xt("seconds"),Xm=Xt("minutes"),Jm=Xt("hours"),Qm=Xt("days"),ep=Xt("months"),tp=Xt("years");function np(){return Ze(this.days()/7)}var wt=Math.round,ln={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function rp(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function ip(e,t,n,r){var i=st(e).abs(),s=wt(i.as("s")),a=wt(i.as("m")),o=wt(i.as("h")),l=wt(i.as("d")),f=wt(i.as("M")),d=wt(i.as("w")),u=wt(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,rp.apply(null,p)}function sp(e){return e===void 0?wt:typeof e=="function"?(wt=e,!0):!1}function ap(e,t){return ln[e]===void 0?!1:t===void 0?ln[e]:(ln[e]=t,e==="s"&&(ln.ss=t-1),!0)}function op(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ln,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ln,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=ip(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var hi=Math.abs;function nn(e){return(e>0)-(e<0)||+e}function Zr(){if(!this.isValid())return this.localeData().invalidDate();var e=hi(this._milliseconds)/1e3,t=hi(this._days),n=hi(this._months),r,i,s,a,o=this.asSeconds(),l,f,d,u;return o?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",f=nn(this._months)!==nn(o)?"-":"",d=nn(this._days)!==nn(o)?"-":"",u=nn(this._milliseconds)!==nn(o)?"-":"",l+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Vr.prototype;X.isValid=Qh;X.abs=Im;X.add=Fm;X.subtract=Lm;X.as=Nm;X.asMilliseconds=Um;X.asSeconds=Ym;X.asMinutes=Wm;X.asHours=Hm;X.asDays=jm;X.asWeeks=Bm;X.asMonths=Vm;X.asQuarters=Gm;X.asYears=Zm;X.valueOf=Pm;X._bubble=Cm;X.clone=qm;X.get=zm;X.milliseconds=$m;X.seconds=Km;X.minutes=Xm;X.hours=Jm;X.days=Qm;X.weeks=np;X.months=ep;X.years=tp;X.humanize=op;X.toISOString=Zr;X.toString=Zr;X.toJSON=Zr;X.locale=ql;X.localeData=$l;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zr);X.lang=zl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Wr);C("X",O0);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js -L.version="2.29.4";l0(oe);L.fn=M;L.min=$h;L.max=Kh;L.now=Xh;L.utc=ut;L.unix=Em;L.months=Tm;L.isDate=Bn;L.locale=Ut;L.invalid=Cr;L.duration=st;L.isMoment=it;L.weekdays=Om;L.parseZone=Dm;L.localeData=Et;L.isDuration=dr;L.monthsShort=Am;L.weekdaysMin=Mm;L.defineLocale=_s;L.updateLocale=Dh;L.locales=Th;L.weekdaysShort=Rm;L.normalizeUnits=Ke;L.relativeTimeRounding=sp;L.relativeTimeThreshold=ap;L.calendarFormat=v1;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function lp(e,t,n,r,i=Date.now()){var p;const[s,a]=(p=a0(n))!=null?p:[[],0];let o=Wu(n,a),l=e;const f=o[0]&&o[0].content.match(/^title::(.+)$/);f&&(l=f[1],o=o.slice(1)),o[0]&&o[0].content.replace(/^#+/,"").trim()===l.trim()&&(o=o.slice(1));const d=[],u=cp(l,t,i,r,s);return rl(u,{type:dt.ROOT,level:-1},o,Vu,w=>s0(e,t,w,i,r),(w,v)=>{v.type===dt.HEADING&&d.push({...v,uid:w.uid})}),o=null,r.headingTracker.pathMap.set(t,d),r.headingTracker.nameMap.get(e)||r.headingTracker.nameMap.set(e,d),u}function cp(e,t,n,r,i){let s;const a=[];i.forEach(d=>{d.key==="tags"?s=ul(d.values,r.superTagTracker,r.idGenerator):a.push(t0(d,n,r))});let o=Eu(e,t,r),l="node";const f=dp(e,r.dailyNoteFormat);return f&&(o=f,l="date",e=f,r.summary.calendarNodes++),{uid:o,name:e,createdAt:n,editedAt:n,type:l,supertags:s,children:a.length>0?a:void 0}}function dp(e,t){const n=L(e,t,!0);return n.isValid()?n.format("MM-DD-YYYY"):null}function Ya(e,t){return e===t.length-1?"LAST":"NOT_LAST"}function fp(e,t){return e.adapter.readDirectory(t).filter(n=>{const r=t+Fr+n.getName();return n.isDirectory()&&!r.endsWith(".github")&&!r.endsWith(".obsidian")||!n.isDirectory()&&r.endsWith(".md")}).sort((n,r)=>Number(n.isDirectory())-Number(r.isDirectory()))}async function ac(e,t,n,r,i,s="LAST"){n(t);const a=fp(e,t);for(let o=0;o{const i=Ir(r),s=kt(n);n.adapter.appendToResultFile(e,`{ +`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Ca={};function yl(e,t){L.deprecationHandler!=null&&L.deprecationHandler(e,t),Ca[e]||(xl(t),Ca[e]=!0)}L.suppressDeprecationWarnings=!1;L.deprecationHandler=null;function ht(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function u0(e){var t,n;for(n in e)te(e,n)&&(t=e[n],ht(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Ci(e,t){var n=Lt({},e),r;for(r in t)te(t,r)&&($t(e[r])&&$t(t[r])?(n[r]={},Lt(n[r],e[r]),Lt(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)te(e,r)&&!te(t,r)&&$t(e[r])&&(n[r]=Lt({},n[r]));return n}function ls(e){e!=null&&this.set(e)}var Ni;Object.keys?Ni=Object.keys:Ni=function(e){var t,n=[];for(t in e)te(e,t)&&n.push(t);return n};var h0={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function m0(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return ht(r)?r.call(t,n):r}function ft(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var cs=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,fi={},fn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(fn[e]=i),t&&(fn[t[0]]=function(){return ft(i.apply(this,arguments),t[1],t[2])}),n&&(fn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function p0(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function _0(e){var t=e.match(cs),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var w0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function g0(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(cs).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var x0="Invalid date";function y0(){return this._invalidDate}var b0="%d",v0=/\d{1,2}/;function k0(e){return this._ordinal.replace("%d",e)}var S0={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function E0(e,t,n,r){var i=this._relativeTime[n];return ht(i)?i(e,t,n,r):i.replace(/%d/i,e)}function D0(e,t){var n=this._relativeTime[e>0?"future":"past"];return ht(n)?n(t):n.replace(/%s/i,t)}var Rn={};function Oe(e,t){var n=e.toLowerCase();Rn[n]=Rn[n+"s"]=Rn[t]=e}function Ke(e){return typeof e=="string"?Rn[e]||Rn[e.toLowerCase()]:void 0}function ds(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var vl={};function Re(e,t){vl[e]=t}function T0(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:vl[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Nr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function pn(e,t){return function(n){return n!=null?(kl(this,e,n),L.updateOffset(this,t),this):br(this,e)}}function br(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function kl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Nr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),jr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function A0(e){return e=Ke(e),ht(this[e])?this[e]():this}function O0(e,t){if(typeof e=="object"){e=ds(e);var n=T0(e),r,i=n.length;for(r=0;r68?1900:2e3)};var Fl=pn("FullYear",!0);function z0(){return Nr(this.year())}function $0(e,t,n,r,i,s,a){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,i,s,a),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,i,s,a),l}function Nn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Nn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Ll(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),l=1+7*(t-1)+s+a,o,f;return l<=0?(o=e-1,f=Mn(o)+l):l>Mn(e)?(o=e+1,f=l-Mn(e)):(o=e,f=l),{year:o,dayOfYear:f}}function Pn(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+vt(a,t,n)):i>vt(e.year(),t,n)?(s=i-vt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function vt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(Mn(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Oe("week","w");Oe("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Zn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function K0(e){return Pn(e,this._week.dow,this._week.doy).week}var X0={dow:0,doy:6};function J0(){return this._week.dow}function Q0(){return this._week.doy}function eh(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function th(e){var t=Pn(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Oe("day","d");Oe("weekday","e");Oe("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Zn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Zn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function nh(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function rh(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function hs(e,t){return e.slice(t,7).concat(e.slice(0,t))}var ih="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Cl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),sh="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ah=Gn,oh=Gn,lh=Gn;function ch(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?hs(n,this._week.dow):e?n[e.day()]:n}function dh(e){return e===!0?hs(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function fh(e){return e===!0?hs(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function uh(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ut([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function hh(e,t,n){var r,i,s;if(this._weekdaysParseExact)return uh.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ut([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function mh(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=nh(e,this.localeData()),this.add(e-t,"d")):t}function ph(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function _h(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=rh(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function wh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||ms.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=ah),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function gh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||ms.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=oh),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function xh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||ms.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=lh),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ms(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,l,o,f;for(s=0;s<7;s++)a=ut([2e3,1]).day(s),l=je(this.weekdaysMin(a,"")),o=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(l),n.push(o),r.push(f),i.push(l),i.push(o),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ps(){return this.hours()%12||12}function yh(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,ps);H("k",["kk",2],0,yh);H("hmm",0,0,function(){return""+ps.apply(this)+ft(this.minutes(),2)});H("hmmss",0,0,function(){return""+ps.apply(this)+ft(this.minutes(),2)+ft(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+ft(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+ft(this.minutes(),2)+ft(this.seconds(),2)});function Nl(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Nl("a",!0);Nl("A",!1);Oe("hour","h");Re("hour",13);function Pl(e,t){return t._meridiemParse}C("a",Pl);C("A",Pl);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",Dl);C("hmmss",Tl);C("Hmm",Dl);C("Hmmss",Tl);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i))});function bh(e){return(e+"").toLowerCase().charAt(0)==="p"}var vh=/[ap]\.?m?\.?/i,kh=pn("Hours",!0);function Sh(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Ul={calendar:h0,longDateFormat:w0,invalidDate:x0,ordinal:b0,dayOfMonthOrdinalParse:v0,relativeTime:S0,months:U0,monthsShort:Al,week:X0,weekdays:ih,weekdaysMin:sh,weekdaysShort:Cl,meridiemParse:vh},de={},Dn={},Un;function Eh(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=Br(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&Eh(s,r)>=n-1)break;n--}t++}return Un}function Th(e){return e.match("^[^/\\\\]*$")!=null}function Br(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&Th(e))try{t=Un._abbr,n=require,n("./locale/"+e),Pt(t)}catch{de[e]=null}return de[e]}function Pt(e,t){var n;return e&&(Ce(t)?n=St(e):n=_s(e,t),n?Un=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Un._abbr}function _s(e,t){if(t!==null){var n,r=Ul;if(t.abbr=e,de[e]!=null)yl("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=Br(t.parentLocale),n!=null)r=n._config;else return Dn[t.parentLocale]||(Dn[t.parentLocale]=[]),Dn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new ls(Ci(r,t)),Dn[e]&&Dn[e].forEach(function(i){_s(i.name,i.config)}),Pt(e),de[e]}else return delete de[e],null}function Ah(e,t){if(t!=null){var n,r,i=Ul;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Ci(de[e]._config,t)):(r=Br(e),r!=null&&(i=r._config),t=Ci(i,t),r==null&&(t.abbr=e),n=new ls(t),n.parentLocale=de[e],de[e]=n),Pt(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Pt()&&Pt(e)):de[e]!=null&&delete de[e]);return de[e]}function St(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Un;if(!rt(e)){if(t=Br(e),t)return t;e=[e]}return Dh(e)}function Oh(){return Ni(de)}function ws(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[gt]<0||n[gt]>11?gt:n[ot]<1||n[ot]>jr(n[Ae],n[gt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[xt]!==0||n[zt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[xt]<0||n[xt]>59?xt:n[zt]<0||n[zt]>999?zt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=C0),z(e)._overflowWeekday&&t===-1&&(t=N0),z(e).overflow=t),e}var Rh=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mh=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ih=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ui=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Fh=/^\/?Date\((-?\d+)/i,Lh=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ch={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Yl(e){var t,n,r=e._i,i=Rh.exec(r)||Mh.exec(r),s,a,l,o,f=ir.length,d=ui.length;if(i){for(z(e).iso=!0,t=0,n=f;tMn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Nn(a,0,e._dayOfYear),e._a[gt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[xt]===0&&e._a[zt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Nn:$0).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function Bh(e){var t,n,r,i,s,a,l,o,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=sn(t.GG,e._a[Ae],Pn(oe(),1,4).year),r=sn(t.W,1),i=sn(t.E,1),(i<1||i>7)&&(o=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Pn(oe(),s,a),n=sn(t.gg,e._a[Ae],f.year),r=sn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(o=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(o=!0)):i=s),r<1||r>vt(n,s,a)?z(e)._overflowWeeks=!0:o!=null?z(e)._overflowWeekday=!0:(l=Ll(n,r,i,s,a),e._a[Ae]=l.year,e._dayOfYear=l.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function xs(e){if(e._f===L.ISO_8601){Yl(e);return}if(e._f===L.RFC_2822){Wl(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,l=t.length,o=0,f,d;for(i=bl(e._f,e._locale).match(cs)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),o+=r.length),fn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),L0(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=l-o,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=Vh(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Ae]=e._locale.erasConvertYear(f,e._a[Ae])),gs(e),ws(e)}function Vh(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Gh(e){var t,n,r,i,s,a,l=!1,o=e._f.length;if(o===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Cr()});function Bl(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function u1(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return os(e,this),e=Hl(e),e._a?(t=e._isUTC?ut(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&r1(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function h1(){return this.isValid()?!this._isUTC:!1}function m1(){return this.isValid()?this._isUTC:!1}function Gl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var p1=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,_1=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:kt(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=p1.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[xt])*i,ms:$(Ui(r[zt]*1e3))*i}):(r=_1.exec(e))?(i=r[1]==="-"?-1:1,n={y:Zt(r[2],i),M:Zt(r[3],i),w:Zt(r[4],i),d:Zt(r[5],i),h:Zt(r[6],i),m:Zt(r[7],i),s:Zt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=w1(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Vr(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Vr.prototype;st.invalid=n1;function Zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Pa(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function w1(e,t){var n;return e.isValid()&&t.isValid()?(t=bs(t,e),e.isBefore(t)?n=Pa(e,t):(n=Pa(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Zl(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(yl(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),ql(this,i,e),this}}function ql(e,t,n,r){var i=t._milliseconds,s=Ui(t._days),a=Ui(t._months);!e.isValid()||(r=r==null?!0:r,a&&Rl(e,br(e,"Month")+a*n),s&&kl(e,"Date",br(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var g1=Zl(1,"add"),x1=Zl(-1,"subtract");function zl(e){return typeof e=="string"||e instanceof String}function y1(e){return it(e)||Bn(e)||zl(e)||kt(e)||v1(e)||b1(e)||e===null||e===void 0}function b1(e){var t=$t(e)&&!ss(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ht(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function N1(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function P1(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function U1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Y1(e){return this.from(oe(),e)}function W1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function H1(e){return this.to(oe(),e)}function $l(e){var t;return e===void 0?this._locale._abbr:(t=St(e),t!=null&&(this._locale=t),this)}var Kl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Xl(){return this._locale}var Sr=1e3,un=60*Sr,Er=60*un,Jl=(365*400+97)*24*Er;function hn(e,t){return(e%t+t)%t}function Ql(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Jl:new Date(e,t,n).valueOf()}function ec(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Jl:Date.UTC(e,t,n)}function j1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?ec:Ql,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hn(t+(this._isUTC?0:this.utcOffset()*un),Er);break;case"minute":t=this._d.valueOf(),t-=hn(t,un);break;case"second":t=this._d.valueOf(),t-=hn(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function B1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?ec:Ql,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-hn(t+(this._isUTC?0:this.utcOffset()*un),Er)-1;break;case"minute":t=this._d.valueOf(),t+=un-hn(t,un)-1;break;case"second":t=this._d.valueOf(),t+=Sr-hn(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function V1(){return this._d.valueOf()-(this._offset||0)*6e4}function G1(){return Math.floor(this.valueOf()/1e3)}function Z1(){return new Date(this.valueOf())}function q1(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function z1(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function $1(){return this.isValid()?this.toISOString():null}function K1(){return as(this)}function X1(){return Lt({},z(this))}function J1(){return z(this).overflow}function Q1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",vs);C("NN",vs);C("NNN",vs);C("NNNN",dm);C("NNNNN",fm);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",_n);C("yy",_n);C("yyy",_n);C("yyyy",_n);C("yo",um);ie(["y","yy","yyy","yyyy"],Ae);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ae]=n._locale.eraYearOrdinalParse(e,i):t[Ae]=parseInt(e,10)});function em(e,t){var n,r,i,s=this._eras||St("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function nm(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function rm(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),xm.call(this,e,t,n,r,i))}function xm(e,t,n,r,i){var s=Ll(e,t,n,r,i),a=Nn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Oe("quarter","Q");Re("quarter",7);C("Q",Sl);ie("Q",function(e,t){t[gt]=($(e)-1)*3});function ym(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Oe("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var nc=pn("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Oe("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Ur);C("DDDD",El);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function bm(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Oe("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var vm=pn("Minutes",!1);H("s",["ss",2],0,"second");Oe("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],xt);var km=pn("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Oe("millisecond","ms");Re("millisecond",16);C("S",Ur,Sl);C("SS",Ur,Be);C("SSS",Ur,El);var Ct,rc;for(Ct="SSSS";Ct.length<=9;Ct+="S")C(Ct,_n);function Sm(e,t){t[zt]=$(("0."+e)*1e3)}for(Ct="S";Ct.length<=9;Ct+="S")ie(Ct,Sm);rc=pn("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function Em(){return this._isUTC?"UTC":""}function Dm(){return this._isUTC?"Coordinated Universal Time":""}var M=Vn.prototype;M.add=g1;M.calendar=E1;M.clone=D1;M.diff=F1;M.endOf=B1;M.format=P1;M.from=U1;M.fromNow=Y1;M.to=W1;M.toNow=H1;M.get=A0;M.invalidAt=J1;M.isAfter=T1;M.isBefore=A1;M.isBetween=O1;M.isSame=R1;M.isSameOrAfter=M1;M.isSameOrBefore=I1;M.isValid=K1;M.lang=Kl;M.locale=$l;M.localeData=Xl;M.max=Kh;M.min=$h;M.parsingFlags=X1;M.set=O0;M.startOf=j1;M.subtract=x1;M.toArray=q1;M.toObject=z1;M.toDate=Z1;M.toISOString=C1;M.inspect=N1;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=$1;M.toString=L1;M.unix=G1;M.valueOf=V1;M.creationData=Q1;M.eraName=rm;M.eraNarrow=im;M.eraAbbr=sm;M.eraYear=am;M.year=Fl;M.isLeapYear=z0;M.weekYear=hm;M.isoWeekYear=mm;M.quarter=M.quarters=ym;M.month=Ml;M.daysInMonth=G0;M.week=M.weeks=eh;M.isoWeek=M.isoWeeks=th;M.weeksInYear=wm;M.weeksInWeekYear=gm;M.isoWeeksInYear=pm;M.isoWeeksInISOWeekYear=_m;M.date=nc;M.day=M.days=mh;M.weekday=ph;M.isoWeekday=_h;M.dayOfYear=bm;M.hour=M.hours=kh;M.minute=M.minutes=vm;M.second=M.seconds=km;M.millisecond=M.milliseconds=rc;M.utcOffset=s1;M.utc=o1;M.local=l1;M.parseZone=c1;M.hasAlignedHourOffset=d1;M.isDST=f1;M.isLocal=h1;M.isUtcOffset=m1;M.isUtc=Gl;M.isUTC=Gl;M.zoneAbbr=Em;M.zoneName=Dm;M.dates=$e("dates accessor is deprecated. Use date instead.",nc);M.months=$e("months accessor is deprecated. Use month instead",Ml);M.years=$e("years accessor is deprecated. Use year instead",Fl);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",a1);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",u1);function Tm(e){return oe(e*1e3)}function Am(){return oe.apply(null,arguments).parseZone()}function ic(e){return e}var ne=ls.prototype;ne.calendar=m0;ne.longDateFormat=g0;ne.invalidDate=y0;ne.ordinal=k0;ne.preparse=ic;ne.postformat=ic;ne.relativeTime=E0;ne.pastFuture=D0;ne.set=u0;ne.eras=em;ne.erasParse=tm;ne.erasConvertYear=nm;ne.erasAbbrRegex=lm;ne.erasNameRegex=om;ne.erasNarrowRegex=cm;ne.months=H0;ne.monthsShort=j0;ne.monthsParse=V0;ne.monthsRegex=q0;ne.monthsShortRegex=Z0;ne.week=K0;ne.firstDayOfYear=Q0;ne.firstDayOfWeek=J0;ne.weekdays=ch;ne.weekdaysMin=fh;ne.weekdaysShort=dh;ne.weekdaysParse=hh;ne.weekdaysRegex=wh;ne.weekdaysShortRegex=gh;ne.weekdaysMinRegex=xh;ne.isPM=bh;ne.meridiem=Sh;function Dr(e,t,n,r){var i=St(),s=ut().set(r,t);return i[n](s,e)}function sc(e,t,n){if(kt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function Ss(e,t,n,r){typeof e=="boolean"?(kt(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,kt(t)&&(n=t,t=void 0),t=t||"");var i=St(),s=e?i._week.dow:0,a,l=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)l[a]=Dr(t,(a+s)%7,r,"day");return l}function Om(e,t){return sc(e,t,"months")}function Rm(e,t){return sc(e,t,"monthsShort")}function Mm(e,t,n){return Ss(e,t,n,"weekdays")}function Im(e,t,n){return Ss(e,t,n,"weekdaysShort")}function Fm(e,t,n){return Ss(e,t,n,"weekdaysMin")}Pt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Pt);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",St);var _t=Math.abs;function Lm(){var e=this._data;return this._milliseconds=_t(this._milliseconds),this._days=_t(this._days),this._months=_t(this._months),e.milliseconds=_t(e.milliseconds),e.seconds=_t(e.seconds),e.minutes=_t(e.minutes),e.hours=_t(e.hours),e.months=_t(e.months),e.years=_t(e.years),this}function ac(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Cm(e,t){return ac(this,e,t,1)}function Nm(e,t){return ac(this,e,t,-1)}function Ua(e){return e<0?Math.floor(e):Math.ceil(e)}function Pm(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,l,o;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Ua(Wi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),o=Ze(oc(t)),n+=o,t-=Ua(Wi(o)),l=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=l,this}function oc(e){return e*4800/146097}function Wi(e){return e*146097/4800}function Um(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+oc(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Wi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Ym(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Et(e){return function(){return this.as(e)}}var Wm=Et("ms"),Hm=Et("s"),jm=Et("m"),Bm=Et("h"),Vm=Et("d"),Gm=Et("w"),Zm=Et("M"),qm=Et("Q"),zm=Et("y");function $m(){return st(this)}function Km(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Xt(e){return function(){return this.isValid()?this._data[e]:NaN}}var Xm=Xt("milliseconds"),Jm=Xt("seconds"),Qm=Xt("minutes"),ep=Xt("hours"),tp=Xt("days"),np=Xt("months"),rp=Xt("years");function ip(){return Ze(this.days()/7)}var wt=Math.round,ln={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function sp(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function ap(e,t,n,r){var i=st(e).abs(),s=wt(i.as("s")),a=wt(i.as("m")),l=wt(i.as("h")),o=wt(i.as("d")),f=wt(i.as("M")),d=wt(i.as("w")),u=wt(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,sp.apply(null,p)}function op(e){return e===void 0?wt:typeof e=="function"?(wt=e,!0):!1}function lp(e,t){return ln[e]===void 0?!1:t===void 0?ln[e]:(ln[e]=t,e==="s"&&(ln.ss=t-1),!0)}function cp(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ln,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ln,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=ap(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var hi=Math.abs;function nn(e){return(e>0)-(e<0)||+e}function Zr(){if(!this.isValid())return this.localeData().invalidDate();var e=hi(this._milliseconds)/1e3,t=hi(this._days),n=hi(this._months),r,i,s,a,l=this.asSeconds(),o,f,d,u;return l?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",o=l<0?"-":"",f=nn(this._months)!==nn(l)?"-":"",d=nn(this._days)!==nn(l)?"-":"",u=nn(this._milliseconds)!==nn(l)?"-":"",o+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Vr.prototype;X.isValid=t1;X.abs=Lm;X.add=Cm;X.subtract=Nm;X.as=Um;X.asMilliseconds=Wm;X.asSeconds=Hm;X.asMinutes=jm;X.asHours=Bm;X.asDays=Vm;X.asWeeks=Gm;X.asMonths=Zm;X.asQuarters=qm;X.asYears=zm;X.valueOf=Ym;X._bubble=Pm;X.clone=$m;X.get=Km;X.milliseconds=Xm;X.seconds=Jm;X.minutes=Qm;X.hours=ep;X.days=tp;X.weeks=ip;X.months=np;X.years=rp;X.humanize=cp;X.toISOString=Zr;X.toString=Zr;X.toJSON=Zr;X.locale=$l;X.localeData=Xl;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zr);X.lang=Kl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Wr);C("X",M0);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js +L.version="2.29.4";d0(oe);L.fn=M;L.min=Xh;L.max=Jh;L.now=Qh;L.utc=ut;L.unix=Tm;L.months=Om;L.isDate=Bn;L.locale=Pt;L.invalid=Cr;L.duration=st;L.isMoment=it;L.weekdays=Mm;L.parseZone=Am;L.localeData=St;L.isDuration=dr;L.monthsShort=Rm;L.weekdaysMin=Fm;L.defineLocale=_s;L.updateLocale=Ah;L.locales=Oh;L.weekdaysShort=Im;L.normalizeUnits=Ke;L.relativeTimeRounding=op;L.relativeTimeThreshold=lp;L.calendarFormat=S1;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function dp(e,t,n,r,i=Date.now()){var p;const[s,a]=(p=l0(n))!=null?p:[[],0];let l=ju(n,a),o=e;const f=l[0]&&l[0].content.match(/^title::(.+)$/);f&&(o=f[1],l=l.slice(1)),l[0]&&l[0].content.replace(/^#+/,"").trim()===o.trim()&&(l=l.slice(1));const d=[],u=fp(o,t,i,r,s);return rl(u,{type:dt.ROOT,level:-1},l,Zu,w=>o0(e,t,w,i,r),(w,D)=>{D.type===dt.HEADING&&d.push({...D,uid:w.uid})}),l=null,r.headingTracker.pathMap.set(t,d),r.headingTracker.nameMap.get(e)||r.headingTracker.nameMap.set(e,d),u}function fp(e,t,n,r,i){let s;const a=[];i.forEach(d=>{d.key==="tags"?s=hl(d.values,r.superTagTracker,r.idGenerator):a.push(r0(e,t,d,n,r))});let l=Tu(e,t,r),o="node";const f=up(e,r.dailyNoteFormat);return f&&(l=f,o="date",e=f,r.summary.calendarNodes++),{uid:l,name:e,createdAt:n,editedAt:n,type:o,supertags:s,children:a.length>0?a:void 0}}function up(e,t){const n=L(e,t,!0);return n.isValid()?n.format("MM-DD-YYYY"):null}function Ya(e,t){return e===t.length-1?"LAST":"NOT_LAST"}function hp(e,t){return e.adapter.readDirectory(t).filter(n=>{const r=t+Fr+n.getName();return n.isDirectory()&&!r.endsWith(".github")&&!r.endsWith(".obsidian")||!n.isDirectory()&&r.endsWith(".md")}).sort((n,r)=>Number(n.isDirectory())-Number(r.isDirectory()))}async function lc(e,t,n,r,i,s="LAST"){n(t);const a=hp(e,t);for(let l=0;l{const i=Ir(r),s=Wt(n);n.adapter.appendToResultFile(e,`{ "uid": "${s}", "name": "${i}", "createdAt": ${t}, "editedAt": ${t}, "type": "node", "children": [ - `)}}function hp(e,t){return n=>{e.adapter.appendToResultFile(t,`] - }`),n!=="LAST"&&e.adapter.appendToResultFile(t,",")}}function mp(e,t,n){return async(r,i)=>{const s=r.slice(n.vaultPath.length+1,-3),a=lp(Ir(r).replace(".md",""),s,await n.adapter.readFile(r),n,t);n.adapter.appendToResultFile(e,JSON.stringify(a,null,2)),i!=="LAST"&&n.adapter.appendToResultFile(e,",")}}async function pp(e,t=Date.now()){await e.adapter.initReadingVault(),await _p(e);const n=`${e.vaultPath}.tif.json`;try{e.adapter.removeFile(n)}catch{}e.adapter.appendToResultFile(n,`{ + `)}}function pp(e,t){return n=>{e.adapter.appendToResultFile(t,`] + }`),n!=="LAST"&&e.adapter.appendToResultFile(t,",")}}function _p(e,t,n){return async(r,i)=>{const s=r.slice(n.vaultPath.length+1,-3),a=dp(Ir(r).replace(".md",""),s,await n.adapter.readFile(r),n,t);n.adapter.appendToResultFile(e,JSON.stringify(a,null,2)),i!=="LAST"&&n.adapter.appendToResultFile(e,",")}}async function wp(e,t=Date.now()){await e.adapter.initReadingVault(),await gp(e);const n=`${e.vaultPath}.tif.json`;try{e.adapter.removeFile(n)}catch{}e.adapter.appendToResultFile(n,`{ "version": "TanaIntermediateFile V0.1", "nodes": [ -`),await ac(e,e.vaultPath,up(n,t,e),hp(e,n),mp(n,t,e)),e.adapter.flushResultsFromInitialProcessing(n),nl(e.summary),await gu(n,e);const r=Au(Ir(e.vaultPath),t,e);r&&e.adapter.appendToResultFile(n,", "+JSON.stringify(r,null,2)),e.adapter.appendToResultFile(n,` - ]`);const i=$u(e.superTagTracker);return i.length>0&&e.adapter.appendToResultFile(n,`, +`),await lc(e,e.vaultPath,mp(n,t,e),pp(e,n),_p(n,t,e)),e.adapter.flushResultsFromInitialProcessing(n),nl(e.summary),await yu(n,e);const r=Ru(Ir(e.vaultPath),t,e);r&&e.adapter.appendToResultFile(n,", "+JSON.stringify(r,null,2)),e.adapter.appendToResultFile(n,` + ]`);const i=Xu(e.superTagTracker);return i.length>0&&e.adapter.appendToResultFile(n,`, "supertags": `+JSON.stringify(i,null,2)),e.attributes.length>0&&e.adapter.appendToResultFile(n,`, "attributes": `+JSON.stringify(e.attributes,null,2)),e.adapter.appendToResultFile(n,`, "summary": `+JSON.stringify(e.summary,null,2)),e.adapter.appendToResultFile(n,` -}`),e.adapter.flushResultsFromInitialProcessing(n),e.summary}async function _p(e){const t=await iu(e,"daily-notes",n=>n||{format:"YYYY-MM-DD"});e.dailyNoteFormat=t.format,console.log("Using daily notes format "+t.format+" for detecting calendar nodes.")}async function wp(e,t,n,r){const i=new su(e),s=cu(t,i,r);return pp(s,n).then(a=>[a,s,i])}const gp=document.getElementById("vault-zip");gp.addEventListener("change",async e=>{let t,n=0;try{const r=e.target.files[0],i=r.name.slice(0,r.name.indexOf(".zip"));t=document.createElement("b"),t.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(t);const s=setInterval(()=>n++,1e3),[a,,o]=await wp(r,i,Date.now());clearInterval(s),document.body.removeChild(t);const l=document.createElement("b");l.innerHTML="Success! And it only took "+n+" seconds.
",document.body.appendChild(l);const f=document.createElement("h2");f.innerText="Summary:",document.body.appendChild(f);const d=document.createElement("p");d.innerText=Object.entries(a).map(w=>w[0]+": "+w[1]).join(` -`),document.body.appendChild(d);const u=o.getResult(),p=document.createElement("button");p.innerText="Download TIF File",p.addEventListener("click",()=>{const w=URL.createObjectURL(new Blob([u])),v=document.createElement("a");v.style.display="none",v.href=w,v.download=i+".tif.json",document.body.appendChild(v),v.click(),URL.revokeObjectURL(w)}),document.body.appendChild(p)}catch(r){console.trace(r),t&&document.body.removeChild(t);const i=r.stack.toString();document.body.appendChild(document.createElement("br"));const s=document.createElement("b");if(s.innerText="An Error occured.",document.body.appendChild(s),i.toLowerCase().includes("readdirectory")){document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const o=document.createElement("b");o.innerText=`It probably has to do with a not properly zipped vault. -Please check the text at the top again.`,document.body.appendChild(o)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack): +}`),e.adapter.flushResultsFromInitialProcessing(n),e.summary}async function gp(e){const t=await au(e,"daily-notes",n=>n||{format:"YYYY-MM-DD"});e.dailyNoteFormat=t.format,console.log("Using daily notes format "+t.format+" for detecting calendar nodes.")}async function xp(e,t,n,r){const i=new ou(e),s=fu(t,i,r);return wp(s,n).then(a=>[a,s,i])}const yp=document.getElementById("vault-zip");yp.addEventListener("change",async e=>{let t,n=0;try{const r=e.target.files[0],i=r.name.slice(0,r.name.indexOf(".zip"));t=document.createElement("b"),t.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(t);const s=setInterval(()=>n++,1e3),[a,,l]=await xp(r,i,Date.now());clearInterval(s),document.body.removeChild(t);const o=document.createElement("b");o.innerHTML="Success! And it only took "+n+" seconds.
",document.body.appendChild(o);const f=document.createElement("h2");f.innerText="Summary:",document.body.appendChild(f);const d=document.createElement("p");d.innerText=Object.entries(a).map(w=>w[0]+": "+w[1]).join(` +`),document.body.appendChild(d);const u=l.getResult(),p=document.createElement("button");p.innerText="Download TIF File",p.addEventListener("click",()=>{const w=URL.createObjectURL(new Blob([u])),D=document.createElement("a");D.style.display="none",D.href=w,D.download=i+".tif.json",document.body.appendChild(D),D.click(),URL.revokeObjectURL(w)}),document.body.appendChild(p)}catch(r){console.trace(r),t&&document.body.removeChild(t);const i=r.stack.toString();document.body.appendChild(document.createElement("br"));const s=document.createElement("b");if(s.innerText="An Error occured.",document.body.appendChild(s),i.toLowerCase().includes("readdirectory")){document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const l=document.createElement("b");l.innerText=`It probably has to do with a not properly zipped vault. +Please check the text at the top again.`,document.body.appendChild(l)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack): `+i,document.body.appendChild(a)}}); -//# sourceMappingURL=index.2b2a3e87.js.map +//# sourceMappingURL=index.37a61c5d.js.map diff --git a/docs/assets/index.37a61c5d.js.map b/docs/assets/index.37a61c5d.js.map new file mode 100644 index 0000000..9235383 --- /dev/null +++ b/docs/assets/index.37a61c5d.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.37a61c5d.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: () => Data) {\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData();\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: () => Data) {\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData();\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(fileName, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(fileName, filePath, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(obsidianLink, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n });\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(obsidianLink, filePath, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n });\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: tags are too naive! ()\nexport function detectTags(content: string) {\n return content.match(tagRegex);\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tag without losing meaning because it will show up as a super tag anyways\n const lastTag = tags[tags.length - 1];\n if (tanaNode.name.endsWith(lastTag)) {\n tanaNode.name = tanaNode.name.slice(0, -lastTag.length);\n }\n\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport moment from 'moment';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n let nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeUid = dateDisplayName;\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n\nfunction dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return null;\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","dailyNoteFormat","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","alias","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","pos","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","detectTags","cleanUpTag","tag","superTagUidRequests","tags","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","image","childImageNodes","oldLink","postProcessContentNode","updatedContent","todoState","lastTag","keyValToFieldNode","values","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","displayName","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","dateStringToDateUID","moment","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iB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AK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 47fa8d2..dbab03f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

diff --git a/src/converters/obsidian/links/internalLinks.ts b/src/converters/obsidian/links/internalLinks.ts index 777d342..573c259 100644 --- a/src/converters/obsidian/links/internalLinks.ts +++ b/src/converters/obsidian/links/internalLinks.ts @@ -4,6 +4,7 @@ import { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './b import { untrackedUidRequest } from './genericLinks'; import { headingLinkUidRequestForUsing } from './headingLinks'; import { getBracketLinks } from '../../../utils/utils'; +import { TanaIntermediateNode } from '../../../types/types'; export enum UidRequestType { FILE, @@ -16,12 +17,32 @@ export enum LinkType { BLOCK, } -export function requestUidsForAllLinks(content: string, context: VaultContext) { +export function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) { + const foundUIDs = requestUidsForAllLinks(tanaNode.name, context); + + if (foundUIDs.length > 0) { + //using Set to filter out links that appear multiple times + const refSet = new Set(); + if (!tanaNode.refs) { + tanaNode.refs = []; + } + for (const [link, foundUid, result] of foundUIDs) { + refSet.add(foundUid); + tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result); + } + tanaNode.refs.push(...Array.from(refSet.values())); + } +} + +export function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] { return getBracketLinks(content, true) - .filter((bracketLink) => bracketLink.trim() !== '') - .map((bracketLink) => { + .map((bracketLink): [string, string[]] => { + return [bracketLink, bracketLink.split('|').map((s) => s.trim())]; + }) + .filter((arr) => arr[1][0] !== '') + .map((arr) => { + const aliasArr = arr[1]; //handling aliases - const aliasArr = bracketLink.split('|'); const link = aliasArr[0]; const alias = aliasArr[1]; const foundUid = requestUidForLink(link, context); @@ -30,7 +51,7 @@ export function requestUidsForAllLinks(content: string, context: VaultContext) { ? '[' + alias.trim() + ']([[' + foundUid + ']])' : '[[' + foundUid + ']]'; - return [bracketLink, foundUid, result]; + return [arr[0], foundUid, result]; }); } diff --git a/src/converters/obsidian/markdown/todo.ts b/src/converters/obsidian/markdown/todo.ts index 76451eb..84d8319 100644 --- a/src/converters/obsidian/markdown/todo.ts +++ b/src/converters/obsidian/markdown/todo.ts @@ -1,4 +1,4 @@ -import { Hierarchy, HierarchyType } from '../hierarchy/markdownNodes'; +import { HierarchyType } from '../hierarchy/markdownNodes'; function detectTodoType(content: string) { if (content.startsWith('[ ] ')) { @@ -11,8 +11,8 @@ function detectTodoType(content: string) { return undefined; } -export function removeTodo(content: string, hierarchy: Hierarchy): [string, 'todo' | 'done'] | null { - if (hierarchy.type === HierarchyType.BULLET) { +export function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null { + if (hierarchyType === HierarchyType.BULLET) { const type = detectTodoType(content); if (type) { return [content.slice('[ ] '.length), type]; diff --git a/src/converters/obsidian/tanaconversion/fileConversion.ts b/src/converters/obsidian/tanaconversion/fileConversion.ts index 40c5e9d..21f290b 100644 --- a/src/converters/obsidian/tanaconversion/fileConversion.ts +++ b/src/converters/obsidian/tanaconversion/fileConversion.ts @@ -79,7 +79,7 @@ function createFileNode( if (data.key === 'tags') { supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator); } else { - fieldNodes.push(frontMatterToFieldNode(data, today, context)); + fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context)); } }); diff --git a/src/converters/obsidian/tanaconversion/nodeConversion.ts b/src/converters/obsidian/tanaconversion/nodeConversion.ts index 762fc42..c5dd49d 100644 --- a/src/converters/obsidian/tanaconversion/nodeConversion.ts +++ b/src/converters/obsidian/tanaconversion/nodeConversion.ts @@ -1,15 +1,12 @@ import { NodeType, TanaIntermediateNode } from '../../../types/types'; import { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes'; import { VaultContext } from '../VaultContext'; -import { superTagUidRequests } from '../tanafeatures/supertags'; import { untrackedUidRequest } from '../links/genericLinks'; -import { removeTodo } from '../markdown/todo'; -import { detectTags } from '../markdown/tags'; -import { handleImages } from '../tanafeatures/imageNodes'; import { postProcessCodeBlock } from '../hierarchy/codeblocks'; -import { requestUidForContentNode, requestUidsForAllLinks } from '../links/internalLinks'; +import { requestUidForContentNode } from '../links/internalLinks'; import { keyValToFieldNode } from '../tanafeatures/fields'; import { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes'; +import { postProcessContentNode } from '../tanafeatures/postprocessing'; function convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) { const tanaNode: TanaIntermediateNode = { @@ -24,18 +21,18 @@ function convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: Va } function convertDataViewAttribute( + fileName: string, + filePath: string, obsidianNode: MarkdownNode, - tanaNode: TanaIntermediateNode, today: number, context: VaultContext, ) { //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets) - if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(tanaNode.name)) { - const splitName = tanaNode.name.split('::'); - return keyValToFieldNode(splitName[0], [splitName[1].trim()], today, context, tanaNode.uid); + if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) { + const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context); + const splitName = content.split('::'); + return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid); } - - return; } export function convertMarkdownNode( @@ -49,53 +46,22 @@ export function convertMarkdownNode( return convertCodeBlock(obsidianNode, today, context); } - const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context); - const tanaNode: TanaIntermediateNode = { - uid, - name: content, - createdAt: today, - editedAt: today, - type: 'node' as NodeType, - }; - - const [updatedContent, todoState] = removeTodo(content, obsidianNode) ?? [content, undefined]; - tanaNode.name = updatedContent; - tanaNode.todoState = todoState; - - //LogSeq specific - tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim(); - - // tags are kept inline but added as separate supertags too - // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed - const tags = detectTags(tanaNode.name); - if (tags) { - //we can remove the last tag without losing meaning because it will show up as a super tag anyways - const lastTag = tags[tags.length - 1]; - if (tanaNode.name.endsWith(lastTag)) { - tanaNode.name = tanaNode.name.slice(0, -lastTag.length); - } - - tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true); - } - - const foundUIDs = requestUidsForAllLinks(tanaNode.name, context); - - if (foundUIDs.length > 0) { - //using Set to filter out links that appear multiple times - const refSet = new Set(); - if (!tanaNode.refs) { - tanaNode.refs = []; - } - for (const [link, foundUid, result] of foundUIDs) { - refSet.add(foundUid); - tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result); - } - tanaNode.refs.push(...Array.from(refSet.values())); + const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context); + if (dataviewNode) { + return dataviewNode; } - handleImages(tanaNode, today, context); - - const dataviewAttributeNode = convertDataViewAttribute(obsidianNode, tanaNode, today, context); - - return dataviewAttributeNode ?? tanaNode; + return postProcessContentNode( + fileName, + filePath, + today, + { + name: obsidianNode.content, + createdAt: today, + editedAt: today, + type: 'node' as NodeType, + }, + context, + obsidianNode.type, + ); } diff --git a/src/converters/obsidian/tanafeatures/fields.ts b/src/converters/obsidian/tanafeatures/fields.ts index 5f639e9..801c26b 100644 --- a/src/converters/obsidian/tanafeatures/fields.ts +++ b/src/converters/obsidian/tanafeatures/fields.ts @@ -2,8 +2,12 @@ import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../.. import { VaultContext } from '../VaultContext'; import { FrontmatterData } from '../markdown/frontmatter'; import { untrackedUidRequest } from '../links/genericLinks'; +import { postProcessContentNode } from './postprocessing'; +//TODO: separate contexts cleanly again export function keyValToFieldNode( + fileName: string, + filePath: string, key: string, values: string[], today: number, @@ -16,13 +20,20 @@ export function keyValToFieldNode( if (values && values.length > 0) { childNodes = children ?? []; childNodes?.push( - ...values.map((value) => ({ - uid: untrackedUidRequest(context), - name: value, - type: 'node' as NodeType, - createdAt: today, - editedAt: today, - })), + ...values.map((value) => + postProcessContentNode( + fileName, + filePath, + today, + { + name: value, + type: 'node' as NodeType, + createdAt: today, + editedAt: today, + }, + context, + ), + ), ); } addAttribute(key, context.attributes); @@ -39,11 +50,13 @@ export function keyValToFieldNode( } export function frontMatterToFieldNode( + fileName: string, + filePath: string, data: FrontmatterData, today: number, context: VaultContext, ): TanaIntermediateNode { - return keyValToFieldNode(data.key, data.values, today, context); + return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context); } function addAttribute(name: string, attributes: TanaIntermediateAttribute[]) { diff --git a/src/converters/obsidian/tanafeatures/postprocessing.ts b/src/converters/obsidian/tanafeatures/postprocessing.ts new file mode 100644 index 0000000..9deea81 --- /dev/null +++ b/src/converters/obsidian/tanafeatures/postprocessing.ts @@ -0,0 +1,47 @@ +import { TanaIntermediateNode } from '../../../types/types'; +import { HierarchyType } from '../hierarchy/markdownNodes'; +import { VaultContext } from '../VaultContext'; +import { superTagUidRequests } from './supertags'; +import { removeTodo } from '../markdown/todo'; +import { detectTags } from '../markdown/tags'; +import { handleImages } from './imageNodes'; +import { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks'; + +export function postProcessContentNode( + fileName: string, + filePath: string, + today: number, + tanaNode: Omit & { uid?: string }, + context: VaultContext, + hierarchyType?: HierarchyType, +) { + const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined]; + tanaNode.name = updatedContent; + tanaNode.todoState = todoState; + + const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context); + tanaNode.uid = uid; + tanaNode.name = content; + + //LogSeq specific + tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim(); + + // tags are kept inline but added as separate supertags too + // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed + const tags = detectTags(tanaNode.name); + if (tags) { + //we can remove the last tag without losing meaning because it will show up as a super tag anyways + const lastTag = tags[tags.length - 1]; + if (tanaNode.name.endsWith(lastTag)) { + tanaNode.name = tanaNode.name.slice(0, -lastTag.length); + } + + tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true); + } + + setUidsInNodeContent(tanaNode as TanaIntermediateNode, context); + + handleImages(tanaNode as TanaIntermediateNode, today, context); + + return tanaNode as TanaIntermediateNode; +} diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index f8fb9cc..fe994d6 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -21,102 +21,102 @@ "type": "field", "createdAt": 1, "editedAt": 1, - "children": [{ "uid": "1", "name": "value0", "type": "node", "createdAt": 1, "editedAt": 1 }] + "children": [{ "name": "value0", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "1" }] }, { - "uid": "4", "name": "Starting without [[5]].", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "4", "refs": ["5"] }, { - "uid": "6", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "6", "children": [ - { "uid": "7", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, - { "uid": "9", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "7", "refs": ["8"] }, + { "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "9" }, { - "uid": "10", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "10", "children": [ { - "uid": "11", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "11", "children": [ { - "uid": "12", "name": "Node with [[13]] [[14]]", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "12", "refs": ["13", "14"] }, { - "uid": "15", "name": "Fun", "createdAt": 1, "editedAt": 1, "type": "node", - "todoState": "todo" + "todoState": "todo", + "uid": "15" } ] }, { - "uid": "16", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "16", "children": [ { - "uid": "17", "name": "[[18]]", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "17", "refs": ["18"] }, { - "uid": "19", - "name": "[[66]]", + "name": "[[67]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["66"] + "uid": "19", + "refs": ["67"] }, { - "uid": "21", "name": "[[22]]", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "21", "refs": ["22"] }, { - "uid": "23", "name": "Using a duplicate but valid block id [[24]]", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "23", "refs": ["24"] }, { - "uid": "25", "name": "Invalid [[26]]", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "25", "refs": ["26"] } ] @@ -141,7 +141,7 @@ "type": "field", "createdAt": 1, "editedAt": 1, - "children": [{ "uid": "27", "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1 }] + "children": [{ "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "27" }] }, { "uid": "33", @@ -150,58 +150,58 @@ "createdAt": 1, "editedAt": 1, "children": [ - { "uid": "31", "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1 }, - { "uid": "32", "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1 } + { "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "31" }, + { "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "32" } ] }, { - "uid": "35", "name": "Starting without [[5]].", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "35", "refs": ["5"] }, { - "uid": "36", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "36", "children": [ - { "uid": "37", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, - { "uid": "38", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "37", "refs": ["8"] }, + { "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "38" }, { - "uid": "39", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "39", "children": [ - { "uid": "40", "name": "```", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "name": "```", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "40" }, { - "uid": "41", "name": "Invalid Heading [[!42!]]", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "41", "refs": ["!42!"], "children": [ { - "uid": "43", "name": "Block with #inlinetag2 [alias]([[13]]) [[13]] [[14]]", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "43", "supertags": ["44", "45"], "refs": ["13", "14"] }, { - "uid": "46", "name": "#inlinetag2 Fun", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "46", "supertags": ["44"] } ] @@ -215,35 +215,35 @@ "type": "codeblock" }, { - "uid": "48", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "48", "children": [ { "uid": "49", "name": "code here", "createdAt": 1, "editedAt": 1, "type": "codeblock" }, { - "uid": "50", "name": "single image", "createdAt": 1, "editedAt": 1, "type": "image", + "uid": "50", "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "51", "name": "single image some text", "createdAt": 1, "editedAt": 1, "type": "image", + "uid": "51", "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "52", "name": "[[53]] [[54]]", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "52", "children": [ { "uid": "53", @@ -264,11 +264,11 @@ ] }, { - "uid": "55", "name": "[[56]] [[56]]", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "55", "children": [ { "uid": "56", @@ -281,11 +281,11 @@ ] }, { - "uid": "57", "name": "ancient public baths", "createdAt": 1, "editedAt": 1, "type": "image", + "uid": "57", "mediaUrl": "http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg" } ] @@ -312,27 +312,27 @@ "supertags": ["29", "30"], "children": [ { - "uid": "59", "name": "Starting without [[5]] 2.", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "59", "refs": ["5"] }, { - "uid": "60", "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "60", "children": [ - { "uid": "61", "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "refs": ["8"] }, + { "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "61", "refs": ["8"] }, { - "uid": "62", "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, - "type": "node" + "type": "node", + "uid": "62" }, { "uid": "63", @@ -340,66 +340,68 @@ "type": "field", "createdAt": 1, "editedAt": 1, - "children": [{ "uid": "64", "name": "Value1", "type": "node", "createdAt": 1, "editedAt": 1 }] + "children": [ + { "name": "[[65]]", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "64", "refs": ["65"] } + ] }, - { "uid": "65", "name": "KeyX::ValueY", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "name": "KeyX::ValueY", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "66" }, { - "uid": "66", "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "67", "children": [ { - "uid": "24", "name": "Valid Heading [[48]] with duplicate but valid", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "24", "refs": ["48"], "children": [ { - "uid": "68", "name": "Node with [[13]] [[14]]", "createdAt": 1, "editedAt": 1, "type": "node", "todoState": "done", + "uid": "69", "refs": ["13", "14"] }, { - "uid": "69", - "name": "Fun with missing block ref [[70]] [[71]]", + "name": "Fun with missing block ref [[71]] [[72]]", "createdAt": 1, "editedAt": 1, "type": "node", - "refs": ["70", "71"] + "uid": "70", + "refs": ["71", "72"] }, { - "uid": "72", + "uid": "73", "name": "Key2", "type": "field", "createdAt": 1, "editedAt": 1, "children": [ - { "uid": "73", "name": "Value2", "type": "node", "createdAt": 1, "editedAt": 1 } + { "name": "Value2", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "74" } ] } ] }, { - "uid": "74", "name": "Out of Level", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "75", "children": [ { - "uid": "75", "name": "Referencing a block [[43]]", "createdAt": 1, "editedAt": 1, "type": "node", + "uid": "76", "refs": ["43"] } ] @@ -410,21 +412,32 @@ } ] }, - { "uid": "76", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "77", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "77", + "uid": "78", "name": "folder", "createdAt": 1, "editedAt": 1, "type": "node", - "children": [{ "uid": "22", "name": "test4", "createdAt": 1, "editedAt": 1, "type": "node" }] + "children": [ + { + "uid": "22", + "name": "test4", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { "name": "[[|invalid link]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "79" } + ] + } + ] } ] } ] }, { - "uid": "78", + "uid": "80", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, @@ -435,9 +448,10 @@ { "uid": "!42!", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "13", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "14", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "71", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "72", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "8", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "70", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "71", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "65", "name": "Value1", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ], @@ -453,5 +467,5 @@ { "name": "Key1", "values": [], "count": 1 }, { "name": "Key2", "values": [], "count": 1 } ], - "summary": { "leafNodes": 71, "topLevelNodes": 2, "totalNodes": 73, "calendarNodes": 1, "fields": 5, "brokenRefs": 0 } + "summary": { "leafNodes": 73, "topLevelNodes": 2, "totalNodes": 75, "calendarNodes": 1, "fields": 5, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/vault.zip b/src/converters/obsidian/tests/fixtures/vault.zip index 15248b210aa48ab94a9397b0fb47c877c7a0db85..3c1f4d029dc71cddd2ac522fb82805e01e4b0a2f 100644 GIT binary patch delta 858 zcmaDQ)*#Lk;LXg!#Q*|RCrsp#Wt-XInVh$OvI48<E4(q*fy^5A&ENf! zLAbPnn}Lz#1v3K!n23(9$;>ND%*jkq$jQvhj*SI*M+B&ggMocTP^kOg-g%si3=G>R zFK1S$-v`tW!f0mr2Hf{=HV~-WzyFa?TS`(^)k zF6QgYUtfQJ-Lx;cpz6N5Ms@w7zUNP6{T2rZ7%P_VDn9n^V^YlBs`j93OT68tIBjg; zh(D%%?TTQ-l*($Ar43W}t*S3LK1qSKcbZ=B#w`pH7vCE_jQF`w+TT0P_|r_4!(X`- zewB+d7#iiBlALrY@cp8hg1Hup*BUG~Hoc>DB=MzxujZD;3lCNr+_;xMyZ!3->R%iu z)ZKnAF1S0*#B0f!9@`BEEjZSRdidY#d+&bvyJErhEk_xxS1nV!ecj~z<*%O=_UdoS zJ8-a7Tx8Fu4GTG>KlN?j%Xn|aBl#_^9T%=o&`i)fmsgKS3^SQMCckIVW>Z|@kX!(Y zE@@!IPqt-MfyVsibXF}UkkDjyZKjzWlMk@Vg3`+52kfTIz{E27BbN+F){MgfCJRa@ z6F5wmf$0P!3r-}@I9!;4iDdFYb{TL2@!>RN1||>?ACxlYaauA1QwE4DiIOCM5iG+X z0VEk17$@^{X)yzn2FOrFlt>3gya-GcQ011!h0F|-*D{Nd7wW-!R9~- zQK$wGcT3}s$rrg~nSo&d^AA6_jD$NY14CJ2X-!17`a`e) delta 842 zcmZn=e(zeCi8hr)R$&vaPXbztIi(3(mh$g!*^n}9g}y; z#NAqKy4IdRfr+m_F-Pb4On$(q#um5C4Xj6$Qv_%Z2Lni4i^+@~Bp&YNJ2{=ngSj}# zZ}KK4WwxE>Q1h7*+8Ivzkea; z`m&S1PArz1%Cp^N(M6LpB?UccYjiH;{d&9i(1DL7<$wRWaxnV6|1A;v-v7$SJ$nvk zPO;=*OYti|cf&TWXLa=ZfR(dKPENOR-`T(se@ry{6^FyhHMT+Xn2qaeLm&2OHgZYn z#!4k;GHzIOKUL;&d!CK%;ct@14}W46_^a*3An34cj=z`Xt5_4|MZB-Ki!Li!)+WrV zt@C%KVQZPmj`{43Z)&cPaifpayAh!Vk;7ko@ diff --git a/src/converters/obsidian/tests/fixtures/vault/folder/folder/test4.md b/src/converters/obsidian/tests/fixtures/vault/folder/folder/test4.md index e69de29..8c54424 100644 --- a/src/converters/obsidian/tests/fixtures/vault/folder/folder/test4.md +++ b/src/converters/obsidian/tests/fixtures/vault/folder/folder/test4.md @@ -0,0 +1 @@ +[[|invalid link]] \ No newline at end of file diff --git a/src/converters/obsidian/tests/fixtures/vault/folder/test.md b/src/converters/obsidian/tests/fixtures/vault/folder/test.md index 89fa988..3b19bfe 100644 --- a/src/converters/obsidian/tests/fixtures/vault/folder/test.md +++ b/src/converters/obsidian/tests/fixtures/vault/folder/test.md @@ -9,7 +9,7 @@ Starting without [[heading]] 2. Stuff but with a newline. -Key1:: Value1 +Key1:: [[Value1]] KeyX::ValueY ## Heading 2 From a4863ff003c5c7eddf9eb6a4c26bef6dbd0242a1 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Tue, 18 Oct 2022 21:40:16 +0200 Subject: [PATCH 80/94] increase CI node version --- .github/workflows/node.js.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 729e2ad..edb231f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -5,26 +5,25 @@ name: Node.js CI on: push: - branches: [ "main" ] + branches: ['main'] pull_request: - branches: [ "main" ] + branches: ['main'] jobs: build: - runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x, 16.x] + node-version: [18.3.X] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'yarn' - - run: yarn install --frozen-lockfile - - run: yarn ci + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + - run: yarn install --frozen-lockfile + - run: yarn ci From 0f0ca63ffcdee86087a4118760a74dcc014b6c33 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Tue, 18 Oct 2022 22:00:54 +0200 Subject: [PATCH 81/94] Obsidian: add refs to image nodes --- docs/assets/{index.37a61c5d.js => index.cf56bcf7.js} | 4 ++-- .../{index.37a61c5d.js.map => index.cf56bcf7.js.map} | 2 +- docs/index.html | 2 +- src/converters/obsidian/tanafeatures/imageNodes.ts | 7 +++++++ src/converters/obsidian/tests/fixtures/full.tif.json | 2 ++ 5 files changed, 13 insertions(+), 4 deletions(-) rename docs/assets/{index.37a61c5d.js => index.cf56bcf7.js} (99%) rename docs/assets/{index.37a61c5d.js.map => index.cf56bcf7.js.map} (52%) diff --git a/docs/assets/index.37a61c5d.js b/docs/assets/index.cf56bcf7.js similarity index 99% rename from docs/assets/index.37a61c5d.js rename to docs/assets/index.cf56bcf7.js index 2918575..a838e95 100644 --- a/docs/assets/index.37a61c5d.js +++ b/docs/assets/index.cf56bcf7.js @@ -9,7 +9,7 @@ var wc=Object.defineProperty;var gc=(e,t,n)=>t in e?wc(e,t,{enumerable:!0,config `)continue;let[s,a,l]=Fa(e,r);for(s.content.trim()!==""&&n.push(s);l;){for(;e[a]===` `;)a++;[s,a,l]=Fa(e,a),s.content.trim()!==""&&n.push(s)}r=a-1}return n}function Fa(e,t){const n=Bu(e,t),r=Vu(e,t,n),[i,s]=Gu(e,t,n);return[{...n,content:e.slice(r,i).trimEnd()},i,s]}function Bu(e,t){let n=ul(e,t);return n||(n=is(e,t),n||(n=cl(e,t),n)||(n=dl(e,t),n)?n:{type:"Paragraph",level:0})}function Vu(e,t,n){switch(n.type){case"Heading":return Uu(e,t,n);case"Bullet Node":return Iu(e,t,n);case"Paragraph":return t;case"Code Block":return t;case"Data View Attribute":return t;default:throw"Unsupported HierarchyType detected: "+n}}function Gu(e,t,n){switch(n.type){case"Heading":return[Yu(e,t,n)];case"Bullet Node":return[Fu(e,t,n)];case"Paragraph":return Wu(e,t);case"Code Block":return[Lu(t,n)];case"Data View Attribute":return[Nu(e,t)];default:throw"Unsupported HierarchyType detected: "+n}}function Zu(e,t){return e.type==="Root"||e.type==="Heading"&&t.type!=="Heading"?!0:e.type==="Paragraph"||t.type==="Paragraph"||e.type==="Code Block"||t.type==="Code Block"||e.type==="Data View Attribute"||t.type==="Data View Attribute"?!1:e.type===t.type?e.levelKu(i,t,n,r))))}function Ku(e,t,n,r){let i=e;r&&(i=$u(e));let s=t.get(i);return s===void 0&&(s=n(),t.set(i,s)),s}function Xu(e){return Array.from(e.entries()).map(t=>({name:t[0],uid:t[1]}))}function Ju(e){if(e.startsWith("[ ] "))return"todo";if(e.startsWith("[x] ")||e.startsWith("[X] "))return"done"}function Qu(e,t){if(t===dt.BULLET){const n=Ju(e);if(n)return[e.slice(4),n]}return null}function e0(e){const t=[];let n=Fi(e,0);for(;n!==null;){let r;Array.isArray(n)?(t.push(n),r=n[2]):r=n,n=Fi(e,r)}return t}function Fi(e,t){let n,r="",i="";for(let s=t;s{const l=a[0],o=a[1];if(i.every(f=>l.trim()!==f.name||o.trim()!==f.mediaUrl)){const f=a[3],d=Wt(n);e.name=e.name.replaceAll(f,"[["+d+"]]"),i.push({uid:d,name:l.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:o.trim()})}}),e.children=[...(s=e.children)!=null?s:[],...i]}function pl(e,t,n,r,i,s){var u;const[a,l]=(u=Qu(r.name,s))!=null?u:[r.name,void 0];r.name=a,r.todoState=l;const[o,f]=al(e,t,r.name,i);r.uid=o,r.name=f,r.name=r.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=zu(r.name);if(d){const p=d[d.length-1];r.name.endsWith(p)&&(r.name=r.name.slice(0,-p.length)),r.supertags=hl(d,i.superTagTracker,i.idGenerator,!0)}return bu(r,i),n0(r,n,i),r}function _l(e,t,n,r,i,s,a,l){let o=l;return r&&r.length>0&&(o=l!=null?l:[],o==null||o.push(...r.map(f=>pl(e,t,i,{name:f,type:"node",createdAt:i,editedAt:i},s)))),i0(n,s.attributes),s.summary.fields++,{uid:a!=null?a:Wt(s),name:n,type:"field",createdAt:i,editedAt:i,children:o}}function r0(e,t,n,r,i){return _l(e,t,n.key,n.values,r,i)}function i0(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function s0(e,t,n){return{uid:Wt(n),name:Cu(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function a0(e,t,n,r,i){if(n.type===dt.DATAVIEWATTRIBUTE||fl(n.content)){const[s,a]=al(e,t,n.content,i),l=a.split("::");return _l(e,t,l[0],[l[1].trim()],r,i,s)}}function o0(e,t,n,r,i){if(n.type===dt.CODEBLOCK)return s0(n,r,i);const s=a0(e,t,n,r,i);return s||pl(e,t,r,{name:n.content,createdAt:r,editedAt:r,type:"node"},i,n.type)}function l0(e){if(e.startsWith(`--- +`)return n;if(!s&&o==="("){s=o;continue}if(s==="("&&o!==")"){a+=o;continue}if(s==="("&&o===")")return a.startsWith("http://")||a.startsWith("https://")?[n[0],ml(a),l+1,"[!["+n[0]+"]("+n[1]+")]("+a+")"]:n}}return n}function ml(e){return e.split(" ")[0].split(" ")[0]}function n0(e,t,n){var a,l;const r=e0(e.name);if(r.length===0)return;if(r.length===1){const o=r[0];e.type="image",e.mediaUrl=o[1].trim(),e.name=e.name.replace(o[3],o[0].trim());return}const i=[],s=new Set;r.forEach(o=>{const f=o[0],d=o[1];if(i.every(u=>f.trim()!==u.name||d.trim()!==u.mediaUrl)){const u=o[3],p=Wt(n);s.add(p),e.name=e.name.replaceAll(u,"[["+p+"]]"),i.push({uid:p,name:f.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:d.trim()})}}),s.size>0&&(e.refs=[...(a=e.refs)!=null?a:[],...Array.from(s.values())]),e.children=[...(l=e.children)!=null?l:[],...i]}function pl(e,t,n,r,i,s){var u;const[a,l]=(u=Qu(r.name,s))!=null?u:[r.name,void 0];r.name=a,r.todoState=l;const[o,f]=al(e,t,r.name,i);r.uid=o,r.name=f,r.name=r.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=zu(r.name);if(d){const p=d[d.length-1];r.name.endsWith(p)&&(r.name=r.name.slice(0,-p.length)),r.supertags=hl(d,i.superTagTracker,i.idGenerator,!0)}return bu(r,i),n0(r,n,i),r}function _l(e,t,n,r,i,s,a,l){let o=l;return r&&r.length>0&&(o=l!=null?l:[],o==null||o.push(...r.map(f=>pl(e,t,i,{name:f,type:"node",createdAt:i,editedAt:i},s)))),i0(n,s.attributes),s.summary.fields++,{uid:a!=null?a:Wt(s),name:n,type:"field",createdAt:i,editedAt:i,children:o}}function r0(e,t,n,r,i){return _l(e,t,n.key,n.values,r,i)}function i0(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function s0(e,t,n){return{uid:Wt(n),name:Cu(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function a0(e,t,n,r,i){if(n.type===dt.DATAVIEWATTRIBUTE||fl(n.content)){const[s,a]=al(e,t,n.content,i),l=a.split("::");return _l(e,t,l[0],[l[1].trim()],r,i,s)}}function o0(e,t,n,r,i){if(n.type===dt.CODEBLOCK)return s0(n,r,i);const s=a0(e,t,n,r,i);return s||pl(e,t,r,{name:n.content,createdAt:r,editedAt:r,type:"node"},i,n.type)}function l0(e){if(e.startsWith(`--- `)){const t=e.indexOf(` --- `);if(t!==-1)return[c0(e.slice(4,t)),t+5]}return null}function c0(e){const t=e.split(` @@ -46,4 +46,4 @@ L.version="2.29.4";d0(oe);L.fn=M;L.min=Xh;L.max=Jh;L.now=Qh;L.utc=ut;L.unix=Tm;L Please check the text at the top again.`,document.body.appendChild(l)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack): `+i,document.body.appendChild(a)}}); -//# sourceMappingURL=index.37a61c5d.js.map +//# sourceMappingURL=index.cf56bcf7.js.map diff --git a/docs/assets/index.37a61c5d.js.map b/docs/assets/index.cf56bcf7.js.map similarity index 52% rename from docs/assets/index.37a61c5d.js.map rename to docs/assets/index.cf56bcf7.js.map index 9235383..b62446c 100644 --- a/docs/assets/index.37a61c5d.js.map +++ b/docs/assets/index.cf56bcf7.js.map @@ -1 +1 @@ -{"version":3,"file":"index.37a61c5d.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: () => Data) {\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData();\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: () => Data) {\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData();\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(fileName, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(fileName, filePath, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(obsidianLink, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n });\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(obsidianLink, filePath, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n });\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: tags are too naive! ()\nexport function detectTags(content: string) {\n return content.match(tagRegex);\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tag without losing meaning because it will show up as a super tag anyways\n const lastTag = tags[tags.length - 1];\n if (tanaNode.name.endsWith(lastTag)) {\n tanaNode.name = tanaNode.name.slice(0, -lastTag.length);\n }\n\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport moment from 'moment';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n let nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeUid = dateDisplayName;\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n\nfunction dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return null;\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","dailyNoteFormat","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","alias","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","pos","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","detectTags","cleanUpTag","tag","superTagUidRequests","tags","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","image","childImageNodes","oldLink","postProcessContentNode","updatedContent","todoState","lastTag","keyValToFieldNode","values","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","displayName","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","dateStringToDateUID","moment","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAAU,YAAc,OAExBA,EAAU,YAAc,cACrBA,CACV,CACD,SAASN,EAAeD,EAAM,CAC1B,GAAIA,EAAK,GAEL,OACJA,EAAK,GAAK,GAEV,MAAMO,EAAYF,EAAaL,CAAI,EACnC,MAAMA,EAAK,KAAMO,CAAS,CAC7B,CACL,KCHA,MAAMC,GAAW,GACXC,GAAU,GACVC,GAAW,GAEXC,GAAe,GACfC,GAAW,IACX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14D,CAAC,EAC3BA,EAAE,MAAM,EACR,IAAI,gBAAgB2nB,CAAG,CAAA,CACxB,EACQ,SAAA,KAAK,YAAYwxC,CAAc,QACjC10C,GACP,QAAQ,MAAMA,CAAK,EAEfo0C,GACO,SAAA,KAAK,YAAYA,CAAQ,EAI9B,MAAAO,EAAoB30C,EAAc,MAAM,SAAS,EAEvD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAA40C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file +{"version":3,"file":"index.cf56bcf7.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: () => Data) {\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData();\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: () => Data) {\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData();\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(fileName, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(fileName, filePath, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(obsidianLink, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n });\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(obsidianLink, filePath, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n });\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: tags are too naive! ()\nexport function detectTags(content: string) {\n return content.match(tagRegex);\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tag without losing meaning because it will show up as a super tag anyways\n const lastTag = tags[tags.length - 1];\n if (tanaNode.name.endsWith(lastTag)) {\n tanaNode.name = tanaNode.name.slice(0, -lastTag.length);\n }\n\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport moment from 'moment';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n let nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeUid = dateDisplayName;\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n\nfunction dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return null;\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","dailyNoteFormat","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","alias","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","pos","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","detectTags","cleanUpTag","tag","superTagUidRequests","tags","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","lastTag","keyValToFieldNode","values","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","displayName","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","dateStringToDateUID","moment","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/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AAc,MAAM,SAAS,EAEvD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAA80C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index dbab03f..7162135 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

diff --git a/src/converters/obsidian/tanafeatures/imageNodes.ts b/src/converters/obsidian/tanafeatures/imageNodes.ts index 10b56a9..3162ab9 100644 --- a/src/converters/obsidian/tanafeatures/imageNodes.ts +++ b/src/converters/obsidian/tanafeatures/imageNodes.ts @@ -19,6 +19,8 @@ export function handleImages(tanaNode: TanaIntermediateNode, today: number, cont //more than one image means we add them as child nodes const childImageNodes: TanaIntermediateNode[] = []; + const refs = new Set(); + imageData.forEach((image) => { const altText = image[0]; const url = image[1]; @@ -26,6 +28,7 @@ export function handleImages(tanaNode: TanaIntermediateNode, today: number, cont if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) { const oldLink = image[3]; const uid = untrackedUidRequest(context); + refs.add(uid); tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]'); childImageNodes.push({ uid, @@ -38,5 +41,9 @@ export function handleImages(tanaNode: TanaIntermediateNode, today: number, cont } }); + if (refs.size > 0) { + tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())]; + } + tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes]; } diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index fe994d6..bb97352 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -244,6 +244,7 @@ "editedAt": 1, "type": "node", "uid": "52", + "refs": ["53", "54"], "children": [ { "uid": "53", @@ -269,6 +270,7 @@ "editedAt": 1, "type": "node", "uid": "55", + "refs": ["56"], "children": [ { "uid": "56", From 5505258864580c1544ad420d52c3788c485796cf Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Tue, 18 Oct 2022 23:47:07 +0200 Subject: [PATCH 82/94] Obsidian: convert daily notes link to the proper format --- src/converters/obsidian/links/FileDescMap.ts | 21 +- src/converters/obsidian/links/blockLinks.ts | 21 +- src/converters/obsidian/links/dateLinks.ts | 9 + .../obsidian/links/internalLinks.ts | 31 +- .../obsidian/tanaconversion/fileConversion.ts | 14 +- .../tanaconversion/vaultConversion.ts | 2 + .../obsidian/tests/fixtures/full.tif.json | 283 +++++++++++------- .../obsidian/tests/fixtures/vault.zip | Bin 2944 -> 3229 bytes .../obsidian/tests/fixtures/vault/01.md | 3 + .../fixtures/vault/folder/folder/test4.md | 4 +- 10 files changed, 240 insertions(+), 148 deletions(-) create mode 100644 src/converters/obsidian/links/dateLinks.ts create mode 100644 src/converters/obsidian/tests/fixtures/vault/01.md diff --git a/src/converters/obsidian/links/FileDescMap.ts b/src/converters/obsidian/links/FileDescMap.ts index 276b0bb..b17c811 100644 --- a/src/converters/obsidian/links/FileDescMap.ts +++ b/src/converters/obsidian/links/FileDescMap.ts @@ -1,4 +1,5 @@ import { basename } from '../filesystem/CustomFileSystemAdapter'; +import { dateStringToDateUID } from './dateLinks'; function isPath(searchStr: string) { return basename(searchStr) !== searchStr; @@ -11,10 +12,17 @@ export class FileDescMap { pathMap = new Map(); nameMap = new Map(); + //TODO: make a proper hook approach to catching dateUIDs /** * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name. */ - accessAsFile(fileName: string, filePath: string, defaultData: () => Data) { + accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) { + //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved + const dateUID = dateStringToDateUID(fileName, dailyNoteFormat); + if (dateUID) { + fileName = dateUID; + } + const pathMatch = this.pathMap.get(filePath); if (pathMatch) { if (!this.nameMap.get(fileName)) { @@ -30,7 +38,7 @@ export class FileDescMap { return nameMatch; } - const data = defaultData(); + const data = defaultData(dateUID); this.pathMap.set(filePath, data); if (!this.nameMap.get(fileName)) { this.nameMap.set(fileName, data); @@ -39,13 +47,18 @@ export class FileDescMap { return data; } - accessAsLink(searchStr: string, defaultData: () => Data) { + accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) { + const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat); + if (dateUID) { + searchStr = dateUID; + } + const match = this.findData(searchStr); if (match) { return match; } const isPathBool = isPath(searchStr); - const data = defaultData(); + const data = defaultData(dateUID); if (isPathBool) { this.pathMap.set(searchStr, data); } else { diff --git a/src/converters/obsidian/links/blockLinks.ts b/src/converters/obsidian/links/blockLinks.ts index 917018e..d10d8a4 100644 --- a/src/converters/obsidian/links/blockLinks.ts +++ b/src/converters/obsidian/links/blockLinks.ts @@ -18,9 +18,13 @@ export interface BlockUidData { export function blockLinkUidRequestForUsing(link: string[], context: VaultContext) { const fileName = link[0]; const blockObsidianUid = link[1]; - const blockUidMap = context.blockLinkTracker.accessAsLink(fileName, () => { - return new Map(); - }); + const blockUidMap = context.blockLinkTracker.accessAsLink( + fileName, + () => { + return new Map(); + }, + context.dailyNoteFormat, + ); let blockUidData = blockUidMap.get(blockObsidianUid); if (!blockUidData) { blockUidData = { @@ -37,9 +41,14 @@ export function blockLinkUidRequestForUsing(link: string[], context: VaultContex export function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) { const fileName = link[0]; const blockObsidianUid = link[1]; - const blockUidMap = context.blockLinkTracker.accessAsFile(fileName, filePath, () => { - return new Map(); - }); + const blockUidMap = context.blockLinkTracker.accessAsFile( + fileName, + filePath, + () => { + return new Map(); + }, + context.dailyNoteFormat, + ); let blockUidData = blockUidMap.get(blockObsidianUid); if (!blockUidData) { blockUidData = { diff --git a/src/converters/obsidian/links/dateLinks.ts b/src/converters/obsidian/links/dateLinks.ts new file mode 100644 index 0000000..fc0b8e4 --- /dev/null +++ b/src/converters/obsidian/links/dateLinks.ts @@ -0,0 +1,9 @@ +import moment from 'moment'; + +export function dateStringToDateUID(displayName: string, dateFormat: string) { + const date = moment(displayName, dateFormat, true); + if (date.isValid()) { + return date.format('MM-DD-YYYY'); + } + return; +} diff --git a/src/converters/obsidian/links/internalLinks.ts b/src/converters/obsidian/links/internalLinks.ts index 573c259..ab4f6d9 100644 --- a/src/converters/obsidian/links/internalLinks.ts +++ b/src/converters/obsidian/links/internalLinks.ts @@ -95,11 +95,15 @@ export function requestUidForLink(obsidianLink: string, context: VaultContext) { } function standardLinkUidRequest(obsidianLink: string, context: VaultContext) { - const uidData = context.defaultLinkTracker.accessAsLink(obsidianLink, () => { - incrementSummary(context.summary); - const uid = context.idGenerator(); - return { uid, obsidianLink, type: UidRequestType.CONTENT }; - }); + const uidData = context.defaultLinkTracker.accessAsLink( + obsidianLink, + (dateUID) => { + incrementSummary(context.summary); + const uid = dateUID ?? context.idGenerator(); + return { uid, obsidianLink, type: UidRequestType.CONTENT }; + }, + context.dailyNoteFormat, + ); return uidData.uid; } @@ -119,11 +123,18 @@ export function requestUidForContentNode(fileName: string, filePath: string, con export function requestUidForFile(fileName: string, filePath: string, context: VaultContext) { const obsidianLink = fileName.trim(); - const uidData = context.defaultLinkTracker.accessAsFile(obsidianLink, filePath, () => { - incrementSummary(context.summary); - const uid = context.idGenerator(); - return { uid, obsidianLink, type: UidRequestType.FILE }; - }); + const uidData = context.defaultLinkTracker.accessAsFile( + obsidianLink, + filePath, + (dateUID) => { + incrementSummary(context.summary); + //if this is a daily note, we need to use its new name as the UID + //TODO: we only need the UID here? + const uid = dateUID ?? context.idGenerator(); + return { uid, obsidianLink, type: UidRequestType.FILE }; + }, + context.dailyNoteFormat, + ); uidData.type = UidRequestType.FILE; return uidData.uid; diff --git a/src/converters/obsidian/tanaconversion/fileConversion.ts b/src/converters/obsidian/tanaconversion/fileConversion.ts index 21f290b..fff0d0d 100644 --- a/src/converters/obsidian/tanaconversion/fileConversion.ts +++ b/src/converters/obsidian/tanaconversion/fileConversion.ts @@ -3,12 +3,12 @@ import { createTree } from '../utils/createTree'; import { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes'; import { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter'; import { VaultContext } from '../VaultContext'; -import moment from 'moment'; import { TanaIntermediateNode, NodeType } from '../../../types/types'; import { superTagUidRequests } from '../tanafeatures/supertags'; import { requestUidForFile } from '../links/internalLinks'; import { HeadingData } from '../links/headingLinks'; import { frontMatterToFieldNode } from '../tanafeatures/fields'; +import { dateStringToDateUID } from '../links/dateLinks'; export function convertObsidianFile( fileName: string, //without ending @@ -85,12 +85,12 @@ function createFileNode( //we need this uid request even if its a date node, only this way will other links to it work //TODO: evaluate if it might not need to set dateDisplayName as uid? - let nodeUid = requestUidForFile(displayName, filePath, context); + const nodeUid = requestUidForFile(displayName, filePath, context); let nodeType: NodeType = 'node'; + //TODO: replace duplication of this call - its also used inside the FileDescMap const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat); if (dateDisplayName) { - nodeUid = dateDisplayName; nodeType = 'date'; displayName = dateDisplayName; context.summary.calendarNodes++; @@ -106,11 +106,3 @@ function createFileNode( children: fieldNodes.length > 0 ? fieldNodes : undefined, }; } - -function dateStringToDateUID(displayName: string, dateFormat: string) { - const date = moment(displayName, dateFormat, true); - if (date.isValid()) { - return date.format('MM-DD-YYYY'); - } - return null; -} diff --git a/src/converters/obsidian/tanaconversion/vaultConversion.ts b/src/converters/obsidian/tanaconversion/vaultConversion.ts index 16f56f7..997348d 100644 --- a/src/converters/obsidian/tanaconversion/vaultConversion.ts +++ b/src/converters/obsidian/tanaconversion/vaultConversion.ts @@ -27,6 +27,8 @@ function readFilteredAndSortedDir(context: VaultContext, dir: string) { (!dirent.isDirectory() && name.endsWith('.md')) ); }) + //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests + .sort((a, b) => a.getName().localeCompare(b.getName())) //folders at the end //this is critically important so that the top level of files are read before any other files with the same names can be read //E.g. diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index bb97352..f5b7fe5 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -8,6 +8,39 @@ "editedAt": 1, "type": "node", "children": [ + { + "uid": "1", + "name": "01", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "children": [ + { + "uid": "2", + "name": "DateTest", + "type": "field", + "createdAt": 1, + "editedAt": 1, + "children": [ + { + "name": "[[10-04-2022]]", + "type": "node", + "createdAt": 1, + "editedAt": 1, + "uid": "3", + "refs": ["10-04-2022"] + } + ] + }, + { + "name": "This is for testing what happens if the date is accessed first. Should write some more other tests.", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "uid": "4" + } + ] + }, { "uid": "10-04-2022", "name": "10-04-2022", @@ -16,51 +49,51 @@ "type": "date", "children": [ { - "uid": "2", + "uid": "6", "name": "field0", "type": "field", "createdAt": 1, "editedAt": 1, - "children": [{ "name": "value0", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "1" }] + "children": [{ "name": "value0", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "5" }] }, { - "name": "Starting without [[5]].", + "name": "Starting without [[8]].", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "4", - "refs": ["5"] + "uid": "7", + "refs": ["8"] }, { "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "6", + "uid": "9", "children": [ - { "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "7", "refs": ["8"] }, - { "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "9" }, + { "name": "[[11]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "10", "refs": ["11"] }, + { "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "12" }, { "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "10", + "uid": "13", "children": [ { "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "11", + "uid": "14", "children": [ { - "name": "Node with [[13]] [[14]]", + "name": "Node with [[16]] [[17]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "12", - "refs": ["13", "14"] + "uid": "15", + "refs": ["16", "17"] }, { "name": "Fun", @@ -68,7 +101,7 @@ "editedAt": 1, "type": "node", "todoState": "todo", - "uid": "15" + "uid": "18" } ] }, @@ -77,47 +110,47 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "16", + "uid": "19", "children": [ { - "name": "[[18]]", + "name": "[[21]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "17", - "refs": ["18"] + "uid": "20", + "refs": ["21"] }, { - "name": "[[67]]", + "name": "[[70]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "19", - "refs": ["67"] + "uid": "22", + "refs": ["70"] }, { - "name": "[[22]]", + "name": "[[25]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "21", - "refs": ["22"] + "uid": "24", + "refs": ["25"] }, { - "name": "Using a duplicate but valid block id [[24]]", + "name": "Using a duplicate but valid block id [[27]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "23", - "refs": ["24"] + "uid": "26", + "refs": ["27"] }, { - "name": "Invalid [[26]]", + "name": "Invalid [[29]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "25", - "refs": ["26"] + "uid": "28", + "refs": ["29"] } ] } @@ -128,86 +161,86 @@ ] }, { - "uid": "34", + "uid": "37", "name": "test", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["29", "30"], + "supertags": ["32", "33"], "children": [ { - "uid": "28", + "uid": "31", "name": "field0", "type": "field", "createdAt": 1, "editedAt": 1, - "children": [{ "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "27" }] + "children": [{ "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "30" }] }, { - "uid": "33", + "uid": "36", "name": "field1", "type": "field", "createdAt": 1, "editedAt": 1, "children": [ - { "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "31" }, - { "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "32" } + { "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "34" }, + { "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "35" } ] }, { - "name": "Starting without [[5]].", + "name": "Starting without [[8]].", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "35", - "refs": ["5"] + "uid": "38", + "refs": ["8"] }, { "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "36", + "uid": "39", "children": [ - { "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "37", "refs": ["8"] }, - { "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "38" }, + { "name": "[[11]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "40", "refs": ["11"] }, + { "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "41" }, { "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "39", + "uid": "42", "children": [ - { "name": "```", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "40" }, + { "name": "```", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "43" }, { - "name": "Invalid Heading [[!42!]]", + "name": "Invalid Heading [[!45!]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "41", - "refs": ["!42!"], + "uid": "44", + "refs": ["!45!"], "children": [ { - "name": "Block with #inlinetag2 [alias]([[13]]) [[13]] [[14]]", + "name": "Block with #inlinetag2 [alias]([[16]]) [[16]] [[17]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "43", - "supertags": ["44", "45"], - "refs": ["13", "14"] + "uid": "46", + "supertags": ["47", "48"], + "refs": ["16", "17"] }, { "name": "#inlinetag2 Fun", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "46", - "supertags": ["44"] + "uid": "49", + "supertags": ["47"] } ] }, { - "uid": "47", + "uid": "50", "name": "(defn meta-data-finished? [process]\n (let [{meta-data :meta-data, :or {}} process\n {a :a, b :b, c :c} meta-data] ; any one could be missing!\n (not-any? nil? [a b c])))", "createdAt": 1, "editedAt": 1, @@ -219,15 +252,15 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "48", + "uid": "51", "children": [ - { "uid": "49", "name": "code here", "createdAt": 1, "editedAt": 1, "type": "codeblock" }, + { "uid": "52", "name": "code here", "createdAt": 1, "editedAt": 1, "type": "codeblock" }, { "name": "single image", "createdAt": 1, "editedAt": 1, "type": "image", - "uid": "50", + "uid": "53", "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { @@ -235,19 +268,19 @@ "createdAt": 1, "editedAt": 1, "type": "image", - "uid": "51", + "uid": "54", "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "name": "[[53]] [[54]]", + "name": "[[56]] [[57]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "52", - "refs": ["53", "54"], + "uid": "55", + "refs": ["56", "57"], "children": [ { - "uid": "53", + "uid": "56", "name": "multiple images", "createdAt": 1, "editedAt": 1, @@ -255,7 +288,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "54", + "uid": "57", "name": "multiple images 2", "createdAt": 1, "editedAt": 1, @@ -265,15 +298,15 @@ ] }, { - "name": "[[56]] [[56]]", + "name": "[[59]] [[59]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "55", - "refs": ["56"], + "uid": "58", + "refs": ["59"], "children": [ { - "uid": "56", + "uid": "59", "name": "same image", "createdAt": 1, "editedAt": 1, @@ -287,7 +320,7 @@ "createdAt": 1, "editedAt": 1, "type": "image", - "uid": "57", + "uid": "60", "mediaUrl": "http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg" } ] @@ -299,94 +332,94 @@ ] }, { - "uid": "58", + "uid": "61", "name": "folder", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "18", + "uid": "21", "name": "test", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["29", "30"], + "supertags": ["32", "33"], "children": [ { - "name": "Starting without [[5]] 2.", + "name": "Starting without [[8]] 2.", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "59", - "refs": ["5"] + "uid": "62", + "refs": ["8"] }, { "name": "Heading here", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "60", + "uid": "63", "children": [ - { "name": "[[8]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "61", "refs": ["8"] }, + { "name": "[[11]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "64", "refs": ["11"] }, { "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "62" + "uid": "65" }, { - "uid": "63", + "uid": "66", "name": "Key1", "type": "field", "createdAt": 1, "editedAt": 1, "children": [ - { "name": "[[65]]", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "64", "refs": ["65"] } + { "name": "[[68]]", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "67", "refs": ["68"] } ] }, - { "name": "KeyX::ValueY", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "66" }, + { "name": "KeyX::ValueY", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "69" }, { "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "67", + "uid": "70", "children": [ { - "name": "Valid Heading [[48]] with duplicate but valid", + "name": "Valid Heading [[51]] with duplicate but valid", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "24", - "refs": ["48"], + "uid": "27", + "refs": ["51"], "children": [ { - "name": "Node with [[13]] [[14]]", + "name": "Node with [[16]] [[17]]", "createdAt": 1, "editedAt": 1, "type": "node", "todoState": "done", - "uid": "69", - "refs": ["13", "14"] + "uid": "72", + "refs": ["16", "17"] }, { - "name": "Fun with missing block ref [[71]] [[72]]", + "name": "Fun with missing block ref [[74]] [[75]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "70", - "refs": ["71", "72"] + "uid": "73", + "refs": ["74", "75"] }, { - "uid": "73", + "uid": "76", "name": "Key2", "type": "field", "createdAt": 1, "editedAt": 1, "children": [ - { "name": "Value2", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "74" } + { "name": "Value2", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "77" } ] } ] @@ -396,15 +429,15 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "75", + "uid": "78", "children": [ { - "name": "Referencing a block [[43]]", + "name": "Referencing a block [[46]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "76", - "refs": ["43"] + "uid": "79", + "refs": ["46"] } ] } @@ -414,22 +447,39 @@ } ] }, - { "uid": "77", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "80", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "78", + "uid": "81", "name": "folder", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ { - "uid": "22", + "uid": "25", "name": "test4", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "name": "[[|invalid link]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "79" } + { "name": "[[|invalid link]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "82" }, + { + "uid": "83", + "name": "DateTest", + "type": "field", + "createdAt": 1, + "editedAt": 1, + "children": [ + { + "name": "[[10-04-2022]]", + "type": "node", + "createdAt": 1, + "editedAt": 1, + "uid": "84", + "refs": ["10-04-2022"] + } + ] + } ] } ] @@ -439,35 +489,36 @@ ] }, { - "uid": "80", + "uid": "85", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, "type": "node", "children": [ - { "uid": "26", "name": "folder/folder/test", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "5", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "!42!", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "13", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "14", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "72", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "8", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "71", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "65", "name": "Value1", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "29", "name": "folder/folder/test", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "8", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "!45!", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "16", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "17", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "75", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "11", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "74", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "68", "name": "Value1", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ], "supertags": [ - { "name": "supertag1", "uid": "29" }, - { "name": "supertag2", "uid": "30" }, - { "name": "inlinetag2", "uid": "44" }, - { "name": "inlinetag1", "uid": "45" } + { "name": "supertag1", "uid": "32" }, + { "name": "supertag2", "uid": "33" }, + { "name": "inlinetag2", "uid": "47" }, + { "name": "inlinetag1", "uid": "48" } ], "attributes": [ + { "name": "DateTest", "values": [], "count": 2 }, { "name": "field0", "values": [], "count": 2 }, { "name": "field1", "values": [], "count": 1 }, { "name": "Key1", "values": [], "count": 1 }, { "name": "Key2", "values": [], "count": 1 } ], - "summary": { "leafNodes": 73, "topLevelNodes": 2, "totalNodes": 75, "calendarNodes": 1, "fields": 5, "brokenRefs": 0 } + "summary": { "leafNodes": 79, "topLevelNodes": 2, "totalNodes": 81, "calendarNodes": 1, "fields": 7, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/vault.zip b/src/converters/obsidian/tests/fixtures/vault.zip index 3c1f4d029dc71cddd2ac522fb82805e01e4b0a2f..8f25098a47291fdab859cd60a03376596d771d95 100644 GIT binary patch delta 504 zcmZn=pDW25;LXg!#Q*|dcLz=6m0`D&_D{B#_Md35lbJ!tf8!fDM&@6FK(5GSMW!9h zKR`^W$={d^p-kQv+k!&x+5eZ+0UDt*IgnX{eY22%G7wL0U{;jm;&MqWNexLYF0ryw zh>kWe(KR&CH8Lv$50|S^)?J?wQHV|N`j@u~D zU@0bAS|?!TlK8OrT+o9F@0Iq=@1C%2_RUJQ#WSxg<2)^N?4RH-iKLk8>t^rNs&TcK zIy1FuPhp`^ftA1298n43P3r&RZkYuw?FpKFt3mwq_sNA@U&W-Vzq!QmXukD|!~6l> zj7)OO@GzXbid~Bt7>JWUaLR1{%r41<7DAF-X3U__`M@bQIfF}uanIylu1F?f*2yop zA{mn=J8^4GcHrQO#`L`eFbo(N7=d_8<2H5%)UaTMgaukS1bDNufi&>|p#lp7LpleD F2LO5^m!|*# delta 242 zcmbO$*&xmv;LXg!#Q*|RC-_a|m0_LP;hCH_Ie|-L@;fGuiC*)W3-c`la+ZSC--r)ZQjoz$%JO`Q!X=RkfHosVv_|p y*(O_Y%P}sT9LXKY{DXyIvH`2a Date: Tue, 18 Oct 2022 23:48:42 +0200 Subject: [PATCH 83/94] Obsidian: convert daily notes link to the proper format (2) --- .../{index.cf56bcf7.js => index.9421258c.js} | 50 +++++++++---------- docs/assets/index.9421258c.js.map | 1 + docs/assets/index.cf56bcf7.js.map | 1 - docs/index.html | 2 +- 4 files changed, 27 insertions(+), 27 deletions(-) rename docs/assets/{index.cf56bcf7.js => index.9421258c.js} (71%) create mode 100644 docs/assets/index.9421258c.js.map delete mode 100644 docs/assets/index.cf56bcf7.js.map diff --git a/docs/assets/index.cf56bcf7.js b/docs/assets/index.9421258c.js similarity index 71% rename from docs/assets/index.cf56bcf7.js rename to docs/assets/index.9421258c.js index a838e95..dd7f55c 100644 --- a/docs/assets/index.cf56bcf7.js +++ b/docs/assets/index.9421258c.js @@ -1,28 +1,28 @@ -var wc=Object.defineProperty;var gc=(e,t,n)=>t in e?wc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Bt=(e,t,n)=>(gc(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const In=15,mi=30,pi=19,xc=29,ur=256,Hi=ur+1+xc,Is=2*Hi+1,yn=256,yc=7,Fs=16,Ls=17,Cs=18,$r=8*2,hr=-1,bc=1,qn=2,vc=0,rn=0,Ns=1,kc=3,Le=4,Qe=0,Wa=1,zn=2,et=-2,Sc=-3,Qt=-5;function Tr(e){return Ar(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function Ar(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?Ar(n):n),[])}const Ps=[0,1,2,3].concat(...Tr([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function se(){const e=this;function t(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,l=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,f=e.stat_desc.max_length;let d,u,p,w,D,h,c=0;for(w=0;w<=In;w++)i.bl_count[w]=0;for(s[i.heap[i.heap_max]*2+1]=0,d=i.heap_max+1;df&&(w=f,c++),s[u*2+1]=w,!(u>e.max_code)&&(i.bl_count[w]++,D=0,u>=o&&(D=l[u-o]),h=s[u*2],i.opt_len+=h*(w+D),a&&(i.static_len+=h*(a[u*2+1]+D)));if(c!==0){do{for(w=f-1;i.bl_count[w]===0;)w--;i.bl_count[w]--,i.bl_count[w+1]+=2,i.bl_count[f]--,c-=2}while(c>0);for(w=f;w!==0;w--)for(u=i.bl_count[w];u!==0;)p=i.heap[--d],!(p>e.max_code)&&(s[p*2+1]!=w&&(i.opt_len+=(w-s[p*2+1])*s[p*2],s[p*2+1]=w),u--)}}function n(i,s){let a=0;do a|=i&1,i>>>=1,a<<=1;while(--s>0);return a>>>1}function r(i,s,a){const l=[];let o=0,f,d,u;for(f=1;f<=In;f++)l[f]=o=o+a[f-1]<<1;for(d=0;d<=s;d++)u=i[d*2+1],u!==0&&(i[d*2]=n(l[u]++,u))}e.build_tree=function(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,l=e.stat_desc.elems;let o,f,d=-1,u;for(i.heap_len=0,i.heap_max=Is,o=0;o=1;o--)i.pqdownheap(s,o);u=l;do o=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(s,1),f=i.heap[1],i.heap[--i.heap_max]=o,i.heap[--i.heap_max]=f,s[u*2]=s[o*2]+s[f*2],i.depth[u]=Math.max(i.depth[o],i.depth[f])+1,s[o*2+1]=s[f*2+1]=u,i.heap[1]=u++,i.pqdownheap(s,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],t(i),r(s,e.max_code,i.bl_count)}}se._length_code=[0,1,2,3,4,5,6,7].concat(...Tr([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));se.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];se.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];se.d_code=function(e){return e<256?Ps[e]:Ps[256+(e>>>7)]};se.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];se.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];se.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];se.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function De(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}const Ec=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],Dc=Tr([[144,8],[112,9],[24,7],[8,8]]);De.static_ltree=Ar(Ec.map((e,t)=>[e,Dc[t]]));const Tc=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],Ac=Tr([[30,5]]);De.static_dtree=Ar(Tc.map((e,t)=>[e,Ac[t]]));De.static_l_desc=new De(De.static_ltree,se.extra_lbits,ur+1,Hi,In);De.static_d_desc=new De(De.static_dtree,se.extra_dbits,0,mi,In);De.static_bl_desc=new De(null,se.extra_blbits,0,pi,yc);const Oc=9,Rc=8;function at(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const Ha=0,sr=1,qt=2,Je=[new at(0,0,0,0,Ha),new at(4,4,8,4,sr),new at(4,5,16,8,sr),new at(4,6,32,32,sr),new at(4,4,16,16,qt),new at(8,16,32,32,qt),new at(8,16,128,128,qt),new at(8,32,128,256,qt),new at(32,128,258,1024,qt),new at(32,258,258,4096,qt)],$n=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ge=0,Kn=1,bn=2,Xn=3,Mc=32,Kr=42,Jn=113,vn=666,Xr=8,Ic=0,Jr=1,Fc=2,ce=3,ar=258,Ye=ar+ce+1;function Us(e,t,n,r){const i=e[t*2],s=e[n*2];return i=3&&j[se.bl_order[T]*2+1]===0;T--);return e.opt_len+=3*(T+1)+5+5+4,T}function Ve(T){e.pending_buf[e.pending++]=T}function Tt(T){Ve(T&255),Ve(T>>>8&255)}function gn(T){Ve(T>>8&255),Ve(T&255&255)}function Ee(T,R){let O;const I=R;ge>$r-I?(O=T,ue|=O<>>$r-ge,ge+=I-$r):(ue|=T<=8&&(Ve(ue&255),ue>>>=8,ge-=8)}function dc(){Ee(Jr<<1,3),Ue(yn,De.static_ltree),Es(),1+Se+10-ge<9&&(Ee(Jr<<1,3),Ue(yn,De.static_ltree),Es()),Se=7}function xn(T,R){let O,I,P;if(e.dist_buf[V]=T,e.lc_buf[V]=R&255,V++,T===0?N[R*2]++:(Z++,T--,N[(se._length_code[R]+ur+1)*2]++,Y[se.d_code(T)*2]++),(V&8191)===0&&A>2){for(O=V*8,I=g-m,P=0;P>>=3,Z8?Tt(ue):ge>0&&Ve(ue&255),ue=0,ge=0}function fc(T,R,O){Ts(),Se=8,O&&(Tt(R),Tt(~R)),e.pending_buf.set(o.subarray(T,T+R),e.pending),e.pending+=R}function As(T,R,O){Ee((Ic<<1)+(O?1:0),3),fc(T,R,!0)}function uc(T,R,O){let I,P,G=0;A>0?(q.build_tree(e),we.build_tree(e),G=wn(),I=e.opt_len+3+7>>>3,P=e.static_len+3+7>>>3,P<=I&&(I=P)):I=P=R+5,R+4<=I&&T!=-1?As(T,R,O):P==I?(Ee((Jr<<1)+(O?1:0),3),Ds(De.static_ltree,De.static_dtree)):(Ee((Fc<<1)+(O?1:0),3),cc(q.max_code+1,we.max_code+1,G+1),Ds(N,Y)),Dt(),O&&Ts()}function At(T){uc(m>=0?m:-1,g-m,T),m=g,t.flush_pending()}function qr(){let T,R,O,I;do{if(I=f-x-g,I===0&&g===0&&x===0)I=s;else if(I==-1)I--;else if(g>=s+s-Ye){o.set(o.subarray(s,s+s),0),y-=s,g-=s,m-=s,T=w,O=T;do R=u[--O]&65535,u[O]=R>=s?R-s:0;while(--T!==0);T=s,O=T;do R=d[--O]&65535,d[O]=R>=s?R-s:0;while(--T!==0);I+=s}if(t.avail_in===0)return;T=t.read_buf(o,g+x,I),x+=T,x>=ce&&(p=o[g]&255,p=(p<r-5&&(R=r-5);;){if(x<=1){if(qr(),x===0&&T==rn)return Ge;if(x===0)break}if(g+=x,x=0,O=m+R,(g===0||g>=O)&&(x=g-O,g=O,At(!1),t.avail_out===0)||g-m>=s-Ye&&(At(!1),t.avail_out===0))return Ge}return At(T==Le),t.avail_out===0?T==Le?bn:Ge:T==Le?Xn:Kn}function Os(T){let R=k,O=g,I,P,G=E;const K=g>s-Ye?g-(s-Ye):0;let Me=B;const Xe=l,zr=g+ar;let Rs=o[O+G-1],Ms=o[O+G];E>=F&&(R>>=2),Me>x&&(Me=x);do if(I=T,!(o[I+G]!=Ms||o[I+G-1]!=Rs||o[I]!=o[O]||o[++I]!=o[O+1])){O+=2,I++;do;while(o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&OG){if(y=T,G=P,P>=Me)break;Rs=o[O+G-1],Ms=o[O+G]}}while((T=d[T&Xe]&65535)>K&&--R!==0);return G<=x?G:x}function mc(T){let R=0,O;for(;;){if(x=ce&&(p=(p<=ce)if(O=xn(g-y,_-ce),x-=_,_<=S&&x>=ce){_--;do g++,p=(p<=ce&&(p=(p<4096)&&(_=ce-1)),E>=ce&&_<=E){I=g+x-ce,O=xn(g-1-b,E-ce),x-=E-1,E-=2;do++g<=I&&(p=(p<Oc||I!=Xr||O<9||O>15||R<0||R>9||G<0||G>qn?et:(T.dstate=e,a=O,s=1<9||O<0||O>qn?et:(Je[A].func!=Je[R].func&&T.total_in!==0&&(I=T.deflate(Ns)),A!=R&&(A=R,S=Je[A].max_lazy,F=Je[A].good_length,B=Je[A].nice_length,k=Je[A].max_chain),U=O,I)},e.deflateSetDictionary=function(T,R,O){let I=O,P,G=0;if(!R||n!=Kr)return et;if(Is-Ye&&(I=s-Ye,G=O-I),o.set(R.subarray(G,G+I),0),g=I,m=I,p=o[0]&255,p=(p<Le||R<0)return et;if(!T.next_out||!T.next_in&&T.avail_in!==0||n==vn&&R!=Le)return T.msg=$n[zn-et],et;if(T.avail_out===0)return T.msg=$n[zn-Qt],Qt;if(t=T,G=i,i=R,n==Kr&&(I=Xr+(a-8<<4)<<8,P=(A-1&255)>>1,P>3&&(P=3),I|=P<<6,g!==0&&(I|=Mc),I+=31-I%31,n=Jn,gn(I)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,Qe}else if(t.avail_in===0&&R<=G&&R!=Le)return t.msg=$n[zn-Qt],Qt;if(n==vn&&t.avail_in!==0)return T.msg=$n[zn-Qt],Qt;if(t.avail_in!==0||x!==0||R!=rn&&n!=vn){switch(K=-1,Je[A].func){case Ha:K=hc(R);break;case sr:K=mc(R);break;case qt:K=pc(R);break}if((K==bn||K==Xn)&&(n=vn),K==Ge||K==bn)return t.avail_out===0&&(i=-1),Qe;if(K==Kn){if(R==Ns)dc();else if(As(0,0,!1),R==kc)for(O=0;On&&(i=n),i===0?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Cc(e){const t=this,n=new ja,r=Nc(e&&e.chunkSize?e.chunkSize:64*1024),i=rn,s=new Uint8Array(r);let a=e?e.level:hr;typeof a>"u"&&(a=hr),n.deflateInit(a),n.next_out=s,t.append=function(l,o){let f,d,u=0,p=0,w=0;const D=[];if(!!l.length){n.next_in_index=0,n.next_in=l,n.avail_in=l.length;do{if(n.next_out_index=0,n.avail_out=r,f=n.deflate(i),f!=Qe)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?D.push(new Uint8Array(s)):D.push(s.slice(0,n.next_out_index))),w+=n.next_out_index,o&&n.next_in_index>0&&n.next_in_index!=u&&(o(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return D.length>1?(d=new Uint8Array(w),D.forEach(function(h){d.set(h,p),p+=h.length})):d=D[0]||new Uint8Array,d}},t.flush=function(){let l,o,f=0,d=0;const u=[];do{if(n.next_out_index=0,n.avail_out=r,l=n.deflate(Le),l!=Wa&&l!=Qe)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&u.push(s.slice(0,n.next_out_index)),d+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),o=new Uint8Array(d),u.forEach(function(p){o.set(p,f),f+=p.length}),o}}function Nc(e){return e+5*(Math.floor(e/16383)+1)}const Pc=15,J=0,yt=1,Uc=2,Ne=-2,ae=-3,Ys=-4,bt=-5,We=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ba=1440,Yc=0,Wc=4,Hc=9,jc=5,Bc=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Vc=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Gc=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Zc=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],qc=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],zc=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ot=15;function _i(){const e=this;let t,n,r,i,s,a;function l(f,d,u,p,w,D,h,c,m,_,b){let v,g,y,x,E,k,S,A,U,F,B,N,Y,j,q;F=0,E=u;do r[f[d+F]]++,F++,E--;while(E!==0);if(r[0]==u)return h[0]=-1,c[0]=0,J;for(A=c[0],k=1;k<=Ot&&r[k]===0;k++);for(S=k,AE&&(A=E),c[0]=A,j=1<N+A;){if(x++,N+=A,q=y-N,q=q>A?A:q,(g=1<<(k=S-N))>v+1&&(g-=v+1,Y=S,kBa)return ae;s[x]=B=_[0],_[0]+=q,x!==0?(a[x]=E,i[0]=k,i[1]=A,k=E>>>N-A,i[2]=B-s[x-1]-k,m.set(i,(s[x-1]+k)*3)):h[0]=B}for(i[1]=S-N,F>=u?i[0]=128+64:b[F]>>N;k>>=1)E^=k;for(E^=k,U=(1<257?(_==ae?m.msg="oversubscribed distance tree":_==bt?(m.msg="incomplete distance tree",_=ae):_!=Ys&&(m.msg="empty distance tree with lengths",_=ae),_):J)}}_i.inflate_trees_fixed=function(e,t,n,r){return e[0]=Hc,t[0]=jc,n[0]=Bc,r[0]=Vc,J};const Qn=0,Ws=1,Hs=2,js=3,Bs=4,Vs=5,Gs=6,Qr=7,Zs=8,er=9;function $c(){const e=this;let t,n=0,r,i=0,s=0,a=0,l=0,o=0,f=0,d=0,u,p=0,w,D=0;function h(c,m,_,b,v,g,y,x){let E,k,S,A,U,F,B,N,Y,j,q,we,W,he,V,Z;B=x.next_in_index,N=x.avail_in,U=y.bitb,F=y.bitk,Y=y.write,j=Y>=k[Z+1],F-=k[Z+1],y.win[Y++]=k[Z+2],j--;continue}do{if(U>>=k[Z+1],F-=k[Z+1],(A&16)!==0){for(A&=15,W=k[Z+2]+(U&We[A]),U>>=A,F-=A;F<15;)N--,U|=(x.read_byte(B++)&255)<>=k[Z+1],F-=k[Z+1],(A&16)!==0){for(A&=15;F>=A,F-=A,j-=W,Y>=he)V=Y-he,Y-V>0&&2>Y-V?(y.win[Y++]=y.win[V++],y.win[Y++]=y.win[V++],W-=2):(y.win.set(y.win.subarray(V,V+2),Y),Y+=2,V+=2,W-=2);else{V=Y-he;do V+=y.end;while(V<0);if(A=y.end-V,W>A){if(W-=A,Y-V>0&&A>Y-V)do y.win[Y++]=y.win[V++];while(--A!==0);else y.win.set(y.win.subarray(V,V+A),Y),Y+=A,V+=A,A=0;V=0}}if(Y-V>0&&W>Y-V)do y.win[Y++]=y.win[V++];while(--W!==0);else y.win.set(y.win.subarray(V,V+W),Y),Y+=W,V+=W,W=0;break}else if((A&64)===0)E+=k[Z+2],E+=U&We[A],Z=(S+E)*3,A=k[Z];else return x.msg="invalid distance code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae;while(!0);break}if((A&64)===0){if(E+=k[Z+2],E+=U&We[A],Z=(S+E)*3,(A=k[Z])===0){U>>=k[Z+1],F-=k[Z+1],y.win[Y++]=k[Z+2],j--;break}}else return(A&32)!==0?(W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,yt):(x.msg="invalid literal/length code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae)}while(!0)}while(j>=258&&N>=10);return W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,J}e.init=function(c,m,_,b,v,g){t=Qn,f=c,d=m,u=_,p=b,w=v,D=g,r=null},e.proc=function(c,m,_){let b,v,g,y=0,x=0,E=0,k,S,A,U;for(E=m.next_in_index,k=m.avail_in,y=c.bitb,x=c.bitk,S=c.write,A=S=258&&k>=10&&(c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,_=h(f,d,u,p,w,D,c,m),E=m.next_in_index,k=m.avail_in,y=c.bitb,x=c.bitk,S=c.write,A=S>>=r[v+1],x-=r[v+1],g=r[v],g===0){a=r[v+2],t=Gs;break}if((g&16)!==0){l=g&15,n=r[v+2],t=Hs;break}if((g&64)===0){s=g,i=v/3+r[v+2];break}if((g&32)!==0){t=Qr;break}return t=er,m.msg="invalid literal/length code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,c.inflate_flush(m,_);case Hs:for(b=l;x>=b,x-=b,s=d,r=w,i=D,t=js;case js:for(b=s;x>=r[v+1],x-=r[v+1],g=r[v],(g&16)!==0){l=g&15,o=r[v+2],t=Bs;break}if((g&64)===0){s=g,i=v/3+r[v+2];break}return t=er,m.msg="invalid distance code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,c.inflate_flush(m,_);case Bs:for(b=l;x>=b,x-=b,t=Vs;case Vs:for(U=S-o;U<0;)U+=c.end;for(;n!==0;){if(A===0&&(S==c.end&&c.read!==0&&(S=0,A=S7&&(x-=8,k++,E--),c.write=S,_=c.inflate_flush(m,_),S=c.write,A=Sh.avail_out&&(m=h.avail_out),m!==0&&c==bt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m,b==n.end&&(b=0,n.write==n.end&&(n.write=0),m=n.write-b,m>h.avail_out&&(m=h.avail_out),m!==0&&c==bt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m),h.next_out_index=_,n.read=b,c},n.proc=function(h,c){let m,_,b,v,g,y,x,E;for(v=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y>>1){case 0:_>>>=3,b-=3,m=b&7,_>>>=m,b-=m,r=ei;break;case 1:k=[],S=[],A=[[]],U=[[]],_i.inflate_trees_fixed(k,S,A,U),d.init(k[0],S[0],A[0],0,U[0],0),_>>>=3,b-=3,r=tr;break;case 2:_>>>=3,b-=3,r=$s;break;case 3:return _>>>=3,b-=3,r=Vt,h.msg="invalid block type",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c)}break;case ei:for(;b<32;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(v++)&255)<>>16&65535)!=(_&65535))return r=Vt,h.msg="invalid stored block lengths",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);i=_&65535,_=b=0,r=i!==0?zs:u!==0?nr:en;break;case zs:if(g===0||x===0&&(y==n.end&&n.read!==0&&(y=0,x=yg&&(m=g),m>x&&(m=x),n.win.set(h.read_buf(v,m),y),v+=m,g-=m,y+=m,x-=m,(i-=m)!==0)break;r=u!==0?nr:en;break;case $s:for(;b<14;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(v++)&255)<29||(m>>5&31)>29)return r=Vt,h.msg="too many length or distance symbols",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);if(m=258+(m&31)+(m>>5&31),!l||l.length>>=14,b-=14,a=0,r=Ks;case Ks:for(;a<4+(s>>>10);){for(;b<3;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(v++)&255)<>>=3,b-=3}for(;a<19;)l[qs[a++]]=0;if(o[0]=7,m=D.inflate_trees_bits(l,o,f,p,h),m!=J)return c=m,c==ae&&(l=null,r=Vt),n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);a=0,r=Xs;case Xs:for(;m=s,!(a>=258+(m&31)+(m>>5&31));){let j,q;for(m=o[0];b>>=m,b-=m,l[a++]=q;else{for(E=q==18?7:q-14,j=q==18?11:3;b>>=m,b-=m,j+=_&We[E],_>>>=E,b-=E,E=a,m=s,E+j>258+(m&31)+(m>>5&31)||q==16&&E<1)return l=null,r=Vt,h.msg="invalid bit length repeat",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);q=q==16?l[E-1]:0;do l[E++]=q;while(--j!==0);a=E}}if(f[0]=-1,F=[],B=[],N=[],Y=[],F[0]=9,B[0]=6,m=s,m=D.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),l,F,B,N,Y,p,h),m!=J)return m==ae&&(l=null,r=Vt),c=m,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);d.init(F[0],B[0],p,N[0],p,Y[0]),r=tr;case tr:if(n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,(c=d.proc(n,h,c))!=yt)return n.inflate_flush(h,c);if(c=J,d.free(h),v=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y15?(e.inflateEnd(n),Ne):(e.wbits=r,n.istate.blocks=new Kc(n,1<>4)+8>a.wbits){a.mode=Rt,n.msg="invalid win size",a.marker=5;break}a.mode=Qs;case Qs:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,s=n.read_byte(n.next_in_index++)&255,((a.method<<8)+s)%31!==0){a.mode=Rt,n.msg="incorrect header check",a.marker=5;break}if((s&Xc)===0){a.mode=kn;break}a.mode=ea;case ea:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,a.mode=ta;case ta:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,a.mode=na;case na:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,a.mode=ra;case ra:return n.avail_in===0?i:(i=r,n.avail_in--,n.total_in++,a.need+=n.read_byte(n.next_in_index++)&255,a.mode=ti,Uc);case ti:return a.mode=Rt,n.msg="need dictionary",a.marker=0,Ne;case kn:if(i=a.blocks.proc(n,i),i==ae){a.mode=Rt,a.marker=0;break}if(i==J&&(i=r),i!=yt)return i;i=r,a.blocks.reset(n,a.was),a.mode=ia;case ia:return n.avail_in=0,yt;case Rt:return ae;default:return Ne}},e.inflateSetDictionary=function(n,r,i){let s=0,a=i;if(!n||!n.istate||n.istate.mode!=ti)return Ne;const l=n.istate;return a>=1<0&&n.next_in_index!=p&&(o(n.next_in_index),p=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return f.length>1?(u=new Uint8Array(D),f.forEach(function(h){u.set(h,w),w+=h.length})):u=f[0]||new Uint8Array,u}},t.flush=function(){n.inflateEnd()}}const pe=4294967295,ke=65535,wi=8,Ga=0,Za=99,qa=67324752,ji=134695760,rd=ji,gi=33639248,za=101010256,xi=101075792,$a=117853008,an=22,An=20,On=56,id=an+An+On,Ka=1,Xa=39169,Ja=10,Qa=1,Bi=21589,sd=28789,ad=25461,yi=1,od=6,bi=8,vi=2048,ki=16,ld=20,sa=45,aa=51,or="/",oa=new Date(2107,11,31),la=new Date(1980,0,1),fe=void 0,mr="undefined",eo="function";class ca{constructor(t){return class extends TransformStream{constructor(n,r){const i=new t(r);super({transform(s,a){a.enqueue(i.append(s))},flush(s){const a=i.flush();a&&s.enqueue(a)}})}}}}const cd=64;let to=2;try{typeof navigator!=mr&&navigator.hardwareConcurrency&&(to=navigator.hardwareConcurrency)}catch{}const dd={chunkSize:512*1024,maxWorkers:to,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:fe,CompressionStreamNative:typeof CompressionStream!=mr&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=mr&&DecompressionStream},Ft=Object.assign({},dd);function Vi(){return Ft}function no(e){return Math.max(e.chunkSize,cd)}function Gi(e){const{baseURL:t,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:i,useCompressionStream:s,useWebWorkers:a,Deflate:l,Inflate:o,CompressionStream:f,DecompressionStream:d,workerScripts:u}=e;if(Mt("baseURL",t),Mt("chunkSize",n),Mt("maxWorkers",r),Mt("terminateWorkerTimeout",i),Mt("useCompressionStream",s),Mt("useWebWorkers",a),l&&(Ft.CompressionStream=new ca(l)),o&&(Ft.DecompressionStream=new ca(o)),Mt("CompressionStream",f),Mt("DecompressionStream",d),u!==fe){const{deflate:p,inflate:w}=u;if((p||w)&&(Ft.workerScripts||(Ft.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");Ft.workerScripts.deflate=p}if(w){if(!Array.isArray(w))throw new Error("workerScripts.inflate must be an array");Ft.workerScripts.inflate=w}}}function Mt(e,t){t!==fe&&(Ft[e]=t)}const Sn={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin",cap:["cap","pcap"],"cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",javascript:"js",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":"odm","vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-debian-package":["deb","udeb"],"x-director":["dcr","dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-koan":["skp","skd","skt","skm"],"x-kpresenter":["kpr","kpt"],"x-kword":["kwd","kwt"],"x-latex":"latex","x-lha":"lha","x-lyx":"lyx","x-lzh":"lzh","x-lzx":"lzx","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-ms-wmd":"wmd","x-ms-wmz":"wmz","x-msdos-program":["com","exe","bat","dll"],"x-msi":"msi","x-netcdf":["nc","cdf"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":"rpm","x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tcl":"tcl","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-troff":["t","tr","roff"],"x-troff-man":"man","x-troff-me":"me","x-troff-ms":"ms","x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix",json:"json","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":"mathml",mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","x-msdownload":["exe","dll","com","bat","msi"],"x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tads":"gam","x-tex":"tex","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-compressed":"tgz","x-gzip":"gz","x-perfmon":["pma","pmc","pml","pmr","pmw"],"x-pkcs7-mime":["p7c","p7m"],"ynd.ms-pkipko":"pko"},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":["aif","aiff","aifc"],"x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2","x-wav":"wav",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":["mmd","mmod"],"x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":["sd","sdf"],"x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","mpc","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":["val","aso"],"x-pdb":["pdb","ent"],"x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-photoshop":"psd","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",pipeg:"jfif"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":["x3d","x3dz"],"x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:["tm","ts"],"tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{avif:".avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","vrml","wrl","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const t in Sn)if(Sn.hasOwnProperty(t)){for(const n in Sn[t])if(Sn[t].hasOwnProperty(n)){const r=Sn[t][n];if(typeof r=="string")e[r]=t+"/"+n;else for(let i=0;i>>1^3988292384:t=t>>>1;ro[e]=t}class pr{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let r=0,i=t.length|0;r>>8^ro[(n^t[r])&255];this.crc=n}get(){return~this.crc}}class io extends TransformStream{constructor(){const t=new pr;super({transform(n){t.append(n)},flush(n){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t.get()),n.enqueue(r)}})}}function Si(e){if(typeof TextEncoder>"u"){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n0&&t&&(e[n-1]=Fe.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let a=0;a>>t),n=e[a]<<32-t;const i=e.length?e[e.length-1]:0,s=Fe.getPartial(i);return r.push(Fe.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},_r={bytes:{fromBits(e){const n=Fe.bitLength(e)/8,r=new Uint8Array(n);let i;for(let s=0;s>>24,i<<=8;return r},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let l=t.blockSize+r-(t.blockSize+r&t.blockSize-1);l<=i;l+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=Fe.concat(t,[Fe.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r},_S(e,t){return t<>>32-e},_block(e){const t=this,n=t._h,r=Array(80);for(let f=0;f<16;f++)r[f]=e[f];let i=n[0],s=n[1],a=n[2],l=n[3],o=n[4];for(let f=0;f<=79;f++){f>=16&&(r[f]=t._S(1,r[f-3]^r[f-8]^r[f-14]^r[f-16]));const d=t._S(5,i)+t._f(f,s,a,l)+o+r[f]+t._key[Math.floor(f/20)]|0;o=l,l=a,a=t._S(30,s),s=i,i=d}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+l|0,n[4]=n[4]+o|0}};const so={};so.aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,l,o=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),l=[]],s=i;s<4*i+28;s++){let f=a[s-1];(s%i===0||i===8&&s%i===4)&&(f=n[f>>>24]<<24^n[f>>16&255]<<16^n[f>>8&255]<<8^n[f&255],s%i===0&&(f=f<<8^f>>>24^o<<24,o=o<<1^(o>>7)*283)),a[s]=a[s-i]^f}for(let f=0;s;f++,s--){const d=a[f&3?s:s-4];s<=4||f<4?l[f]=d:l[f]=r[0][n[d>>>24]]^r[1][n[d>>16&255]]^r[2][n[d>>8&255]]^r[3][n[d&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,l,o,f;for(let d=0;d<256;d++)s[(i[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!n[d];d^=l||1,a=s[a]||1){let u=a^a<<1^a<<2^a<<3^a<<4;u=u>>8^u&255^99,n[d]=u,r[u]=d,f=i[o=i[l=i[d]]];let p=f*16843009^o*65537^l*257^d*16843008,w=i[u]*257^u*16843008;for(let D=0;D<4;D++)e[D][d]=w=w<<24^w>>>8,t[D][u]=p=p<<24^p>>>8}for(let d=0;d<5;d++)e[d]=e[d].slice(0),t[d]=t[d].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],l=s[1],o=s[2],f=s[3],d=s[4];let u=e[0]^n[0],p=e[t?3:1]^n[1],w=e[2]^n[2],D=e[t?1:3]^n[3],h=4,c,m,_;for(let b=0;b>>24]^l[p>>16&255]^o[w>>8&255]^f[D&255]^n[h],m=a[p>>>24]^l[w>>16&255]^o[D>>8&255]^f[u&255]^n[h+1],_=a[w>>>24]^l[D>>16&255]^o[u>>8&255]^f[p&255]^n[h+2],D=a[D>>>24]^l[u>>16&255]^o[p>>8&255]^f[w&255]^n[h+3],h+=4,u=c,p=m,w=_;for(let b=0;b<4;b++)i[t?3&-b:b]=d[u>>>24]<<24^d[p>>16&255]<<16^d[w>>8&255]<<8^d[D&255]^n[h++],c=u,u=p,p=w,w=D,D=c;return i}};const fd={getRandomValues(e){const t=new Uint32Array(e.buffer),n=r=>{let i=987654321;const s=4294967295;return function(){return i=36969*(i&65535)+(i>>16)&s,r=18e3*(r&65535)+(r>>16)&s,(((i<<16)+r&s)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r>24&255)===255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=Fe.bitLength(t);for(let s=0;s>5)+1<<2;let s,a,l,o,f;const d=new ArrayBuffer(i),u=new DataView(d);let p=0;const w=Fe;for(t=_r.bytes.toBits(t),f=1;p<(i||1);f++){for(s=a=e.encrypt(w.concat(t,[f])),l=1;li&&(e=n.hash(e));for(let s=0;sthis.resolveReady=i),password:t,signed:n,strength:r-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:l,strength:o,resolveReady:f,ready:d}=a;l?(await Dd(a,o,l,qe(i,0,Fn[o]+2)),i=qe(i,Fn[o]+2),f()):await d;const u=new Uint8Array(i.length-It-(i.length-It)%on);s.enqueue(_o(a,i,u,0,It,!0))},async flush(i){const{signed:s,ctr:a,hmac:l,pending:o,ready:f}=this;await f;const d=qe(o,0,o.length-It),u=qe(o,o.length-It);let p=new Uint8Array;if(d.length){const w=Cn(lt,d);l.update(w);const D=a.update(w);p=Ln(lt,D)}if(s){const w=qe(Ln(lt,l.digest()),0,It);for(let D=0;Dthis.resolveReady=i),password:t,strength:n-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:l,strength:o,resolveReady:f,ready:d}=a;let u=new Uint8Array;l?(u=await Td(a,o,l),f()):await d;const p=new Uint8Array(u.length+i.length-i.length%on);p.set(u,0),s.enqueue(_o(a,i,p,u.length,0))},async flush(i){const{ctr:s,hmac:a,pending:l,ready:o}=this;await o;let f=new Uint8Array;if(l.length){const d=s.update(Cn(lt,l));a.update(d),f=Ln(lt,d)}r.signature=Ln(lt,a.digest()).slice(0,It),i.enqueue(qi(f,r.signature))}}),r=this}}function _o(e,t,n,r,i,s){const{ctr:a,hmac:l,pending:o}=e,f=t.length-i;o.length&&(t=qi(o,t),n=Rd(n,f-f%on));let d;for(d=0;d<=f-on;d+=on){const u=Cn(lt,qe(t,d,d+on));s&&l.update(u);const p=a.update(u);s||l.update(p),n.set(Ln(lt,p),d+r)}return e.pending=qe(t,d),n}async function Dd(e,t,n,r){const i=await wo(e,t,n,qe(r,0,Fn[t])),s=qe(r,Fn[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new Error(oo)}async function Td(e,t,n){const r=co(new Uint8Array(Fn[t])),i=await wo(e,t,n,r);return qi(r,i)}async function wo(e,t,n,r){e.password=null;const i=Si(n),s=await Ad(hd,i,_d,!1,wd),a=await Od(Object.assign({salt:r},uo),s,8*(En[t]*2+2)),l=new Uint8Array(a),o=Cn(lt,qe(l,0,En[t])),f=Cn(lt,qe(l,En[t],En[t]*2)),d=qe(l,En[t]*2);return Object.assign(e,{keys:{key:o,authentication:f,passwordVerification:d},ctr:new vd(new bd(o),Array.from(gd)),hmac:new kd(f)}),d}function Ad(e,t,n,r,i){return xd?Wn.importKey(e,t,n,r,i):Yn.importKey(t)}async function Od(e,t,n){return yd?await Wn.deriveBits(e,t,n):Yn.pbkdf2(t,e.salt,uo.iterations,n)}function qi(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Rd(e,t){if(t&&t>e.length){const n=e;e=new Uint8Array(t),e.set(n,0)}return e}function qe(e,t,n){return e.subarray(t,n)}function Ln(e,t){return e.fromBits(t)}function Cn(e,t){return e.toBits(t)}const cn=12;class Md extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),go(this,t)},transform(r,i){const s=this;if(s.password){const a=da(s,r.subarray(0,cn));if(s.password=null,a[cn-1]!=s.passwordVerification)throw new Error(oo);r=r.subarray(cn)}i.enqueue(da(s,r))}})}}class Id extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),go(this,t)},transform(r,i){const s=this;let a,l;if(s.password){s.password=null;const o=co(new Uint8Array(cn));o[cn-1]=s.passwordVerification,a=new Uint8Array(r.length+o.length),a.set(fa(s,o),0),l=cn}else a=new Uint8Array(r.length),l=0;a.set(fa(s,r),l),i.enqueue(a)}})}}function da(e,t){const n=new Uint8Array(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function xo(e){const t=e.keys[2]|2;return yo(Math.imul(t,t^1)>>>8)}function yo(e){return e&255}function ua(e){return e&4294967295}const ha="deflate-raw";class Fd extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:r,CompressionStreamNative:i}){super({});const{compressed:s,encrypted:a,useCompressionStream:l,zipCrypto:o,signed:f,level:d}=t,u=this;let p,w,D=bo(super.readable);(!a||o)&&f&&([D,p]=D.tee(),p=ct(p,new io)),s&&(D=ko(D,l,{level:d,chunkSize:n},i,r)),a&&(o?D=ct(D,new Id(t)):(w=new Ed(t),D=ct(D,w))),vo(u,D,async()=>{let h;a&&!o&&(h=w.signature),(!a||o)&&f&&(h=await p.getReader().read(),h=new DataView(h.value.buffer).getUint32(0)),u.signature=h})}}class Ld extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:r,DecompressionStreamNative:i}){super({});const{zipCrypto:s,encrypted:a,signed:l,signature:o,compressed:f,useCompressionStream:d}=t;let u,p,w=bo(super.readable);a&&(s?w=ct(w,new Md(t)):(p=new Sd(t),w=ct(w,p))),f&&(w=ko(w,d,{chunkSize:n},i,r)),(!a||s)&&l&&([w,u]=w.tee(),u=ct(u,new io)),vo(this,w,async()=>{if((!a||s)&&l){const D=await u.getReader().read(),h=new DataView(D.value.buffer);if(o!=h.getUint32(0,!1))throw new Error(lo)}})}}function bo(e){return ct(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function vo(e,t,n){t=ct(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function ko(e,t,n,r,i){try{const s=t&&r?r:i;e=ct(e,new s(ha,n))}catch(s){if(t)e=ct(e,new i(ha,n));else throw s}return e}function ct(e,t){return e.pipeThrough(t)}const Cd="message",Nd="start",Pd="pull",ma="data",Ud="ack",Yd="close",So="deflate",Eo="inflate";class Wd extends TransformStream{constructor(t,n){super({});const r=this,{codecType:i}=t;let s;i.startsWith(So)?s=Fd:i.startsWith(Eo)&&(s=Ld);let a=0;const l=new s(t,n),o=super.readable,f=new TransformStream({transform(d,u){d&&d.length&&(a+=d.length,u.enqueue(d))},flush(){const{signature:d}=l;Object.assign(r,{signature:d,size:a})}});Object.defineProperty(r,"readable",{get(){return o.pipeThrough(l).pipeThrough(f)}})}}const Hd=typeof Worker!=mr;class ni{constructor(t,{readable:n,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:l,transferStreams:o,scripts:f},d){const{signal:u}=a;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new jd(n,a,s),{signal:u}),writable:r,options:Object.assign({},i),scripts:f,transferStreams:o,terminate(){const{worker:p,busy:w}=t;p&&!w&&(p.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,d(t)}}),(l&&Hd?Vd:Bd)(t,s)}}class jd extends TransformStream{constructor(t,{onstart:n,onprogress:r,size:i,onend:s},{chunkSize:a}){let l=0;super({start(){n&&ri(n,i)},async transform(o,f){l+=o.length,r&&await ri(r,l,i),f.enqueue(o)},flush(){t.size=l,s&&ri(s,l)}},{highWaterMark:1,size:()=>a})}}async function ri(e,...t){try{await e(...t)}catch{}}function Bd(e,t){return{run:()=>Gd(e,t)}}function Vd(e,{baseURL:t,chunkSize:n}){return e.interface||Object.assign(e,{worker:zd(e.scripts[0],t,e),interface:{run:()=>Zd(e,{chunkSize:n})}}),e.interface}async function Gd({options:e,readable:t,writable:n,onTaskFinished:r},i){const s=new Wd(e,i);try{await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,size:l}=s;return{signature:a,size:l}}finally{r()}}async function Zd(e,t){let n,r;const i=new Promise((p,w)=>{n=p,r=w});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});const{readable:s,options:a,scripts:l}=e,{writable:o,closed:f}=qd(e.writable);Ei({type:Nd,scripts:l.slice(1),options:a,config:t,readable:s,writable:o},e)||Object.assign(e,{reader:s.getReader(),writer:o.getWriter()});const u=await i;try{await o.close()}catch{}return await f,u}function qd(e){const t=e.getWriter();let n;const r=new Promise(s=>n=s);return{writable:new WritableStream({async write(s){await t.ready,await t.write(s)},close(){t.releaseLock(),n()},abort(s){return t.abort(s)}}),closed:r}}let pa=!0,_a=!0;function zd(e,t,n){const r={type:"module"};let i,s;typeof e==eo&&(e=e());try{i=new URL(e,t)}catch{i=e}if(pa)try{s=new Worker(i)}catch{pa=!1,s=new Worker(i,r)}else s=new Worker(i,r);return s.addEventListener(Cd,a=>$d(a,n)),s}function Ei(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:s,readable:a,writable:l}=e;const o=[];if(s){const{buffer:f,length:d}=s;d!=f.byteLength&&(s=new Uint8Array(s)),e.value=s.buffer,o.push(e.value)}if(i&&_a?(a&&o.push(a),l&&o.push(l)):e.readable=e.writable=null,o.length)try{return t.postMessage(e,o),!0}catch{_a=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(s){throw n&&n.releaseLock(),r(),s}}async function $d({data:e},t){const{type:n,value:r,messageId:i,result:s,error:a}=e,{reader:l,writer:o,resolveResult:f,rejectResult:d,onTaskFinished:u}=t;try{if(a){const{message:w,stack:D,code:h,name:c}=a,m=new Error(w);Object.assign(m,{stack:D,code:h,name:c}),p(m)}else{if(n==Pd){const{value:w,done:D}=await l.read();Ei({type:ma,value:w,done:D,messageId:i},t)}n==ma&&(await o.ready,await o.write(new Uint8Array(r)),Ei({type:Ud,messageId:i},t)),n==Yd&&p(null,s)}}catch(w){p(w)}function p(w,D){w?d(w):f(D),o&&o.releaseLock(),u()}}let Gt=[];const ii=[];let wa=0;async function Do(e,t){const{options:n,config:r}=t,{transferStreams:i,useWebWorkers:s,useCompressionStream:a,codecType:l,compressed:o,signed:f,encrypted:d}=n,{workerScripts:u,maxWorkers:p,terminateWorkerTimeout:w}=r;t.transferStreams=i||i===fe;const D=!o&&!f&&!d&&!t.transferStreams;t.useWebWorkers=!D&&(s||s===fe&&r.useWebWorkers),t.scripts=t.useWebWorkers&&u?u[l]:[],n.useCompressionStream=a||a===fe&&r.useCompressionStream;let h;const c=Gt.find(_=>!_.busy);if(c)ga(c),h=new ni(c,e,t,m);else if(Gt.lengthii.push({resolve:_,stream:e,workerOptions:t}));return h.run();function m(_){if(ii.length){const[{resolve:b,stream:v,workerOptions:g}]=ii.splice(0,1);b(new ni(_,v,g,m))}else _.worker?(ga(_),Number.isFinite(w)&&w>=0&&(_.terminateTimeout=setTimeout(()=>{Gt=Gt.filter(b=>b!=_),_.terminate()},w))):Gt=Gt.filter(b=>b!=_)}}function ga(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function Kd(e){const t=()=>URL.createObjectURL(new Blob([`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:"PBKDF2"},B=t.assign({hash:{name:"HMAC"}},R),E=t.assign({iterations:1e3,hash:{name:"SHA-1"}},R),M=["deriveBits"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&"function"==typeof T.importKey,L=N&&W&&"function"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s("Invalid password")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s("Invalid signature")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey("raw",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s("Invalid password");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s("Invalid signature")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)("deflate-raw",n))}catch(r){if(!t)throw r;e=pe(e,new s("deflate-raw",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=le:s.startsWith("inflate")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:"pull",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:"data",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:"close",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&ke(e),"data"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe="oversubscribed dynamic bit lengths tree":-5!=a&&0!==r[0]||(f.Oe="incomplete dynamic bit lengths tree",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe="oversubscribed literal/length tree":-4!=h&&(w.Oe="incomplete literal/length tree",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe="oversubscribed distance tree":-5==h?(w.Oe="incomplete distance tree",h=-3):-4!=h&&(w.Oe="empty distance tree with lengths",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe="invalid distance code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe="invalid literal/length code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe="invalid literal/length code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe="invalid distance code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe="invalid block type",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe="invalid stored block lengths",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe="too many length or distance symbols",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe="invalid bit length repeat",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe="need dictionary",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye}; -`],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}const To="HTTP error ",Rr="HTTP Range not supported",Xd="Writer iterator completed too soon",Jd="text/plain",Qd="Content-Length",ef="Content-Range",tf="Accept-Ranges",nf="Range",rf="Content-Type",sf="HEAD",$i="GET",Ao="bytes",af=64*1024,Ki="writable";class Mr{constructor(){this.size=0}init(){this.initialized=!0}}class Yt extends Mr{get readable(){const t=this,{chunkSize:n=af}=t,r=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:s=0,size:a,diskNumberStart:l}=r,{chunkOffset:o}=this;i.enqueue(await Ie(t,s+o,Math.min(n,a-o),l)),o+n>a?i.close():this.chunkOffset+=n}});return r}}class Oo extends Mr{constructor(){super();const t=this,n=new WritableStream({write(r){return t.writeUint8Array(r)}});Object.defineProperty(t,Ki,{get(){return n}})}writeUint8Array(){}}class Di extends Yt{constructor(t){super();let n=t.length;for(;t.charAt(n-1)=="=";)n--;const r=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:r,size:Math.floor((n-r)*.75)})}readUint8Array(t,n){const{dataStart:r,dataURI:i}=this,s=new Uint8Array(n),a=Math.floor(t/3)*4,l=atob(i.substring(a+r,Math.ceil((t+n)/3)*4+r)),o=t-Math.floor(a/4)*3;for(let f=o;f2?n.data+=btoa(i):n.pending=i}getData(){return this.data+btoa(this.pending)}}class mn extends Yt{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){const r=this;return new Uint8Array(await r.blob.slice(t,t+n).arrayBuffer())}}class Kt extends Mr{constructor(t){super();const n=this,r=new TransformStream,i=[];t&&i.push([rf,t]),Object.defineProperty(n,Ki,{get(){return r.writable}}),n.blob=new Response(r.readable,{headers:i}).blob()}getData(){return this.blob}}class Ro extends mn{constructor(t){super(new Blob([t],{type:Jd}))}}class Ti extends Kt{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:n}=this,r=await super.getData();if(r.text&&n)return r.text();{const i=new FileReader;return new Promise((s,a)=>{Object.assign(i,{onload:({target:l})=>s(l.result),onerror:()=>a(i.error)}),i.readAsText(r,t)})}}}class of extends Yt{constructor(t,n){super(),Mo(this,t,n)}async init(){super.init(),await Io(this,Ai,xa)}readUint8Array(t,n){return Fo(this,t,n,Ai,xa)}}class lf extends Yt{constructor(t,n){super(),Mo(this,t,n)}async init(){super.init(),await Io(this,Oi,ya)}readUint8Array(t,n){return Fo(this,t,n,Oi,ya)}}function Mo(e,t,n){const{preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s}=n;n=Object.assign({},n),delete n.preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.useXHR,Object.assign(e,{url:t,options:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s})}async function Io(e,t,n){const{url:r,useRangeHeader:i,forceRangeRequests:s}=e;if(df(r)&&(i||s)){const{headers:a}=await t($i,e,Lo(e));if(!s&&a.get(tf)!=Ao)throw new Error(Rr);{let l;const o=a.get(ef);if(o){const f=o.trim().split(/\s*\/\s*/);if(f.length){const d=f[1];d&&d!="*"&&(l=Number(d))}}l===fe?await ba(e,t,n):e.size=l}}else await ba(e,t,n)}async function Fo(e,t,n,r,i){const{data:s,useRangeHeader:a,forceRangeRequests:l,options:o}=e;if(a||l){const f=await r($i,e,Lo(e,t,n));if(f.status!=206)throw new Error(Rr);return new Uint8Array(await f.arrayBuffer())}else return s||await i(e,o),new Uint8Array(s.subarray(t,t+n))}function Lo(e,t=0,n=1){return Object.assign({},Xi(e),{[nf]:Ao+"="+t+"-"+(t+n-1)})}function Xi({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function xa(e){await Co(e,Ai)}async function ya(e){await Co(e,Oi)}async function Co(e,t){const n=await t($i,e,Xi(e));e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function ba(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t(sf,e,Xi(e))).headers.get(Qd);i?e.size=Number(i):await n(e,e.options)}}async function Ai(e,{options:t,url:n},r){const i=await fetch(n,Object.assign({},t,{method:e,headers:r}));if(i.status<400)return i;throw i.status==416?new Error(Rr):new Error(To+(i.statusText||i.status))}function Oi(e,{url:t},n){return new Promise((r,i)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",()=>{if(s.status<400){const a=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(l=>{const o=l.trim().split(/\s*:\s*/);o[0]=o[0].trim().replace(/^[a-z]|-[a-z]/g,f=>f.toUpperCase()),a.push(o)}),r({status:s.status,arrayBuffer:()=>s.response,headers:new Map(a)})}else i(s.status==416?new Error(Rr):new Error(To+(s.statusText||s.status)))},!1),s.addEventListener("error",a=>i(a.detail.error),!1),s.open(e,t),n)for(const a of Object.entries(n))s.setRequestHeader(a[0],a[1]);s.responseType="arraybuffer",s.send()})}class va extends Yt{constructor(t,n={}){super(),Object.assign(this,{url:t,reader:n.useXHR?new lf(t,n):new of(t,n)})}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(t,n){return this.reader.readUint8Array(t,n)}}class Ri extends Yt{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,n){return this.array.slice(t,t+n)}}class gr extends Oo{init(t=0){super.init(),Object.assign(this,{offset:0,array:new Uint8Array(t)})}writeUint8Array(t){const n=this;if(n.offset+t.length>n.array.length){const r=n.array;n.array=new Uint8Array(r.length+t.length),n.array.set(r)}n.array.set(t,n.offset),n.offset+=t.length}getData(){return this.array}}class cf extends Yt{constructor(t){super(),this.readers=t}async init(){super.init();const t=this,{readers:n}=t;t.lastDiskNumber=0,await Promise.all(n.map(async r=>{await r.init(),t.size+=r.size}))}async readUint8Array(t,n,r=0){const i=this,{readers:s}=this;let a,l=r;l==-1&&(l=s.length-1);let o=t;for(;o>=s[l].size;)o-=s[l].size,l++;const f=s[l],d=f.size;if(o+n<=d)a=await Ie(f,o,n);else{const u=d-o;a=new Uint8Array(n),a.set(await Ie(f,o,u)),a.set(await i.readUint8Array(t+u,n-u,r),u)}return i.lastDiskNumber=Math.max(l,i.lastDiskNumber),a}}class ka extends Mr{constructor(t,n=4294967296){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,availableSize:n});let i,s,a;const l=new WritableStream({async write(d){if(a)if(i.size+d.length>=n){const u=n-i.size;await o(d.slice(0,u)),await f(),r.diskOffset+=i.size,r.diskNumber++,a=null,await this.write(d.slice(u))}else d.length&&await o(d),r.availableSize=n-i.size;else{const{value:u,done:p}=await t.next();if(p&&!u)throw new Error(Xd);i=u,i.size=0,s=u.writable,a=s.getWriter(),await this.write(d)}},async close(){await a.ready,await f()}});Object.defineProperty(r,Ki,{get(){return l}});async function o(d){await a.ready,await a.write(d),i.size+=d.length,r.size+=d.length}async function f(){s.size=i.size,await a.close()}}}function df(e){const{baseURL:t}=Vi(),{protocol:n}=new URL(e,t);return n=="http:"||n=="https:"}async function ze(e,t){e.init&&!e.initialized&&await e.init(t)}function Ie(e,t,n,r){return e.readUint8Array(t,n,r)}const No="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),ff=No.length==256;function uf(e){if(ff){let t="";for(let n=0;nthis[n]=t[n])}}const si="File format is not recognized",_f="End of central directory not found",wf="End of Zip64 central directory not found",gf="End of Zip64 central directory locator not found",xf="Central directory header not found",yf="Local file header not found",bf="Zip64 extra field not found",vf="File contains encrypted entry",kf="Encryption method not supported",Sa="Compression method not supported",Ea="Split zip file",Da="utf-8",Ta="cp437",Sf=[[Ho,pe],[jo,pe],[Bo,pe],[Ii,ke]],Ef={[ke]:{getValue:_e,bytes:4},[pe]:{getValue:lr,bytes:8}};class Df{constructor(t,n={}){t instanceof ReadableStream&&(t={readable:t}),Object.assign(this,{reader:t,options:n,config:Vi()})}async*getEntriesGenerator(t={}){const n=this;let{reader:r}=n;const{config:i}=n;if(await ze(r),(r.size===fe||!r.readUint8Array)&&(Array.isArray(r)?r=new cf(r):r=new mn(await new Response(r.readable).blob()),await ze(r)),r.size=r.size)throw new Error(si);let _=0,b=await Ie(r,o,l,D),v=Te(b);if(l){const k=s.offset-l;if(_e(v,_)!=gi&&o!=k){const S=o;o=k,c=o-S,b=await Ie(r,o,l,D),v=Te(b)}}if(o<0||o>=r.size)throw new Error(si);const g=tt(n,t,"filenameEncoding"),y=tt(n,t,"commentEncoding");for(let k=0;kS.getData(mt,Ht,jt),_=we;const{onprogress:Dt}=t;if(Dt)try{await Dt(k+1,h,new xr(S))}catch{}yield Ht}const x=tt(n,t,"extractPrependedData"),E=tt(n,t,"extractAppendedData");return x&&(n.prependedData=m>0?await Ie(r,0,m):new Uint8Array),n.comment=d?await Ie(r,f+an,d):new Uint8Array,E&&(n.appendedData=u>>8&255:p>>>24&255),signature:p,compressed:f!=0,encrypted:v,useWebWorkers:tt(i,r,"useWebWorkers"),useCompressionStream:tt(i,r,"useCompressionStream"),transferStreams:tt(i,r,"transferStreams")},config:d,streamOptions:{signal:S,size:E,onstart:A,onprogress:U,onend:F}};return k.size+=(await Do({readable:x,writable:k},B)).size,tt(i,r,"preventClose")||await k.close(),t.getData?t.getData():k}}function $o(e,t,n){const r=e.rawBitFlag=be(t,n+2),i=(r&yi)==yi,s=_e(t,n+6);Object.assign(e,{encrypted:i,version:be(t,n),bitFlag:{level:(r&od)>>1,dataDescriptor:(r&bi)==bi,languageEncodingFlag:(r&vi)==vi},rawLastModDate:s,lastModDate:Ff(s),filenameLength:be(t,n+22),extraFieldLength:be(t,n+24)})}async function Ko(e,t,n,r){const{rawExtraField:i}=t,s=t.extraField=new Map,a=Te(new Uint8Array(i));let l=0;try{for(;lt[i]==s);for(let i=0,s=0;i{if(e.data.length>=a+4){const f=_e(n,a);t[l]=e[l]=new Date(f*1e3);const d=s[o];e[d]=f}a+=4})}async function If(e,t,n,r,i){const s=new Uint8Array(4),a=Te(s);Lf(a,0,t);const l=r+i;return await o(r)||await o(Math.min(l,n));async function o(f){const d=n-f,u=await Ie(e,d,f);for(let p=u.length-r;p>=0;p--)if(u[p]==s[0]&&u[p+1]==s[1]&&u[p+2]==s[2]&&u[p+3]==s[3])return{offset:d+p,buffer:u.slice(p,p+r).buffer}}}function tt(e,t,n){return t[n]===fe?e.options[n]:t[n]}function Ff(e){const t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function ai(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function dn(e,t){return e.getUint8(t)}function be(e,t){return e.getUint16(t,!0)}function _e(e,t){return e.getUint32(t,!0)}function lr(e,t){return Number(e.getBigUint64(t,!0))}function Lf(e,t,n){e.setUint32(t,n,!0)}function Te(e){return new DataView(e.buffer)}const Cf="File already exists",Nf="Zip file comment exceeds 64KB",Pf="File entry comment exceeds 64KB",Uf="File entry name exceeds 64KB",Oa="Version exceeds 65535",Yf="The strength must equal 1, 2, or 3",Wf="Extra field type exceeds 65535",Hf="Extra field data exceeds 64KB",ts="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Ra=new Uint8Array([7,0,2,0,65,69,3,0,0]),Xo=28;let oi=0;const Ma=[];class jf{constructor(t,n={}){t.writable===fe&&typeof t.next==eo&&(t=new ka(t)),t instanceof WritableStream&&(t={writable:t}),t.writable.size===fe&&(t.writable.size=0);const r=t instanceof ka;r||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0}),Object.assign(this,{writer:t,addSplitZipSignature:r,options:n,config:Vi(),files:new Map,filenames:new Set,offset:t.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set})}async add(t="",n,r={}){const i=this,{pendingAddFileCalls:s,config:a}=i;oiMa.push(o));let l;try{if(t=t.trim(),i.filenames.has(t))throw new Error(Cf);return i.filenames.add(t),l=Bf(i,t,n,r),s.add(l),await l}catch(o){throw i.filenames.delete(t),o}finally{s.delete(l);const o=Ma.shift();o?o():oi--}}async close(t=new Uint8Array,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:s}=i;for(;r.size;)await Promise.all(Array.from(r));return await Xf(this,t,n),!i.preventClose&&!n.preventClose&&await s.close(),i.getData?i.getData():s}}async function Bf(e,t,n,r){t=t.trim(),r.directory&&!t.endsWith(or)?t+=or:r.directory=t.endsWith(or);const i=Si(t);if(ee(i)>ke)throw new Error(Uf);const s=r.comment||"",a=Si(s);if(ee(a)>ke)throw new Error(Pf);const l=e.options.version||r.version||0;if(l>ke)throw new Error(Oa);const o=e.options.versionMadeBy||r.versionMadeBy||20;if(o>ke)throw new Error(Oa);const f=xe(e,r,Ji)||new Date,d=xe(e,r,Qi),u=xe(e,r,es),p=xe(e,r,"password"),w=xe(e,r,"encryptionStrength")||3,D=xe(e,r,"zipCrypto");if(p!==fe&&w!==fe&&(w<1||w>3))throw new Error(Yf);let h=new Uint8Array;const{extraField:c}=r;if(c){let he=0,V=0;c.forEach(Z=>he+=4+ee(Z)),h=new Uint8Array(he),c.forEach((Z,Se)=>{if(Se>ke)throw new Error(Wf);if(ee(Z)>ke)throw new Error(Hf);ve(h,new Uint16Array([Se]),V),ve(h,new Uint16Array([ee(Z)]),V+2),ve(h,Z,V+4),V+=4+ee(Z)})}let m=xe(e,r,"extendedTimestamp");m===fe&&(m=!0);let _=0,b=0,v=xe(e,r,"keepOrder");v===fe&&(v=!0);let g=0,y=xe(e,r,qo);y===fe&&(y=!0);const x=xe(e,r,Go)||0,E=xe(e,r,Zo)||0;let k=xe(e,r,zo);n&&(n instanceof ReadableStream&&(n={readable:n}),await ze(n),n.size===fe?(r.dataDescriptor=!0,(k||k===fe)&&(k=!0,_=pe)):(g=n.size,_=Qf(g)));const{diskOffset:S}=e.writer;if(e.offset+e.pendingEntriesSize-S>=pe||g>=pe||_>=pe){if(k===!1||!v)throw new Error(ts);k=!0}k=k||!1;const A=xe(e,r,"level"),U=xe(e,r,"useWebWorkers"),F=xe(e,r,"bufferedWrite");let B=xe(e,r,"dataDescriptor"),N=xe(e,r,"dataDescriptorSignature");const Y=xe(e,r,"signal"),j=xe(e,r,"useCompressionStream");B===fe&&(B=!0),B&&N===fe&&(N=!1),r=Object.assign({},r,{rawFilename:i,rawComment:a,version:l,versionMadeBy:o,lastModDate:f,lastAccessDate:d,creationDate:u,rawExtraField:h,zip64:k,password:p,level:A,useWebWorkers:U,encryptionStrength:w,extendedTimestamp:m,zipCrypto:D,bufferedWrite:F,keepOrder:v,dataDescriptor:B,dataDescriptorSignature:N,signal:Y,msDosCompatible:y,internalFileAttribute:x,externalFileAttribute:E,useCompressionStream:j});const q=Zf(r),we=qf(r);b=ee(q.localHeaderArray,we.dataDescriptorArray)+_,e.pendingEntriesSize+=b;let W;try{W=await Vf(e,t,n,{headerInfo:q,dataDescriptorInfo:we},r)}finally{e.pendingEntriesSize-=b}return Object.assign(W,{name:t,comment:s,extraField:c}),new xr(W)}async function Vf(e,t,n,r,i){const{files:s,writer:a}=e,{keepOrder:l,dataDescriptor:o,signal:f}=i,d=Array.from(s.values()).pop();let u={},p,w,D,h,c,m;s.set(t,u);try{let v;l&&(v=d&&d.lock,_()),i.bufferedWrite||e.lockWriter||!o?(m=new Kt,m.writable.size=0,p=!0,await ze(a)):(m=a,e.lockWriter=Promise.resolve(),w=()=>delete e.lockWriter),await ze(m);const{writable:g,diskNumber:y}=a;let{diskOffset:x}=a;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const E=new Uint8Array(4),k=He(E);Q(k,0,ji),await Nt(g,E),e.offset+=4}if(p||await v,c=!0,u.diskNumberStart=y,u=await Gf(n,m,u,r,e.config,i),c=!1,s.set(t,u),u.filename=t,p){await m.writable.close();let E=await m.getData();await v,await b(),h=!0,o||(E=await $f(u,E,g,i)),u.diskNumberStart=a.diskNumber,x=a.diskOffset,await E.stream().pipeTo(g,{preventClose:!0,signal:f}),g.size+=E.size,h=!1}if(u.offset=e.offset-x,u.zip64)Kf(u);else if(u.offset>=pe)throw new Error(ts);return e.offset+=u.length,u}catch(v){throw(p&&h||!p&&c)&&(e.hasCorruptedEntries=!0,v&&(v.corruptedEntry=!0),p?e.offset+=m.writable.size:e.offset=m.writable.size),s.delete(t),v}finally{D&&D(),w&&w()}function _(){u.lock=new Promise(v=>D=v)}async function b(){const{lockWriter:v}=e;if(v)return await v.then(()=>delete e.lockWriter),b();e.lockWriter=new Promise(g=>w=g)}}async function Gf(e,t,{diskNumberStart:n,lock:r},i,s,a){const{headerInfo:l,dataDescriptorInfo:o}=i,{localHeaderArray:f,headerArray:d,lastModDate:u,rawLastModDate:p,encrypted:w,compressed:D,version:h,compressionMethod:c,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b}=l,{dataDescriptorArray:v}=o,{rawFilename:g,lastAccessDate:y,creationDate:x,password:E,level:k,zip64:S,zipCrypto:A,dataDescriptor:U,directory:F,versionMadeBy:B,rawComment:N,rawExtraField:Y,useWebWorkers:j,onstart:q,onprogress:we,onend:W,signal:he,encryptionStrength:V,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,useCompressionStream:Ht}=a,Dt={lock:r,versionMadeBy:B,zip64:S,directory:Boolean(F),filenameUTF8:!0,rawFilename:g,commentUTF8:!0,rawComment:N,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b,rawExtraField:Y,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,diskNumberStart:n};let mt=0,jt=0,wn;const{writable:Ve}=t;if(e){e.chunkSize=no(s),await Nt(Ve,f);const gn=e.readable,Ee=gn.size=e.size,Ue={options:{codecType:So,level:k,password:E,encryptionStrength:V,zipCrypto:w&&A,passwordVerification:w&&A&&p>>8&255,signed:!0,compressed:D,encrypted:w,useWebWorkers:j,useCompressionStream:Ht,transferStreams:!1},config:s,streamOptions:{signal:he,size:Ee,onstart:q,onprogress:we,onend:W}},Jt=await Do({readable:gn,writable:Ve},Ue);Ve.size+=Jt.size,wn=Jt.signature,jt=e.size=gn.size,mt=Jt.size}else await Nt(Ve,f);const Tt=S?new Uint8Array(Xo+4):new Uint8Array;return e&&zf({signature:wn,rawExtraFieldZip64:Tt,compressedSize:mt,uncompressedSize:jt,headerInfo:l,dataDescriptorInfo:o},a),U&&await Nt(Ve,v),Object.assign(Dt,{compressedSize:mt,lastModDate:u,rawLastModDate:p,creationDate:x,lastAccessDate:y,encrypted:w,length:ee(f,v)+mt,compressionMethod:c,version:h,headerArray:d,signature:wn,rawExtraFieldZip64:Tt}),Dt}function Zf(e){const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,password:s,level:a,zip64:l,zipCrypto:o,dataDescriptor:f,directory:d,rawExtraField:u,encryptionStrength:p,extendedTimestamp:w}=e,D=a!==0&&!d,h=Boolean(s&&ee(s));let c;if(h&&!o){c=new Uint8Array(ee(Ra)+2);const N=He(c);re(N,0,Xa),ve(c,Ra,2),yr(N,8,p)}else c=new Uint8Array;let m,_;if(w){_=new Uint8Array(9+(r?4:0)+(i?4:0));const N=He(_);re(N,0,Bi),re(N,2,ee(_)-4);const Y=1+(r?2:0)+(i?4:0);yr(N,4,Y),Q(N,5,Math.floor(n.getTime()/1e3)),r&&Q(N,9,Math.floor(r.getTime()/1e3)),i&&Q(N,13,Math.floor(i.getTime()/1e3));try{m=new Uint8Array(36);const j=He(m),q=li(n);re(j,0,Ja),re(j,2,32),re(j,8,Qa),re(j,10,24),Pe(j,12,q),Pe(j,20,li(r)||q),Pe(j,28,li(i)||q)}catch{m=new Uint8Array}}else m=_=new Uint8Array;let b=vi;f&&(b=b|bi);let v=Ga;D&&(v=wi);let g=e.version||ld;l&&(g=g>sa?g:sa),h&&(b=b|yi,o||(g=g>aa?g:aa,v=Za,D&&(c[9]=wi)));const y=new Uint8Array(26),x=He(y);re(x,0,g),re(x,2,b),re(x,4,v);const E=new Uint32Array(1),k=He(E);let S;noa?S=oa:S=n,re(k,0,(S.getHours()<<6|S.getMinutes())<<5|S.getSeconds()/2),re(k,2,(S.getFullYear()-1980<<4|S.getMonth()+1)<<5|S.getDate());const A=E[0];Q(x,6,A),re(x,22,ee(t));const U=ee(c,_,m,u);re(x,24,U);const F=new Uint8Array(30+ee(t)+U),B=He(F);return Q(B,0,qa),ve(F,y,4),ve(F,t,30),ve(F,c,30+ee(t)),ve(F,_,30+ee(t,c)),ve(F,m,30+ee(t,c,_)),ve(F,u,30+ee(t,c,_,m)),{localHeaderArray:F,headerArray:y,headerView:x,lastModDate:n,rawLastModDate:A,encrypted:h,compressed:D,version:g,compressionMethod:v,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:m,rawExtraFieldAES:c}}function qf(e){const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i=new Uint8Array,s,a=0;return n&&(i=new Uint8Array(t?r?24:20:r?16:12),s=He(i),r&&(a=4,Q(s,0,rd))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}}function zf(e,t){const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:s,headerInfo:a,dataDescriptorInfo:l}=e,{headerView:o,encrypted:f}=a,{dataDescriptorView:d,dataDescriptorOffset:u}=l,{zip64:p,zipCrypto:w,dataDescriptor:D}=t;if((!f||w)&&n!==fe&&(Q(o,10,n),D&&Q(d,u,n)),p){const h=He(r);re(h,0,Ka),re(h,2,Xo),Q(o,14,pe),Pe(h,12,BigInt(i)),Q(o,18,pe),Pe(h,4,BigInt(s)),D&&(Pe(d,u+4,BigInt(i)),Pe(d,u+12,BigInt(s)))}else Q(o,14,i),Q(o,18,s),D&&(Q(d,u+4,i),Q(d,u+8,s))}async function $f(e,t,n,{zipCrypto:r}){const i=await Jf(t,0,26),s=new DataView(i);return(!e.encrypted||r)&&Q(s,14,e.signature),e.zip64?(Q(s,18,pe),Q(s,22,pe)):(Q(s,18,e.compressedSize),Q(s,22,e.uncompressedSize)),await Nt(n,new Uint8Array(i)),t.slice(i.byteLength)}function Kf(e){const{rawExtraFieldZip64:t,offset:n,diskNumberStart:r}=e,i=He(t);Pe(i,20,BigInt(n)),Q(i,28,r)}async function Xf(e,t,n){const{files:r,writer:i}=e;let s=0,a=0;const{diskOffset:l,writable:o}=i;let{diskNumber:f}=i,d=e.offset-l,u=r.size;for(const[,{rawFilename:v,rawExtraFieldZip64:g,rawExtraFieldAES:y,rawExtraField:x,rawComment:E,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:S}]of r)a+=46+ee(v,E,g,y,k,S,x);let p=n.zip64||e.options.zip64||!1;if(d>=pe||a>=pe||u>=ke){if(n.zip64===!1||e.options.zip64===!1)throw new Error(ts);p=!0}const w=new Uint8Array(a),D=He(w);for(const[v,g]of Array.from(r.values()).entries()){const{offset:y,rawFilename:x,rawExtraFieldZip64:E,rawExtraFieldAES:k,rawExtraFieldNTFS:S,rawExtraField:A,rawComment:U,versionMadeBy:F,headerArray:B,directory:N,zip64:Y,msDosCompatible:j,internalFileAttribute:q,externalFileAttribute:we,extendedTimestamp:W,lastModDate:he,diskNumberStart:V}=g;let Z;if(W){Z=new Uint8Array(9);const ue=He(Z);re(ue,0,Bi),re(ue,2,ee(Z)-4),yr(ue,4,1),Q(ue,5,Math.floor(he.getTime()/1e3))}else Z=new Uint8Array;const Se=ee(E,k,Z,S,A);if(Q(D,s,gi),re(D,s+4,F),ve(w,B,s+6),re(D,s+30,Se),re(D,s+32,ee(U)),re(D,s+34,Y?ke:V),re(D,s+36,q),we?Q(D,s+38,we):N&&j&&yr(D,s+38,ki),Q(D,s+42,Y?pe:y),ve(w,x,s+46),ve(w,E,s+46+ee(x)),ve(w,k,s+46+ee(x,E)),ve(w,Z,s+46+ee(x,E,k)),ve(w,S,s+46+ee(x,E,k,Z)),ve(w,A,s+46+ee(x,E,k,Z,S)),ve(w,U,s+46+ee(x)+Se),s+=46+ee(x,U)+Se,n.onprogress)try{await n.onprogress(v+1,r.size,new xr(g))}catch{}}await ze(i),await Nt(o,w);const h=new Uint8Array(p?id:an),c=He(h);let m=i.diskNumber;const{availableSize:_}=i;_n&&(t+=n.length)),t}class Jo{constructor(t,n,r,i){const s=this;if(t.root&&i&&i.getChildByName(n))throw new Error("Entry filename already exists");r||(r={}),Object.assign(s,{fs:t,name:n,data:r.data,id:t.entries.length,parent:i,children:[],uncompressedSize:0}),t.entries.push(s),i&&s.parent.children.push(s)}moveTo(t){const n=this;n.fs.move(n,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){const n=this;let r=n.name,i=n.parent;for(;i&&i!=t;)r=(i.name?i.name+"/":"")+r,i=i.parent;return r}isDescendantOf(t){let n=this.parent;for(;n&&n.id!=t.id;)n=n.parent;return Boolean(n)}}class Qo extends Jo{constructor(t,n,r,i){super(t,n,r,i);const s=this;s.Reader=r.Reader,s.Writer=r.Writer,r.getData&&(s.getData=r.getData)}async getData(t,n={}){const r=this;if(!t||t.constructor==r.Writer&&r.data)return r.data;{const i=r.reader=new r.Reader(r.data,n);await Promise.all([ze(i),ze(t,r.data.uncompressedSize)]);const s=i.readable;return s.size=r.uncompressedSize=i.size,await s.pipeTo(t.writable),t.getData?t.getData():t.writable}}getText(t,n){return this.getData(new Ti(t),n)}getBlob(t,n){return this.getData(new Kt(t),n)}getData64URI(t,n){return this.getData(new wr(t),n)}getUint8Array(t){return this.getData(new gr,t)}getWritable(t=new WritableStream,n){return this.getData({writable:t},n)}replaceBlob(t){Object.assign(this,{data:t,Reader:mn,Writer:Kt,reader:null})}replaceText(t){Object.assign(this,{data:t,Reader:Ro,Writer:Ti,reader:null})}replaceData64URI(t){Object.assign(this,{data:t,Reader:Di,Writer:wr,reader:null})}replaceUint8Array(t){Object.assign(this,{data:t,Reader:Ri,Writer:gr,reader:null})}replaceReadable(t){Object.assign(this,{data:null,Reader:function(){return{readable:t}},Writer:null,reader:null})}}class Hn extends Jo{constructor(t,n,r,i){super(t,n,r,i),this.directory=!0}addDirectory(t){return pt(this,t,null,!0)}addText(t,n){return pt(this,t,{data:n,Reader:Ro,Writer:Ti})}addBlob(t,n){return pt(this,t,{data:n,Reader:mn,Writer:Kt})}addData64URI(t,n){return pt(this,t,{data:n,Reader:Di,Writer:wr})}addUint8Array(t,n){return pt(this,t,{data:n,Reader:Ri,Writer:gr})}addHttpContent(t,n,r={}){return pt(this,t,{data:n,Reader:class extends va{constructor(i){super(i,r)}}})}addReadable(t,n){return pt(this,t,{Reader:function(){return{readable:n}}})}addFileSystemEntry(t){return su(this,t)}addData(t,n){return pt(this,t,n)}async importBlob(t,n={}){await this.importZip(new mn(t),n)}async importData64URI(t,n={}){await this.importZip(new Di(t),n)}async importUint8Array(t,n={}){await this.importZip(new Ri(t),n)}async importHttpContent(t,n={}){await this.importZip(new va(t,n),n)}async importReadable(t,n={}){await this.importZip({readable:t},n)}exportBlob(t={}){return this.exportZip(new Kt("application/zip"),t)}exportData64URI(t={}){return this.exportZip(new wr("application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new gr,t)}async exportWritable(t=new WritableStream,n={}){return await this.exportZip({writable:t},n),t}async importZip(t,n){await ze(t),(await new Df(t,n).getEntries()).forEach(s=>{let a=this;const l=s.filename.split("/"),o=l.pop();l.forEach(f=>a=a.getChildByName(f)||new Hn(this.fs,f,null,a)),s.directory||pt(a,o,{data:s,Reader:ru(Object.assign({},n))})})}async exportZip(t,n){const r=this;await Promise.all([el(r),ze(t)]);const i=new jf(t,n);return await iu(i,r,nu([r],"uncompressedSize"),n),await i.close(),t.getData?t.getData():t.writable}getChildByName(t){const n=this.children;for(let r=0;r{n.id==e.id&&t.splice(r,1)})}async function iu(e,t,n,r){const i=t,s=new Map;await a(e,t);async function a(l,o){await f();async function f(){if(r.bufferedWrite)await Promise.all(o.children.map(d));else for(const u of o.children)await d(u)}async function d(u){const p=r.relativePath?u.getRelativeName(i):u.getFullname();await l.add(p,u.reader,Object.assign({directory:u.directory},Object.assign({},r,{onprogress:async w=>{if(r.onprogress){s.set(p,w);try{await r.onprogress(Array.from(s.values()).reduce((D,h)=>D+h),n)}catch{}}}}))),await a(l,u)}}}async function su(e,t){if(t.isDirectory){const i=e.addDirectory(t.name);return await n(i,t),i}else return new Promise((i,s)=>t.file(a=>i(e.addBlob(t.name,a)),s));async function n(i,s){const a=await r(s);for(const l of a)l.isDirectory?await n(i.addDirectory(l.name),l):await new Promise((o,f)=>{l.file(d=>{const u=i.addBlob(l.name,d);u.uncompressedSize=d.size,o(u)},f)})}function r(i){return new Promise((s,a)=>{let l=[];i.isDirectory&&o(i.createReader()),i.isFile&&s(l);function o(f){f.readEntries(d=>{d.length?(l=l.concat(d),o(f)):s(l)},a)}})}}function tn(e){e.entries=[],e.root=new Hn(e)}function pt(e,t,n,r){if(e.directory)return r?new Hn(e.fs,t,n,e):new Qo(e.fs,t,n,e);throw new Error("Parent entry is not a directory")}let tl;try{tl=import.meta.url}catch{}Gi({baseURL:tl});Kd(Gi);Gi({Deflate:Cc,Inflate:nd});function Ir(e){return e.slice(e.lastIndexOf(Fr)+1)}const Fr="/";async function au(e,t,n){const r=e.vaultPath+"/.obsidian/"+t+".json";let i;return e.adapter.exists(r)&&(i=JSON.parse(await e.adapter.readFile(r))),n(i)}class ou{constructor(t){Bt(this,"zipFS");Bt(this,"chunks",[]);Bt(this,"chunkIndex",0);this.zipBlob=t}async initReadingVault(){this.zipFS=new tu.FS,await this.zipFS.importBlob(this.zipBlob)}readDirectory(t){return this.zipFS.find(t).children.map(r=>({isDirectory:()=>!!r.directory,getName:()=>r.getFullname()}))}readFile(t){return this.zipFS.find(t).getText("utf-8")}exists(t){return!!this.zipFS.find(t)}resolve(t){return t}resolveInDir(t,n){return t+Fr+n}removeFile(t){}renameFile(t,n){}flushResultsFromInitialProcessing(t){}appendToResultFile(t,n){this.chunks.push(n)}appendToPostProcessingFile(t,n){this.chunks[this.chunkIndex]=n,this.chunkIndex++}initPostProcessingResultFile(t){}chunkIter(){const t=this.chunks;let n=0;return{[Symbol.asyncIterator](){return{async next(){if(n{if(s.forEach((l,o)=>s[o]+=a),r==="seenOne"&&a!=="["&&(r="normal"),r==="seenOneOut"&&a!=="]"&&(r="normal"),a==="["&&(i+=1,r==="seenOne"?(s.push(""),r="normal"):r==="normal"&&(r="seenOne")),a==="]"&&i>0){if(i-=1,r==="seenOneOut"){const l=s.pop();l&&(!t||s.length===0)&&n.push(l.slice(0,-2)),r="normal"}else r==="normal"&&(r="seenOneOut");i===0&&(r="normal")}}),n}function du(e){return Ir(e)!==e}class ci{constructor(){Bt(this,"nameWasCalledAsFile",[]);Bt(this,"pathMap",new Map);Bt(this,"nameMap",new Map)}accessAsFile(t,n,r){const i=this.pathMap.get(n);if(i)return this.nameMap.get(t)||this.nameMap.set(t,i),i;const s=this.nameMap.get(t);if(s&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,s),this.nameWasCalledAsFile.push(t),s;const a=r();return this.pathMap.set(n,a),this.nameMap.get(t)||this.nameMap.set(t,a),this.nameWasCalledAsFile.push(t),a}accessAsLink(t,n){const r=this.findData(t);if(r)return r;const i=du(t),s=n();return i?this.pathMap.set(t,s):this.nameMap.set(t,s),s}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Lr(e){e.totalNodes++,e.leafNodes++}function nl(e){e.leafNodes--,e.topLevelNodes++}function fu(e,t,n=lu,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new ci,headingTracker:new ci,dummyHeadingLinkTracker:new Map,blockLinkTracker:new ci,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function Wt(e){return Lr(e.summary),e.idGenerator()}function uu(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map);let s=i.get(r);return s||(s={uid:Wt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function hu(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map);let a=s.get(i);return a||(a={uid:Wt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function mu(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function pu(e){let t;return[e.split(` -`).map(r=>{const i=r.split(" "),s=i[i.length-1];if(s.startsWith("^"))return t=s,i.slice(0,-1).join(" ")}).join(` -`),t]}function rl(e,t,n,r,i,s){const a=[t],l=[e];for(const o of n){const f=i(o);_u(f,o,a,l,r),s==null||s(f,o)}}function _u(e,t,n,r,i){var l;wu(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(l=a.children)!=null?l:[],a.children.push(e)),n.push(t),r.push(e)}function wu(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function il(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=il(n.children,r);if(i)return i}}return null}function gu(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function xu(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const l=t.findData(s);if(l){const o={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};rl(f,o,l,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=il(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function yu(e,t){const[n,r]=xu(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Lr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let l=a;s.forEach(o=>{l=l.replace(o.old,o.new)}),await t.adapter.appendToPostProcessingFile(i,l)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var sl=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(sl||{});function bu(e,t){const n=vu(e.name,t);if(n.length>0){const r=new Set;e.refs||(e.refs=[]);for(const[i,s,a]of n)r.add(s),e.name=e.name.replaceAll("[["+i+"]]",a);e.refs.push(...Array.from(r.values()))}}function vu(e,t){return cu(e,!0).map(n=>[n,n.split("|").map(r=>r.trim())]).filter(n=>n[1][0]!=="").map(n=>{const r=n[1],i=r[0],s=r[1],a=Eu(i,t),l=s!==void 0&&s.trim()!==""?"["+s.trim()+"]([["+a+"]])":"[["+a+"]]";return[n[0],a,l]})}function ku(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function Su(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function Eu(e,t){const n=ku(e);switch(Su(n)){case 0:return Du(n[0],t);case 2:return uu(n,t);case 1:return gu(n,t);default:throw"Invalid link type detected: "+n}}function Du(e,t){return t.defaultLinkTracker.accessAsLink(e,()=>(Lr(t.summary),{uid:t.idGenerator(),obsidianLink:e,type:1})).uid}function al(e,t,n,r){const[i,s]=pu(n);return s?[hu([e,s],t,r),i]:[Wt(r),n]}function Tu(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,()=>(Lr(n.summary),{uid:n.idGenerator(),obsidianLink:r,type:0}));return i.type=0,i.uid}function Au(e){const t=[];for(const n of e.getData())n.type===sl.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function Ou(e){return[...e.invalidLinks,...Au(e.defaultLinkTracker),...mu(e.blockLinkTracker)]}function Ru(e,t,n){const r=Ou(n).sort((a,l)=>a.link.localeCompare(l.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:Wt(n),name:i,createdAt:t,editedAt:t,type:"node"};return nl(n.summary),s.children=r,s}function ns(e){return e===" "||e===" "}function jn(e,t){let n=0;for(;ns(e[t+n]);)n++;return n}function Mu(e,t){let n=t,r=e[t];for(;ns(r);)n--,r=e[n];return n+1}function Ut(e,t){let n=0;for(;!rs(e[t+n]);)n++;return t+n}function ol(e,t){const n=e[t-1];return rs(n)}function rs(e){return e===void 0||e===` -`}function ll(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function is(e,t){let n=!0;const r=t+jn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ll(e,r));const a=Mu(e,r-1)-1,l=e[a];return rs(l)&&n?{type:dt.BULLET,level:r-a-1}:null}function Iu(e,t,n){let r=t+n.level;if(ll(e,r))return r;r+=1+1;const i=jn(e,r);return r+i}function Fu(e,t,n){let r=Ut(e,t+n.level+1+1),i=e[r];for(;;){const s=jn(e,r+1);if(s==n.level+2&&!is(e,r+1+s))r=Ut(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Lu(e,t){return e+t.level}function Cu(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=jn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function cl(e,t){if(!ol(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=Ut(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],l=e[i+2];for(;[s,a,l].every(d=>d!==void 0)&&[s,a,l].join("")!=="```";)i++,s=e[i],a=e[i+1],l=e[i+2];if([s,a,l].some(d=>d===void 0))return null;const o=Ut(e,i+3);return e.slice(i+3,o).trim()!==""?null:{type:dt.CODEBLOCK,level:o-t+(e[o]===` -`?1:0),codeLanguage:r!==""?r:void 0}}return null}function Nu(e,t){return Ut(e,t)}function dl(e,t){const n=Ut(e,t),r=e.slice(t,n);return fl(r)?{type:dt.DATAVIEWATTRIBUTE,level:0}:null}function fl(e){const t=e.split("::");return t.length===2&&t[0].trim()===t[0]&&t[0]!==""&&t[1]!==""&&t[1]!==" "&&ns(t[1][0])}function ul(e,t){if(!ol(e,t))return null;const n=Pu(e,t);return n>0&&e[t+n]===" "?{type:dt.HEADING,level:n}:null}function Pu(e,t){let n=t,r=0;for(;e[n]==="#";)n++,r++;return r}function Uu(e,t,n){const r=t+n.level+1,i=jn(e,r);return r+i}function Yu(e,t,n){return Ut(e,t+n.level+1)}function Wu(e,t){let n=Ut(e,t),r=e[n],i=r;for(n++,r=e[n];;){if(r===void 0)return[n];if(r===` -`&&i===` -`)return[n-1];{const s=Hu(e,n);if(s)return[n-1,s]}i=r,n++,r=e[n]}}function Hu(e,t){let n=ul(e,t);return n||(n=dl(e,t),n)||(n=is(e,t),n)||(n=cl(e,t),n)?n:null}var dt=(e=>(e.ROOT="Root",e.HEADING="Heading",e.BULLET="Bullet Node",e.PARAGRAPH="Paragraph",e.CODEBLOCK="Code Block",e.DATAVIEWATTRIBUTE="Data View Attribute",e))(dt||{});function ju(e,t=0){const n=[];for(let r=t;rKu(i,t,n,r))))}function Ku(e,t,n,r){let i=e;r&&(i=$u(e));let s=t.get(i);return s===void 0&&(s=n(),t.set(i,s)),s}function Xu(e){return Array.from(e.entries()).map(t=>({name:t[0],uid:t[1]}))}function Ju(e){if(e.startsWith("[ ] "))return"todo";if(e.startsWith("[x] ")||e.startsWith("[X] "))return"done"}function Qu(e,t){if(t===dt.BULLET){const n=Ju(e);if(n)return[e.slice(4),n]}return null}function e0(e){const t=[];let n=Fi(e,0);for(;n!==null;){let r;Array.isArray(n)?(t.push(n),r=n[2]):r=n,n=Fi(e,r)}return t}function Fi(e,t){let n,r="",i="";for(let s=t;s{const f=o[0],d=o[1];if(i.every(u=>f.trim()!==u.name||d.trim()!==u.mediaUrl)){const u=o[3],p=Wt(n);s.add(p),e.name=e.name.replaceAll(u,"[["+p+"]]"),i.push({uid:p,name:f.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:d.trim()})}}),s.size>0&&(e.refs=[...(a=e.refs)!=null?a:[],...Array.from(s.values())]),e.children=[...(l=e.children)!=null?l:[],...i]}function pl(e,t,n,r,i,s){var u;const[a,l]=(u=Qu(r.name,s))!=null?u:[r.name,void 0];r.name=a,r.todoState=l;const[o,f]=al(e,t,r.name,i);r.uid=o,r.name=f,r.name=r.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=zu(r.name);if(d){const p=d[d.length-1];r.name.endsWith(p)&&(r.name=r.name.slice(0,-p.length)),r.supertags=hl(d,i.superTagTracker,i.idGenerator,!0)}return bu(r,i),n0(r,n,i),r}function _l(e,t,n,r,i,s,a,l){let o=l;return r&&r.length>0&&(o=l!=null?l:[],o==null||o.push(...r.map(f=>pl(e,t,i,{name:f,type:"node",createdAt:i,editedAt:i},s)))),i0(n,s.attributes),s.summary.fields++,{uid:a!=null?a:Wt(s),name:n,type:"field",createdAt:i,editedAt:i,children:o}}function r0(e,t,n,r,i){return _l(e,t,n.key,n.values,r,i)}function i0(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function s0(e,t,n){return{uid:Wt(n),name:Cu(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function a0(e,t,n,r,i){if(n.type===dt.DATAVIEWATTRIBUTE||fl(n.content)){const[s,a]=al(e,t,n.content,i),l=a.split("::");return _l(e,t,l[0],[l[1].trim()],r,i,s)}}function o0(e,t,n,r,i){if(n.type===dt.CODEBLOCK)return s0(n,r,i);const s=a0(e,t,n,r,i);return s||pl(e,t,r,{name:n.content,createdAt:r,editedAt:r,type:"node"},i,n.type)}function l0(e){if(e.startsWith(`--- -`)){const t=e.indexOf(` ---- -`);if(t!==-1)return[c0(e.slice(4,t)),t+5]}return null}function c0(e){const t=e.split(` -`).map(r=>r.trim()).filter(r=>r!==""),n=[];for(let r=0;ra.trim()).filter(a=>a!=="");if(!(s[0]==="publish"||s[0]==="cssclass"||s[0]==="aliases"))if(s.length===2)if(s[1].startsWith("[")&&s[1].endsWith("]")){const a=s[1].slice(1,-1).split(",").map(l=>l.trim()).filter(l=>l!=="");n.push({key:s[0],values:a})}else n.push({key:s[0],values:[s[1]]});else{const a={key:s[0],values:[]};let l=1,o=t[r+l];for(;o!==void 0&&o.startsWith("- ");)a.values.push(o.slice(2)),l++,o=t[r+l];r+=l-1,n.push(a)}}return n}//! moment.js +var gc=Object.defineProperty;var xc=(e,t,n)=>t in e?gc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Bt=(e,t,n)=>(xc(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const In=15,mi=30,pi=19,yc=29,ur=256,ji=ur+1+yc,Fs=2*ji+1,yn=256,bc=7,Ls=16,Cs=17,Ns=18,$r=8*2,hr=-1,vc=1,qn=2,kc=0,rn=0,Ps=1,Sc=3,Le=4,Qe=0,Ha=1,zn=2,et=-2,Ec=-3,Qt=-5;function Tr(e){return Ar(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function Ar(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?Ar(n):n),[])}const Us=[0,1,2,3].concat(...Tr([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function se(){const e=this;function t(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,l=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,f=e.stat_desc.max_length;let d,u,p,w,D,h,c=0;for(w=0;w<=In;w++)i.bl_count[w]=0;for(s[i.heap[i.heap_max]*2+1]=0,d=i.heap_max+1;df&&(w=f,c++),s[u*2+1]=w,!(u>e.max_code)&&(i.bl_count[w]++,D=0,u>=o&&(D=l[u-o]),h=s[u*2],i.opt_len+=h*(w+D),a&&(i.static_len+=h*(a[u*2+1]+D)));if(c!==0){do{for(w=f-1;i.bl_count[w]===0;)w--;i.bl_count[w]--,i.bl_count[w+1]+=2,i.bl_count[f]--,c-=2}while(c>0);for(w=f;w!==0;w--)for(u=i.bl_count[w];u!==0;)p=i.heap[--d],!(p>e.max_code)&&(s[p*2+1]!=w&&(i.opt_len+=(w-s[p*2+1])*s[p*2],s[p*2+1]=w),u--)}}function n(i,s){let a=0;do a|=i&1,i>>>=1,a<<=1;while(--s>0);return a>>>1}function r(i,s,a){const l=[];let o=0,f,d,u;for(f=1;f<=In;f++)l[f]=o=o+a[f-1]<<1;for(d=0;d<=s;d++)u=i[d*2+1],u!==0&&(i[d*2]=n(l[u]++,u))}e.build_tree=function(i){const s=e.dyn_tree,a=e.stat_desc.static_tree,l=e.stat_desc.elems;let o,f,d=-1,u;for(i.heap_len=0,i.heap_max=Fs,o=0;o=1;o--)i.pqdownheap(s,o);u=l;do o=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(s,1),f=i.heap[1],i.heap[--i.heap_max]=o,i.heap[--i.heap_max]=f,s[u*2]=s[o*2]+s[f*2],i.depth[u]=Math.max(i.depth[o],i.depth[f])+1,s[o*2+1]=s[f*2+1]=u,i.heap[1]=u++,i.pqdownheap(s,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],t(i),r(s,e.max_code,i.bl_count)}}se._length_code=[0,1,2,3,4,5,6,7].concat(...Tr([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));se.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];se.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];se.d_code=function(e){return e<256?Us[e]:Us[256+(e>>>7)]};se.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];se.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];se.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];se.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function De(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}const Dc=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],Tc=Tr([[144,8],[112,9],[24,7],[8,8]]);De.static_ltree=Ar(Dc.map((e,t)=>[e,Tc[t]]));const Ac=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],Oc=Tr([[30,5]]);De.static_dtree=Ar(Ac.map((e,t)=>[e,Oc[t]]));De.static_l_desc=new De(De.static_ltree,se.extra_lbits,ur+1,ji,In);De.static_d_desc=new De(De.static_dtree,se.extra_dbits,0,mi,In);De.static_bl_desc=new De(null,se.extra_blbits,0,pi,bc);const Rc=9,Mc=8;function at(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const ja=0,sr=1,qt=2,Je=[new at(0,0,0,0,ja),new at(4,4,8,4,sr),new at(4,5,16,8,sr),new at(4,6,32,32,sr),new at(4,4,16,16,qt),new at(8,16,32,32,qt),new at(8,16,128,128,qt),new at(8,32,128,256,qt),new at(32,128,258,1024,qt),new at(32,258,258,4096,qt)],$n=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ge=0,Kn=1,bn=2,Xn=3,Ic=32,Kr=42,Jn=113,vn=666,Xr=8,Fc=0,Jr=1,Lc=2,ce=3,ar=258,Ye=ar+ce+1;function Ys(e,t,n,r){const i=e[t*2],s=e[n*2];return i=3&&j[se.bl_order[T]*2+1]===0;T--);return e.opt_len+=3*(T+1)+5+5+4,T}function Ve(T){e.pending_buf[e.pending++]=T}function Tt(T){Ve(T&255),Ve(T>>>8&255)}function gn(T){Ve(T>>8&255),Ve(T&255&255)}function Ee(T,R){let O;const I=R;ge>$r-I?(O=T,ue|=O<>>$r-ge,ge+=I-$r):(ue|=T<=8&&(Ve(ue&255),ue>>>=8,ge-=8)}function fc(){Ee(Jr<<1,3),Ue(yn,De.static_ltree),Ds(),1+Se+10-ge<9&&(Ee(Jr<<1,3),Ue(yn,De.static_ltree),Ds()),Se=7}function xn(T,R){let O,I,P;if(e.dist_buf[V]=T,e.lc_buf[V]=R&255,V++,T===0?N[R*2]++:(Z++,T--,N[(se._length_code[R]+ur+1)*2]++,Y[se.d_code(T)*2]++),(V&8191)===0&&A>2){for(O=V*8,I=g-m,P=0;P>>=3,Z8?Tt(ue):ge>0&&Ve(ue&255),ue=0,ge=0}function uc(T,R,O){As(),Se=8,O&&(Tt(R),Tt(~R)),e.pending_buf.set(o.subarray(T,T+R),e.pending),e.pending+=R}function Os(T,R,O){Ee((Fc<<1)+(O?1:0),3),uc(T,R,!0)}function hc(T,R,O){let I,P,G=0;A>0?(q.build_tree(e),we.build_tree(e),G=wn(),I=e.opt_len+3+7>>>3,P=e.static_len+3+7>>>3,P<=I&&(I=P)):I=P=R+5,R+4<=I&&T!=-1?Os(T,R,O):P==I?(Ee((Jr<<1)+(O?1:0),3),Ts(De.static_ltree,De.static_dtree)):(Ee((Lc<<1)+(O?1:0),3),dc(q.max_code+1,we.max_code+1,G+1),Ts(N,Y)),Dt(),O&&As()}function At(T){hc(m>=0?m:-1,g-m,T),m=g,t.flush_pending()}function qr(){let T,R,O,I;do{if(I=f-x-g,I===0&&g===0&&x===0)I=s;else if(I==-1)I--;else if(g>=s+s-Ye){o.set(o.subarray(s,s+s),0),y-=s,g-=s,m-=s,T=w,O=T;do R=u[--O]&65535,u[O]=R>=s?R-s:0;while(--T!==0);T=s,O=T;do R=d[--O]&65535,d[O]=R>=s?R-s:0;while(--T!==0);I+=s}if(t.avail_in===0)return;T=t.read_buf(o,g+x,I),x+=T,x>=ce&&(p=o[g]&255,p=(p<r-5&&(R=r-5);;){if(x<=1){if(qr(),x===0&&T==rn)return Ge;if(x===0)break}if(g+=x,x=0,O=m+R,(g===0||g>=O)&&(x=g-O,g=O,At(!1),t.avail_out===0)||g-m>=s-Ye&&(At(!1),t.avail_out===0))return Ge}return At(T==Le),t.avail_out===0?T==Le?bn:Ge:T==Le?Xn:Kn}function Rs(T){let R=k,O=g,I,P,G=E;const K=g>s-Ye?g-(s-Ye):0;let Me=B;const Xe=l,zr=g+ar;let Ms=o[O+G-1],Is=o[O+G];E>=F&&(R>>=2),Me>x&&(Me=x);do if(I=T,!(o[I+G]!=Is||o[I+G-1]!=Ms||o[I]!=o[O]||o[++I]!=o[O+1])){O+=2,I++;do;while(o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&o[++O]==o[++I]&&OG){if(y=T,G=P,P>=Me)break;Ms=o[O+G-1],Is=o[O+G]}}while((T=d[T&Xe]&65535)>K&&--R!==0);return G<=x?G:x}function pc(T){let R=0,O;for(;;){if(x=ce&&(p=(p<=ce)if(O=xn(g-y,_-ce),x-=_,_<=S&&x>=ce){_--;do g++,p=(p<=ce&&(p=(p<4096)&&(_=ce-1)),E>=ce&&_<=E){I=g+x-ce,O=xn(g-1-b,E-ce),x-=E-1,E-=2;do++g<=I&&(p=(p<Rc||I!=Xr||O<9||O>15||R<0||R>9||G<0||G>qn?et:(T.dstate=e,a=O,s=1<9||O<0||O>qn?et:(Je[A].func!=Je[R].func&&T.total_in!==0&&(I=T.deflate(Ps)),A!=R&&(A=R,S=Je[A].max_lazy,F=Je[A].good_length,B=Je[A].nice_length,k=Je[A].max_chain),U=O,I)},e.deflateSetDictionary=function(T,R,O){let I=O,P,G=0;if(!R||n!=Kr)return et;if(Is-Ye&&(I=s-Ye,G=O-I),o.set(R.subarray(G,G+I),0),g=I,m=I,p=o[0]&255,p=(p<Le||R<0)return et;if(!T.next_out||!T.next_in&&T.avail_in!==0||n==vn&&R!=Le)return T.msg=$n[zn-et],et;if(T.avail_out===0)return T.msg=$n[zn-Qt],Qt;if(t=T,G=i,i=R,n==Kr&&(I=Xr+(a-8<<4)<<8,P=(A-1&255)>>1,P>3&&(P=3),I|=P<<6,g!==0&&(I|=Ic),I+=31-I%31,n=Jn,gn(I)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,Qe}else if(t.avail_in===0&&R<=G&&R!=Le)return t.msg=$n[zn-Qt],Qt;if(n==vn&&t.avail_in!==0)return T.msg=$n[zn-Qt],Qt;if(t.avail_in!==0||x!==0||R!=rn&&n!=vn){switch(K=-1,Je[A].func){case ja:K=mc(R);break;case sr:K=pc(R);break;case qt:K=_c(R);break}if((K==bn||K==Xn)&&(n=vn),K==Ge||K==bn)return t.avail_out===0&&(i=-1),Qe;if(K==Kn){if(R==Ps)fc();else if(Os(0,0,!1),R==Sc)for(O=0;On&&(i=n),i===0?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Nc(e){const t=this,n=new Ba,r=Pc(e&&e.chunkSize?e.chunkSize:64*1024),i=rn,s=new Uint8Array(r);let a=e?e.level:hr;typeof a>"u"&&(a=hr),n.deflateInit(a),n.next_out=s,t.append=function(l,o){let f,d,u=0,p=0,w=0;const D=[];if(!!l.length){n.next_in_index=0,n.next_in=l,n.avail_in=l.length;do{if(n.next_out_index=0,n.avail_out=r,f=n.deflate(i),f!=Qe)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?D.push(new Uint8Array(s)):D.push(s.slice(0,n.next_out_index))),w+=n.next_out_index,o&&n.next_in_index>0&&n.next_in_index!=u&&(o(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return D.length>1?(d=new Uint8Array(w),D.forEach(function(h){d.set(h,p),p+=h.length})):d=D[0]||new Uint8Array,d}},t.flush=function(){let l,o,f=0,d=0;const u=[];do{if(n.next_out_index=0,n.avail_out=r,l=n.deflate(Le),l!=Ha&&l!=Qe)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&u.push(s.slice(0,n.next_out_index)),d+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),o=new Uint8Array(d),u.forEach(function(p){o.set(p,f),f+=p.length}),o}}function Pc(e){return e+5*(Math.floor(e/16383)+1)}const Uc=15,J=0,yt=1,Yc=2,Ne=-2,ae=-3,Ws=-4,bt=-5,We=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Va=1440,Wc=0,Hc=4,jc=9,Bc=5,Vc=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Gc=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Zc=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],qc=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],zc=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],$c=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ot=15;function _i(){const e=this;let t,n,r,i,s,a;function l(f,d,u,p,w,D,h,c,m,_,b){let v,g,y,x,E,k,S,A,U,F,B,N,Y,j,q;F=0,E=u;do r[f[d+F]]++,F++,E--;while(E!==0);if(r[0]==u)return h[0]=-1,c[0]=0,J;for(A=c[0],k=1;k<=Ot&&r[k]===0;k++);for(S=k,AE&&(A=E),c[0]=A,j=1<N+A;){if(x++,N+=A,q=y-N,q=q>A?A:q,(g=1<<(k=S-N))>v+1&&(g-=v+1,Y=S,kVa)return ae;s[x]=B=_[0],_[0]+=q,x!==0?(a[x]=E,i[0]=k,i[1]=A,k=E>>>N-A,i[2]=B-s[x-1]-k,m.set(i,(s[x-1]+k)*3)):h[0]=B}for(i[1]=S-N,F>=u?i[0]=128+64:b[F]>>N;k>>=1)E^=k;for(E^=k,U=(1<257?(_==ae?m.msg="oversubscribed distance tree":_==bt?(m.msg="incomplete distance tree",_=ae):_!=Ws&&(m.msg="empty distance tree with lengths",_=ae),_):J)}}_i.inflate_trees_fixed=function(e,t,n,r){return e[0]=jc,t[0]=Bc,n[0]=Vc,r[0]=Gc,J};const Qn=0,Hs=1,js=2,Bs=3,Vs=4,Gs=5,Zs=6,Qr=7,qs=8,er=9;function Kc(){const e=this;let t,n=0,r,i=0,s=0,a=0,l=0,o=0,f=0,d=0,u,p=0,w,D=0;function h(c,m,_,b,v,g,y,x){let E,k,S,A,U,F,B,N,Y,j,q,we,W,he,V,Z;B=x.next_in_index,N=x.avail_in,U=y.bitb,F=y.bitk,Y=y.write,j=Y>=k[Z+1],F-=k[Z+1],y.win[Y++]=k[Z+2],j--;continue}do{if(U>>=k[Z+1],F-=k[Z+1],(A&16)!==0){for(A&=15,W=k[Z+2]+(U&We[A]),U>>=A,F-=A;F<15;)N--,U|=(x.read_byte(B++)&255)<>=k[Z+1],F-=k[Z+1],(A&16)!==0){for(A&=15;F>=A,F-=A,j-=W,Y>=he)V=Y-he,Y-V>0&&2>Y-V?(y.win[Y++]=y.win[V++],y.win[Y++]=y.win[V++],W-=2):(y.win.set(y.win.subarray(V,V+2),Y),Y+=2,V+=2,W-=2);else{V=Y-he;do V+=y.end;while(V<0);if(A=y.end-V,W>A){if(W-=A,Y-V>0&&A>Y-V)do y.win[Y++]=y.win[V++];while(--A!==0);else y.win.set(y.win.subarray(V,V+A),Y),Y+=A,V+=A,A=0;V=0}}if(Y-V>0&&W>Y-V)do y.win[Y++]=y.win[V++];while(--W!==0);else y.win.set(y.win.subarray(V,V+W),Y),Y+=W,V+=W,W=0;break}else if((A&64)===0)E+=k[Z+2],E+=U&We[A],Z=(S+E)*3,A=k[Z];else return x.msg="invalid distance code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae;while(!0);break}if((A&64)===0){if(E+=k[Z+2],E+=U&We[A],Z=(S+E)*3,(A=k[Z])===0){U>>=k[Z+1],F-=k[Z+1],y.win[Y++]=k[Z+2],j--;break}}else return(A&32)!==0?(W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,yt):(x.msg="invalid literal/length code",W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,ae)}while(!0)}while(j>=258&&N>=10);return W=x.avail_in-N,W=F>>3>3:W,N+=W,B-=W,F-=W<<3,y.bitb=U,y.bitk=F,x.avail_in=N,x.total_in+=B-x.next_in_index,x.next_in_index=B,y.write=Y,J}e.init=function(c,m,_,b,v,g){t=Qn,f=c,d=m,u=_,p=b,w=v,D=g,r=null},e.proc=function(c,m,_){let b,v,g,y=0,x=0,E=0,k,S,A,U;for(E=m.next_in_index,k=m.avail_in,y=c.bitb,x=c.bitk,S=c.write,A=S=258&&k>=10&&(c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,_=h(f,d,u,p,w,D,c,m),E=m.next_in_index,k=m.avail_in,y=c.bitb,x=c.bitk,S=c.write,A=S>>=r[v+1],x-=r[v+1],g=r[v],g===0){a=r[v+2],t=Zs;break}if((g&16)!==0){l=g&15,n=r[v+2],t=js;break}if((g&64)===0){s=g,i=v/3+r[v+2];break}if((g&32)!==0){t=Qr;break}return t=er,m.msg="invalid literal/length code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,c.inflate_flush(m,_);case js:for(b=l;x>=b,x-=b,s=d,r=w,i=D,t=Bs;case Bs:for(b=s;x>=r[v+1],x-=r[v+1],g=r[v],(g&16)!==0){l=g&15,o=r[v+2],t=Vs;break}if((g&64)===0){s=g,i=v/3+r[v+2];break}return t=er,m.msg="invalid distance code",_=ae,c.bitb=y,c.bitk=x,m.avail_in=k,m.total_in+=E-m.next_in_index,m.next_in_index=E,c.write=S,c.inflate_flush(m,_);case Vs:for(b=l;x>=b,x-=b,t=Gs;case Gs:for(U=S-o;U<0;)U+=c.end;for(;n!==0;){if(A===0&&(S==c.end&&c.read!==0&&(S=0,A=S7&&(x-=8,k++,E--),c.write=S,_=c.inflate_flush(m,_),S=c.write,A=Sh.avail_out&&(m=h.avail_out),m!==0&&c==bt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m,b==n.end&&(b=0,n.write==n.end&&(n.write=0),m=n.write-b,m>h.avail_out&&(m=h.avail_out),m!==0&&c==bt&&(c=J),h.avail_out-=m,h.total_out+=m,h.next_out.set(n.win.subarray(b,b+m),_),_+=m,b+=m),h.next_out_index=_,n.read=b,c},n.proc=function(h,c){let m,_,b,v,g,y,x,E;for(v=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y>>1){case 0:_>>>=3,b-=3,m=b&7,_>>>=m,b-=m,r=ei;break;case 1:k=[],S=[],A=[[]],U=[[]],_i.inflate_trees_fixed(k,S,A,U),d.init(k[0],S[0],A[0],0,U[0],0),_>>>=3,b-=3,r=tr;break;case 2:_>>>=3,b-=3,r=Ks;break;case 3:return _>>>=3,b-=3,r=Vt,h.msg="invalid block type",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c)}break;case ei:for(;b<32;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(v++)&255)<>>16&65535)!=(_&65535))return r=Vt,h.msg="invalid stored block lengths",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);i=_&65535,_=b=0,r=i!==0?$s:u!==0?nr:en;break;case $s:if(g===0||x===0&&(y==n.end&&n.read!==0&&(y=0,x=yg&&(m=g),m>x&&(m=x),n.win.set(h.read_buf(v,m),y),v+=m,g-=m,y+=m,x-=m,(i-=m)!==0)break;r=u!==0?nr:en;break;case Ks:for(;b<14;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(v++)&255)<29||(m>>5&31)>29)return r=Vt,h.msg="too many length or distance symbols",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);if(m=258+(m&31)+(m>>5&31),!l||l.length>>=14,b-=14,a=0,r=Xs;case Xs:for(;a<4+(s>>>10);){for(;b<3;){if(g!==0)c=J;else return n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);g--,_|=(h.read_byte(v++)&255)<>>=3,b-=3}for(;a<19;)l[zs[a++]]=0;if(o[0]=7,m=D.inflate_trees_bits(l,o,f,p,h),m!=J)return c=m,c==ae&&(l=null,r=Vt),n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);a=0,r=Js;case Js:for(;m=s,!(a>=258+(m&31)+(m>>5&31));){let j,q;for(m=o[0];b>>=m,b-=m,l[a++]=q;else{for(E=q==18?7:q-14,j=q==18?11:3;b>>=m,b-=m,j+=_&We[E],_>>>=E,b-=E,E=a,m=s,E+j>258+(m&31)+(m>>5&31)||q==16&&E<1)return l=null,r=Vt,h.msg="invalid bit length repeat",c=ae,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);q=q==16?l[E-1]:0;do l[E++]=q;while(--j!==0);a=E}}if(f[0]=-1,F=[],B=[],N=[],Y=[],F[0]=9,B[0]=6,m=s,m=D.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),l,F,B,N,Y,p,h),m!=J)return m==ae&&(l=null,r=Vt),c=m,n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,n.inflate_flush(h,c);d.init(F[0],B[0],p,N[0],p,Y[0]),r=tr;case tr:if(n.bitb=_,n.bitk=b,h.avail_in=g,h.total_in+=v-h.next_in_index,h.next_in_index=v,n.write=y,(c=d.proc(n,h,c))!=yt)return n.inflate_flush(h,c);if(c=J,d.free(h),v=h.next_in_index,g=h.avail_in,_=n.bitb,b=n.bitk,y=n.write,x=y15?(e.inflateEnd(n),Ne):(e.wbits=r,n.istate.blocks=new Xc(n,1<>4)+8>a.wbits){a.mode=Rt,n.msg="invalid win size",a.marker=5;break}a.mode=ea;case ea:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,s=n.read_byte(n.next_in_index++)&255,((a.method<<8)+s)%31!==0){a.mode=Rt,n.msg="incorrect header check",a.marker=5;break}if((s&Jc)===0){a.mode=kn;break}a.mode=ta;case ta:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,a.mode=na;case na:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,a.mode=ra;case ra:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,a.mode=ia;case ia:return n.avail_in===0?i:(i=r,n.avail_in--,n.total_in++,a.need+=n.read_byte(n.next_in_index++)&255,a.mode=ti,Yc);case ti:return a.mode=Rt,n.msg="need dictionary",a.marker=0,Ne;case kn:if(i=a.blocks.proc(n,i),i==ae){a.mode=Rt,a.marker=0;break}if(i==J&&(i=r),i!=yt)return i;i=r,a.blocks.reset(n,a.was),a.mode=sa;case sa:return n.avail_in=0,yt;case Rt:return ae;default:return Ne}},e.inflateSetDictionary=function(n,r,i){let s=0,a=i;if(!n||!n.istate||n.istate.mode!=ti)return Ne;const l=n.istate;return a>=1<0&&n.next_in_index!=p&&(o(n.next_in_index),p=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return f.length>1?(u=new Uint8Array(D),f.forEach(function(h){u.set(h,w),w+=h.length})):u=f[0]||new Uint8Array,u}},t.flush=function(){n.inflateEnd()}}const pe=4294967295,ke=65535,wi=8,Za=0,qa=99,za=67324752,Bi=134695760,id=Bi,gi=33639248,$a=101010256,xi=101075792,Ka=117853008,an=22,An=20,On=56,sd=an+An+On,Xa=1,Ja=39169,Qa=10,eo=1,Vi=21589,ad=28789,od=25461,yi=1,ld=6,bi=8,vi=2048,ki=16,cd=20,aa=45,oa=51,or="/",la=new Date(2107,11,31),ca=new Date(1980,0,1),fe=void 0,mr="undefined",to="function";class da{constructor(t){return class extends TransformStream{constructor(n,r){const i=new t(r);super({transform(s,a){a.enqueue(i.append(s))},flush(s){const a=i.flush();a&&s.enqueue(a)}})}}}}const dd=64;let no=2;try{typeof navigator!=mr&&navigator.hardwareConcurrency&&(no=navigator.hardwareConcurrency)}catch{}const fd={chunkSize:512*1024,maxWorkers:no,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:fe,CompressionStreamNative:typeof CompressionStream!=mr&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=mr&&DecompressionStream},Ft=Object.assign({},fd);function Gi(){return Ft}function ro(e){return Math.max(e.chunkSize,dd)}function Zi(e){const{baseURL:t,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:i,useCompressionStream:s,useWebWorkers:a,Deflate:l,Inflate:o,CompressionStream:f,DecompressionStream:d,workerScripts:u}=e;if(Mt("baseURL",t),Mt("chunkSize",n),Mt("maxWorkers",r),Mt("terminateWorkerTimeout",i),Mt("useCompressionStream",s),Mt("useWebWorkers",a),l&&(Ft.CompressionStream=new da(l)),o&&(Ft.DecompressionStream=new da(o)),Mt("CompressionStream",f),Mt("DecompressionStream",d),u!==fe){const{deflate:p,inflate:w}=u;if((p||w)&&(Ft.workerScripts||(Ft.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");Ft.workerScripts.deflate=p}if(w){if(!Array.isArray(w))throw new Error("workerScripts.inflate must be an array");Ft.workerScripts.inflate=w}}}function Mt(e,t){t!==fe&&(Ft[e]=t)}const Sn={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin",cap:["cap","pcap"],"cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",javascript:"js",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":"odm","vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-debian-package":["deb","udeb"],"x-director":["dcr","dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-koan":["skp","skd","skt","skm"],"x-kpresenter":["kpr","kpt"],"x-kword":["kwd","kwt"],"x-latex":"latex","x-lha":"lha","x-lyx":"lyx","x-lzh":"lzh","x-lzx":"lzx","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-ms-wmd":"wmd","x-ms-wmz":"wmz","x-msdos-program":["com","exe","bat","dll"],"x-msi":"msi","x-netcdf":["nc","cdf"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":"rpm","x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tcl":"tcl","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-troff":["t","tr","roff"],"x-troff-man":"man","x-troff-me":"me","x-troff-ms":"ms","x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix",json:"json","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":"mathml",mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","x-msdownload":["exe","dll","com","bat","msi"],"x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tads":"gam","x-tex":"tex","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-compressed":"tgz","x-gzip":"gz","x-perfmon":["pma","pmc","pml","pmr","pmw"],"x-pkcs7-mime":["p7c","p7m"],"ynd.ms-pkipko":"pko"},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":["aif","aiff","aifc"],"x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2","x-wav":"wav",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":["mmd","mmod"],"x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":["sd","sdf"],"x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","mpc","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":["val","aso"],"x-pdb":["pdb","ent"],"x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-photoshop":"psd","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",pipeg:"jfif"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":["x3d","x3dz"],"x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:["tm","ts"],"tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{avif:".avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","vrml","wrl","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const t in Sn)if(Sn.hasOwnProperty(t)){for(const n in Sn[t])if(Sn[t].hasOwnProperty(n)){const r=Sn[t][n];if(typeof r=="string")e[r]=t+"/"+n;else for(let i=0;i>>1^3988292384:t=t>>>1;io[e]=t}class pr{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let r=0,i=t.length|0;r>>8^io[(n^t[r])&255];this.crc=n}get(){return~this.crc}}class so extends TransformStream{constructor(){const t=new pr;super({transform(n){t.append(n)},flush(n){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t.get()),n.enqueue(r)}})}}function Si(e){if(typeof TextEncoder>"u"){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n0&&t&&(e[n-1]=Fe.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let a=0;a>>t),n=e[a]<<32-t;const i=e.length?e[e.length-1]:0,s=Fe.getPartial(i);return r.push(Fe.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},_r={bytes:{fromBits(e){const n=Fe.bitLength(e)/8,r=new Uint8Array(n);let i;for(let s=0;s>>24,i<<=8;return r},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let l=t.blockSize+r-(t.blockSize+r&t.blockSize-1);l<=i;l+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=Fe.concat(t,[Fe.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r},_S(e,t){return t<>>32-e},_block(e){const t=this,n=t._h,r=Array(80);for(let f=0;f<16;f++)r[f]=e[f];let i=n[0],s=n[1],a=n[2],l=n[3],o=n[4];for(let f=0;f<=79;f++){f>=16&&(r[f]=t._S(1,r[f-3]^r[f-8]^r[f-14]^r[f-16]));const d=t._S(5,i)+t._f(f,s,a,l)+o+r[f]+t._key[Math.floor(f/20)]|0;o=l,l=a,a=t._S(30,s),s=i,i=d}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+l|0,n[4]=n[4]+o|0}};const ao={};ao.aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,l,o=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),l=[]],s=i;s<4*i+28;s++){let f=a[s-1];(s%i===0||i===8&&s%i===4)&&(f=n[f>>>24]<<24^n[f>>16&255]<<16^n[f>>8&255]<<8^n[f&255],s%i===0&&(f=f<<8^f>>>24^o<<24,o=o<<1^(o>>7)*283)),a[s]=a[s-i]^f}for(let f=0;s;f++,s--){const d=a[f&3?s:s-4];s<=4||f<4?l[f]=d:l[f]=r[0][n[d>>>24]]^r[1][n[d>>16&255]]^r[2][n[d>>8&255]]^r[3][n[d&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,l,o,f;for(let d=0;d<256;d++)s[(i[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!n[d];d^=l||1,a=s[a]||1){let u=a^a<<1^a<<2^a<<3^a<<4;u=u>>8^u&255^99,n[d]=u,r[u]=d,f=i[o=i[l=i[d]]];let p=f*16843009^o*65537^l*257^d*16843008,w=i[u]*257^u*16843008;for(let D=0;D<4;D++)e[D][d]=w=w<<24^w>>>8,t[D][u]=p=p<<24^p>>>8}for(let d=0;d<5;d++)e[d]=e[d].slice(0),t[d]=t[d].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],l=s[1],o=s[2],f=s[3],d=s[4];let u=e[0]^n[0],p=e[t?3:1]^n[1],w=e[2]^n[2],D=e[t?1:3]^n[3],h=4,c,m,_;for(let b=0;b>>24]^l[p>>16&255]^o[w>>8&255]^f[D&255]^n[h],m=a[p>>>24]^l[w>>16&255]^o[D>>8&255]^f[u&255]^n[h+1],_=a[w>>>24]^l[D>>16&255]^o[u>>8&255]^f[p&255]^n[h+2],D=a[D>>>24]^l[u>>16&255]^o[p>>8&255]^f[w&255]^n[h+3],h+=4,u=c,p=m,w=_;for(let b=0;b<4;b++)i[t?3&-b:b]=d[u>>>24]<<24^d[p>>16&255]<<16^d[w>>8&255]<<8^d[D&255]^n[h++],c=u,u=p,p=w,w=D,D=c;return i}};const ud={getRandomValues(e){const t=new Uint32Array(e.buffer),n=r=>{let i=987654321;const s=4294967295;return function(){return i=36969*(i&65535)+(i>>16)&s,r=18e3*(r&65535)+(r>>16)&s,(((i<<16)+r&s)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r>24&255)===255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=Fe.bitLength(t);for(let s=0;s>5)+1<<2;let s,a,l,o,f;const d=new ArrayBuffer(i),u=new DataView(d);let p=0;const w=Fe;for(t=_r.bytes.toBits(t),f=1;p<(i||1);f++){for(s=a=e.encrypt(w.concat(t,[f])),l=1;li&&(e=n.hash(e));for(let s=0;sthis.resolveReady=i),password:t,signed:n,strength:r-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:l,strength:o,resolveReady:f,ready:d}=a;l?(await Td(a,o,l,qe(i,0,Fn[o]+2)),i=qe(i,Fn[o]+2),f()):await d;const u=new Uint8Array(i.length-It-(i.length-It)%on);s.enqueue(wo(a,i,u,0,It,!0))},async flush(i){const{signed:s,ctr:a,hmac:l,pending:o,ready:f}=this;await f;const d=qe(o,0,o.length-It),u=qe(o,o.length-It);let p=new Uint8Array;if(d.length){const w=Cn(lt,d);l.update(w);const D=a.update(w);p=Ln(lt,D)}if(s){const w=qe(Ln(lt,l.digest()),0,It);for(let D=0;Dthis.resolveReady=i),password:t,strength:n-1,pending:new Uint8Array})},async transform(i,s){const a=this,{password:l,strength:o,resolveReady:f,ready:d}=a;let u=new Uint8Array;l?(u=await Ad(a,o,l),f()):await d;const p=new Uint8Array(u.length+i.length-i.length%on);p.set(u,0),s.enqueue(wo(a,i,p,u.length,0))},async flush(i){const{ctr:s,hmac:a,pending:l,ready:o}=this;await o;let f=new Uint8Array;if(l.length){const d=s.update(Cn(lt,l));a.update(d),f=Ln(lt,d)}r.signature=Ln(lt,a.digest()).slice(0,It),i.enqueue(zi(f,r.signature))}}),r=this}}function wo(e,t,n,r,i,s){const{ctr:a,hmac:l,pending:o}=e,f=t.length-i;o.length&&(t=zi(o,t),n=Md(n,f-f%on));let d;for(d=0;d<=f-on;d+=on){const u=Cn(lt,qe(t,d,d+on));s&&l.update(u);const p=a.update(u);s||l.update(p),n.set(Ln(lt,p),d+r)}return e.pending=qe(t,d),n}async function Td(e,t,n,r){const i=await go(e,t,n,qe(r,0,Fn[t])),s=qe(r,Fn[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new Error(lo)}async function Ad(e,t,n){const r=fo(new Uint8Array(Fn[t])),i=await go(e,t,n,r);return zi(r,i)}async function go(e,t,n,r){e.password=null;const i=Si(n),s=await Od(md,i,wd,!1,gd),a=await Rd(Object.assign({salt:r},ho),s,8*(En[t]*2+2)),l=new Uint8Array(a),o=Cn(lt,qe(l,0,En[t])),f=Cn(lt,qe(l,En[t],En[t]*2)),d=qe(l,En[t]*2);return Object.assign(e,{keys:{key:o,authentication:f,passwordVerification:d},ctr:new kd(new vd(o),Array.from(xd)),hmac:new Sd(f)}),d}function Od(e,t,n,r,i){return yd?Wn.importKey(e,t,n,r,i):Yn.importKey(t)}async function Rd(e,t,n){return bd?await Wn.deriveBits(e,t,n):Yn.pbkdf2(t,e.salt,ho.iterations,n)}function zi(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Md(e,t){if(t&&t>e.length){const n=e;e=new Uint8Array(t),e.set(n,0)}return e}function qe(e,t,n){return e.subarray(t,n)}function Ln(e,t){return e.fromBits(t)}function Cn(e,t){return e.toBits(t)}const cn=12;class Id extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),xo(this,t)},transform(r,i){const s=this;if(s.password){const a=fa(s,r.subarray(0,cn));if(s.password=null,a[cn-1]!=s.passwordVerification)throw new Error(lo);r=r.subarray(cn)}i.enqueue(fa(s,r))}})}}class Fd extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),xo(this,t)},transform(r,i){const s=this;let a,l;if(s.password){s.password=null;const o=fo(new Uint8Array(cn));o[cn-1]=s.passwordVerification,a=new Uint8Array(r.length+o.length),a.set(ua(s,o),0),l=cn}else a=new Uint8Array(r.length),l=0;a.set(ua(s,r),l),i.enqueue(a)}})}}function fa(e,t){const n=new Uint8Array(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function yo(e){const t=e.keys[2]|2;return bo(Math.imul(t,t^1)>>>8)}function bo(e){return e&255}function ha(e){return e&4294967295}const ma="deflate-raw";class Ld extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:r,CompressionStreamNative:i}){super({});const{compressed:s,encrypted:a,useCompressionStream:l,zipCrypto:o,signed:f,level:d}=t,u=this;let p,w,D=vo(super.readable);(!a||o)&&f&&([D,p]=D.tee(),p=ct(p,new so)),s&&(D=So(D,l,{level:d,chunkSize:n},i,r)),a&&(o?D=ct(D,new Fd(t)):(w=new Dd(t),D=ct(D,w))),ko(u,D,async()=>{let h;a&&!o&&(h=w.signature),(!a||o)&&f&&(h=await p.getReader().read(),h=new DataView(h.value.buffer).getUint32(0)),u.signature=h})}}class Cd extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:r,DecompressionStreamNative:i}){super({});const{zipCrypto:s,encrypted:a,signed:l,signature:o,compressed:f,useCompressionStream:d}=t;let u,p,w=vo(super.readable);a&&(s?w=ct(w,new Id(t)):(p=new Ed(t),w=ct(w,p))),f&&(w=So(w,d,{chunkSize:n},i,r)),(!a||s)&&l&&([w,u]=w.tee(),u=ct(u,new so)),ko(this,w,async()=>{if((!a||s)&&l){const D=await u.getReader().read(),h=new DataView(D.value.buffer);if(o!=h.getUint32(0,!1))throw new Error(co)}})}}function vo(e){return ct(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function ko(e,t,n){t=ct(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function So(e,t,n,r,i){try{const s=t&&r?r:i;e=ct(e,new s(ma,n))}catch(s){if(t)e=ct(e,new i(ma,n));else throw s}return e}function ct(e,t){return e.pipeThrough(t)}const Nd="message",Pd="start",Ud="pull",pa="data",Yd="ack",Wd="close",Eo="deflate",Do="inflate";class Hd extends TransformStream{constructor(t,n){super({});const r=this,{codecType:i}=t;let s;i.startsWith(Eo)?s=Ld:i.startsWith(Do)&&(s=Cd);let a=0;const l=new s(t,n),o=super.readable,f=new TransformStream({transform(d,u){d&&d.length&&(a+=d.length,u.enqueue(d))},flush(){const{signature:d}=l;Object.assign(r,{signature:d,size:a})}});Object.defineProperty(r,"readable",{get(){return o.pipeThrough(l).pipeThrough(f)}})}}const jd=typeof Worker!=mr;class ni{constructor(t,{readable:n,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:l,transferStreams:o,scripts:f},d){const{signal:u}=a;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new Bd(n,a,s),{signal:u}),writable:r,options:Object.assign({},i),scripts:f,transferStreams:o,terminate(){const{worker:p,busy:w}=t;p&&!w&&(p.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,d(t)}}),(l&&jd?Gd:Vd)(t,s)}}class Bd extends TransformStream{constructor(t,{onstart:n,onprogress:r,size:i,onend:s},{chunkSize:a}){let l=0;super({start(){n&&ri(n,i)},async transform(o,f){l+=o.length,r&&await ri(r,l,i),f.enqueue(o)},flush(){t.size=l,s&&ri(s,l)}},{highWaterMark:1,size:()=>a})}}async function ri(e,...t){try{await e(...t)}catch{}}function Vd(e,t){return{run:()=>Zd(e,t)}}function Gd(e,{baseURL:t,chunkSize:n}){return e.interface||Object.assign(e,{worker:$d(e.scripts[0],t,e),interface:{run:()=>qd(e,{chunkSize:n})}}),e.interface}async function Zd({options:e,readable:t,writable:n,onTaskFinished:r},i){const s=new Hd(e,i);try{await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,size:l}=s;return{signature:a,size:l}}finally{r()}}async function qd(e,t){let n,r;const i=new Promise((p,w)=>{n=p,r=w});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});const{readable:s,options:a,scripts:l}=e,{writable:o,closed:f}=zd(e.writable);Ei({type:Pd,scripts:l.slice(1),options:a,config:t,readable:s,writable:o},e)||Object.assign(e,{reader:s.getReader(),writer:o.getWriter()});const u=await i;try{await o.close()}catch{}return await f,u}function zd(e){const t=e.getWriter();let n;const r=new Promise(s=>n=s);return{writable:new WritableStream({async write(s){await t.ready,await t.write(s)},close(){t.releaseLock(),n()},abort(s){return t.abort(s)}}),closed:r}}let _a=!0,wa=!0;function $d(e,t,n){const r={type:"module"};let i,s;typeof e==to&&(e=e());try{i=new URL(e,t)}catch{i=e}if(_a)try{s=new Worker(i)}catch{_a=!1,s=new Worker(i,r)}else s=new Worker(i,r);return s.addEventListener(Nd,a=>Kd(a,n)),s}function Ei(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:s,readable:a,writable:l}=e;const o=[];if(s){const{buffer:f,length:d}=s;d!=f.byteLength&&(s=new Uint8Array(s)),e.value=s.buffer,o.push(e.value)}if(i&&wa?(a&&o.push(a),l&&o.push(l)):e.readable=e.writable=null,o.length)try{return t.postMessage(e,o),!0}catch{wa=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(s){throw n&&n.releaseLock(),r(),s}}async function Kd({data:e},t){const{type:n,value:r,messageId:i,result:s,error:a}=e,{reader:l,writer:o,resolveResult:f,rejectResult:d,onTaskFinished:u}=t;try{if(a){const{message:w,stack:D,code:h,name:c}=a,m=new Error(w);Object.assign(m,{stack:D,code:h,name:c}),p(m)}else{if(n==Ud){const{value:w,done:D}=await l.read();Ei({type:pa,value:w,done:D,messageId:i},t)}n==pa&&(await o.ready,await o.write(new Uint8Array(r)),Ei({type:Yd,messageId:i},t)),n==Wd&&p(null,s)}}catch(w){p(w)}function p(w,D){w?d(w):f(D),o&&o.releaseLock(),u()}}let Gt=[];const ii=[];let ga=0;async function To(e,t){const{options:n,config:r}=t,{transferStreams:i,useWebWorkers:s,useCompressionStream:a,codecType:l,compressed:o,signed:f,encrypted:d}=n,{workerScripts:u,maxWorkers:p,terminateWorkerTimeout:w}=r;t.transferStreams=i||i===fe;const D=!o&&!f&&!d&&!t.transferStreams;t.useWebWorkers=!D&&(s||s===fe&&r.useWebWorkers),t.scripts=t.useWebWorkers&&u?u[l]:[],n.useCompressionStream=a||a===fe&&r.useCompressionStream;let h;const c=Gt.find(_=>!_.busy);if(c)xa(c),h=new ni(c,e,t,m);else if(Gt.lengthii.push({resolve:_,stream:e,workerOptions:t}));return h.run();function m(_){if(ii.length){const[{resolve:b,stream:v,workerOptions:g}]=ii.splice(0,1);b(new ni(_,v,g,m))}else _.worker?(xa(_),Number.isFinite(w)&&w>=0&&(_.terminateTimeout=setTimeout(()=>{Gt=Gt.filter(b=>b!=_),_.terminate()},w))):Gt=Gt.filter(b=>b!=_)}}function xa(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function Xd(e){const t=()=>URL.createObjectURL(new Blob([`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:"PBKDF2"},B=t.assign({hash:{name:"HMAC"}},R),E=t.assign({iterations:1e3,hash:{name:"SHA-1"}},R),M=["deriveBits"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&"function"==typeof T.importKey,L=N&&W&&"function"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s("Invalid password")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s("Invalid signature")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey("raw",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s("Invalid password");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s("Invalid signature")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)("deflate-raw",n))}catch(r){if(!t)throw r;e=pe(e,new s("deflate-raw",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=le:s.startsWith("inflate")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:"pull",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:"data",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:"close",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&ke(e),"data"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe="oversubscribed dynamic bit lengths tree":-5!=a&&0!==r[0]||(f.Oe="incomplete dynamic bit lengths tree",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe="oversubscribed literal/length tree":-4!=h&&(w.Oe="incomplete literal/length tree",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe="oversubscribed distance tree":-5==h?(w.Oe="incomplete distance tree",h=-3):-4!=h&&(w.Oe="empty distance tree with lengths",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe="invalid distance code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe="invalid literal/length code",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe="invalid literal/length code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe="invalid distance code",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe="invalid block type",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe="invalid stored block lengths",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe="too many length or distance symbols",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe="invalid bit length repeat",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe="need dictionary",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye}; +`],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}const Ao="HTTP error ",Rr="HTTP Range not supported",Jd="Writer iterator completed too soon",Qd="text/plain",ef="Content-Length",tf="Content-Range",nf="Accept-Ranges",rf="Range",sf="Content-Type",af="HEAD",Ki="GET",Oo="bytes",of=64*1024,Xi="writable";class Mr{constructor(){this.size=0}init(){this.initialized=!0}}class Yt extends Mr{get readable(){const t=this,{chunkSize:n=of}=t,r=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:s=0,size:a,diskNumberStart:l}=r,{chunkOffset:o}=this;i.enqueue(await Ie(t,s+o,Math.min(n,a-o),l)),o+n>a?i.close():this.chunkOffset+=n}});return r}}class Ro extends Mr{constructor(){super();const t=this,n=new WritableStream({write(r){return t.writeUint8Array(r)}});Object.defineProperty(t,Xi,{get(){return n}})}writeUint8Array(){}}class Di extends Yt{constructor(t){super();let n=t.length;for(;t.charAt(n-1)=="=";)n--;const r=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:r,size:Math.floor((n-r)*.75)})}readUint8Array(t,n){const{dataStart:r,dataURI:i}=this,s=new Uint8Array(n),a=Math.floor(t/3)*4,l=atob(i.substring(a+r,Math.ceil((t+n)/3)*4+r)),o=t-Math.floor(a/4)*3;for(let f=o;f2?n.data+=btoa(i):n.pending=i}getData(){return this.data+btoa(this.pending)}}class mn extends Yt{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){const r=this;return new Uint8Array(await r.blob.slice(t,t+n).arrayBuffer())}}class Kt extends Mr{constructor(t){super();const n=this,r=new TransformStream,i=[];t&&i.push([sf,t]),Object.defineProperty(n,Xi,{get(){return r.writable}}),n.blob=new Response(r.readable,{headers:i}).blob()}getData(){return this.blob}}class Mo extends mn{constructor(t){super(new Blob([t],{type:Qd}))}}class Ti extends Kt{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:n}=this,r=await super.getData();if(r.text&&n)return r.text();{const i=new FileReader;return new Promise((s,a)=>{Object.assign(i,{onload:({target:l})=>s(l.result),onerror:()=>a(i.error)}),i.readAsText(r,t)})}}}class lf extends Yt{constructor(t,n){super(),Io(this,t,n)}async init(){super.init(),await Fo(this,Ai,ya)}readUint8Array(t,n){return Lo(this,t,n,Ai,ya)}}class cf extends Yt{constructor(t,n){super(),Io(this,t,n)}async init(){super.init(),await Fo(this,Oi,ba)}readUint8Array(t,n){return Lo(this,t,n,Oi,ba)}}function Io(e,t,n){const{preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s}=n;n=Object.assign({},n),delete n.preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.useXHR,Object.assign(e,{url:t,options:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:s})}async function Fo(e,t,n){const{url:r,useRangeHeader:i,forceRangeRequests:s}=e;if(ff(r)&&(i||s)){const{headers:a}=await t(Ki,e,Co(e));if(!s&&a.get(nf)!=Oo)throw new Error(Rr);{let l;const o=a.get(tf);if(o){const f=o.trim().split(/\s*\/\s*/);if(f.length){const d=f[1];d&&d!="*"&&(l=Number(d))}}l===fe?await va(e,t,n):e.size=l}}else await va(e,t,n)}async function Lo(e,t,n,r,i){const{data:s,useRangeHeader:a,forceRangeRequests:l,options:o}=e;if(a||l){const f=await r(Ki,e,Co(e,t,n));if(f.status!=206)throw new Error(Rr);return new Uint8Array(await f.arrayBuffer())}else return s||await i(e,o),new Uint8Array(s.subarray(t,t+n))}function Co(e,t=0,n=1){return Object.assign({},Ji(e),{[rf]:Oo+"="+t+"-"+(t+n-1)})}function Ji({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function ya(e){await No(e,Ai)}async function ba(e){await No(e,Oi)}async function No(e,t){const n=await t(Ki,e,Ji(e));e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function va(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t(af,e,Ji(e))).headers.get(ef);i?e.size=Number(i):await n(e,e.options)}}async function Ai(e,{options:t,url:n},r){const i=await fetch(n,Object.assign({},t,{method:e,headers:r}));if(i.status<400)return i;throw i.status==416?new Error(Rr):new Error(Ao+(i.statusText||i.status))}function Oi(e,{url:t},n){return new Promise((r,i)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",()=>{if(s.status<400){const a=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(l=>{const o=l.trim().split(/\s*:\s*/);o[0]=o[0].trim().replace(/^[a-z]|-[a-z]/g,f=>f.toUpperCase()),a.push(o)}),r({status:s.status,arrayBuffer:()=>s.response,headers:new Map(a)})}else i(s.status==416?new Error(Rr):new Error(Ao+(s.statusText||s.status)))},!1),s.addEventListener("error",a=>i(a.detail.error),!1),s.open(e,t),n)for(const a of Object.entries(n))s.setRequestHeader(a[0],a[1]);s.responseType="arraybuffer",s.send()})}class ka extends Yt{constructor(t,n={}){super(),Object.assign(this,{url:t,reader:n.useXHR?new cf(t,n):new lf(t,n)})}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(t,n){return this.reader.readUint8Array(t,n)}}class Ri extends Yt{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,n){return this.array.slice(t,t+n)}}class gr extends Ro{init(t=0){super.init(),Object.assign(this,{offset:0,array:new Uint8Array(t)})}writeUint8Array(t){const n=this;if(n.offset+t.length>n.array.length){const r=n.array;n.array=new Uint8Array(r.length+t.length),n.array.set(r)}n.array.set(t,n.offset),n.offset+=t.length}getData(){return this.array}}class df extends Yt{constructor(t){super(),this.readers=t}async init(){super.init();const t=this,{readers:n}=t;t.lastDiskNumber=0,await Promise.all(n.map(async r=>{await r.init(),t.size+=r.size}))}async readUint8Array(t,n,r=0){const i=this,{readers:s}=this;let a,l=r;l==-1&&(l=s.length-1);let o=t;for(;o>=s[l].size;)o-=s[l].size,l++;const f=s[l],d=f.size;if(o+n<=d)a=await Ie(f,o,n);else{const u=d-o;a=new Uint8Array(n),a.set(await Ie(f,o,u)),a.set(await i.readUint8Array(t+u,n-u,r),u)}return i.lastDiskNumber=Math.max(l,i.lastDiskNumber),a}}class Sa extends Mr{constructor(t,n=4294967296){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,availableSize:n});let i,s,a;const l=new WritableStream({async write(d){if(a)if(i.size+d.length>=n){const u=n-i.size;await o(d.slice(0,u)),await f(),r.diskOffset+=i.size,r.diskNumber++,a=null,await this.write(d.slice(u))}else d.length&&await o(d),r.availableSize=n-i.size;else{const{value:u,done:p}=await t.next();if(p&&!u)throw new Error(Jd);i=u,i.size=0,s=u.writable,a=s.getWriter(),await this.write(d)}},async close(){await a.ready,await f()}});Object.defineProperty(r,Xi,{get(){return l}});async function o(d){await a.ready,await a.write(d),i.size+=d.length,r.size+=d.length}async function f(){s.size=i.size,await a.close()}}}function ff(e){const{baseURL:t}=Gi(),{protocol:n}=new URL(e,t);return n=="http:"||n=="https:"}async function ze(e,t){e.init&&!e.initialized&&await e.init(t)}function Ie(e,t,n,r){return e.readUint8Array(t,n,r)}const Po="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),uf=Po.length==256;function hf(e){if(uf){let t="";for(let n=0;nthis[n]=t[n])}}const si="File format is not recognized",wf="End of central directory not found",gf="End of Zip64 central directory not found",xf="End of Zip64 central directory locator not found",yf="Central directory header not found",bf="Local file header not found",vf="Zip64 extra field not found",kf="File contains encrypted entry",Sf="Encryption method not supported",Ea="Compression method not supported",Da="Split zip file",Ta="utf-8",Aa="cp437",Ef=[[jo,pe],[Bo,pe],[Vo,pe],[Ii,ke]],Df={[ke]:{getValue:_e,bytes:4},[pe]:{getValue:lr,bytes:8}};class Tf{constructor(t,n={}){t instanceof ReadableStream&&(t={readable:t}),Object.assign(this,{reader:t,options:n,config:Gi()})}async*getEntriesGenerator(t={}){const n=this;let{reader:r}=n;const{config:i}=n;if(await ze(r),(r.size===fe||!r.readUint8Array)&&(Array.isArray(r)?r=new df(r):r=new mn(await new Response(r.readable).blob()),await ze(r)),r.size=r.size)throw new Error(si);let _=0,b=await Ie(r,o,l,D),v=Te(b);if(l){const k=s.offset-l;if(_e(v,_)!=gi&&o!=k){const S=o;o=k,c=o-S,b=await Ie(r,o,l,D),v=Te(b)}}if(o<0||o>=r.size)throw new Error(si);const g=tt(n,t,"filenameEncoding"),y=tt(n,t,"commentEncoding");for(let k=0;kS.getData(mt,Ht,jt),_=we;const{onprogress:Dt}=t;if(Dt)try{await Dt(k+1,h,new xr(S))}catch{}yield Ht}const x=tt(n,t,"extractPrependedData"),E=tt(n,t,"extractAppendedData");return x&&(n.prependedData=m>0?await Ie(r,0,m):new Uint8Array),n.comment=d?await Ie(r,f+an,d):new Uint8Array,E&&(n.appendedData=u>>8&255:p>>>24&255),signature:p,compressed:f!=0,encrypted:v,useWebWorkers:tt(i,r,"useWebWorkers"),useCompressionStream:tt(i,r,"useCompressionStream"),transferStreams:tt(i,r,"transferStreams")},config:d,streamOptions:{signal:S,size:E,onstart:A,onprogress:U,onend:F}};return k.size+=(await To({readable:x,writable:k},B)).size,tt(i,r,"preventClose")||await k.close(),t.getData?t.getData():k}}function Ko(e,t,n){const r=e.rawBitFlag=be(t,n+2),i=(r&yi)==yi,s=_e(t,n+6);Object.assign(e,{encrypted:i,version:be(t,n),bitFlag:{level:(r&ld)>>1,dataDescriptor:(r&bi)==bi,languageEncodingFlag:(r&vi)==vi},rawLastModDate:s,lastModDate:Lf(s),filenameLength:be(t,n+22),extraFieldLength:be(t,n+24)})}async function Xo(e,t,n,r){const{rawExtraField:i}=t,s=t.extraField=new Map,a=Te(new Uint8Array(i));let l=0;try{for(;lt[i]==s);for(let i=0,s=0;i{if(e.data.length>=a+4){const f=_e(n,a);t[l]=e[l]=new Date(f*1e3);const d=s[o];e[d]=f}a+=4})}async function Ff(e,t,n,r,i){const s=new Uint8Array(4),a=Te(s);Cf(a,0,t);const l=r+i;return await o(r)||await o(Math.min(l,n));async function o(f){const d=n-f,u=await Ie(e,d,f);for(let p=u.length-r;p>=0;p--)if(u[p]==s[0]&&u[p+1]==s[1]&&u[p+2]==s[2]&&u[p+3]==s[3])return{offset:d+p,buffer:u.slice(p,p+r).buffer}}}function tt(e,t,n){return t[n]===fe?e.options[n]:t[n]}function Lf(e){const t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function ai(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function dn(e,t){return e.getUint8(t)}function be(e,t){return e.getUint16(t,!0)}function _e(e,t){return e.getUint32(t,!0)}function lr(e,t){return Number(e.getBigUint64(t,!0))}function Cf(e,t,n){e.setUint32(t,n,!0)}function Te(e){return new DataView(e.buffer)}const Nf="File already exists",Pf="Zip file comment exceeds 64KB",Uf="File entry comment exceeds 64KB",Yf="File entry name exceeds 64KB",Ra="Version exceeds 65535",Wf="The strength must equal 1, 2, or 3",Hf="Extra field type exceeds 65535",jf="Extra field data exceeds 64KB",ns="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Ma=new Uint8Array([7,0,2,0,65,69,3,0,0]),Jo=28;let oi=0;const Ia=[];class Bf{constructor(t,n={}){t.writable===fe&&typeof t.next==to&&(t=new Sa(t)),t instanceof WritableStream&&(t={writable:t}),t.writable.size===fe&&(t.writable.size=0);const r=t instanceof Sa;r||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0}),Object.assign(this,{writer:t,addSplitZipSignature:r,options:n,config:Gi(),files:new Map,filenames:new Set,offset:t.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set})}async add(t="",n,r={}){const i=this,{pendingAddFileCalls:s,config:a}=i;oiIa.push(o));let l;try{if(t=t.trim(),i.filenames.has(t))throw new Error(Nf);return i.filenames.add(t),l=Vf(i,t,n,r),s.add(l),await l}catch(o){throw i.filenames.delete(t),o}finally{s.delete(l);const o=Ia.shift();o?o():oi--}}async close(t=new Uint8Array,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:s}=i;for(;r.size;)await Promise.all(Array.from(r));return await Jf(this,t,n),!i.preventClose&&!n.preventClose&&await s.close(),i.getData?i.getData():s}}async function Vf(e,t,n,r){t=t.trim(),r.directory&&!t.endsWith(or)?t+=or:r.directory=t.endsWith(or);const i=Si(t);if(ee(i)>ke)throw new Error(Yf);const s=r.comment||"",a=Si(s);if(ee(a)>ke)throw new Error(Uf);const l=e.options.version||r.version||0;if(l>ke)throw new Error(Ra);const o=e.options.versionMadeBy||r.versionMadeBy||20;if(o>ke)throw new Error(Ra);const f=xe(e,r,Qi)||new Date,d=xe(e,r,es),u=xe(e,r,ts),p=xe(e,r,"password"),w=xe(e,r,"encryptionStrength")||3,D=xe(e,r,"zipCrypto");if(p!==fe&&w!==fe&&(w<1||w>3))throw new Error(Wf);let h=new Uint8Array;const{extraField:c}=r;if(c){let he=0,V=0;c.forEach(Z=>he+=4+ee(Z)),h=new Uint8Array(he),c.forEach((Z,Se)=>{if(Se>ke)throw new Error(Hf);if(ee(Z)>ke)throw new Error(jf);ve(h,new Uint16Array([Se]),V),ve(h,new Uint16Array([ee(Z)]),V+2),ve(h,Z,V+4),V+=4+ee(Z)})}let m=xe(e,r,"extendedTimestamp");m===fe&&(m=!0);let _=0,b=0,v=xe(e,r,"keepOrder");v===fe&&(v=!0);let g=0,y=xe(e,r,zo);y===fe&&(y=!0);const x=xe(e,r,Zo)||0,E=xe(e,r,qo)||0;let k=xe(e,r,$o);n&&(n instanceof ReadableStream&&(n={readable:n}),await ze(n),n.size===fe?(r.dataDescriptor=!0,(k||k===fe)&&(k=!0,_=pe)):(g=n.size,_=eu(g)));const{diskOffset:S}=e.writer;if(e.offset+e.pendingEntriesSize-S>=pe||g>=pe||_>=pe){if(k===!1||!v)throw new Error(ns);k=!0}k=k||!1;const A=xe(e,r,"level"),U=xe(e,r,"useWebWorkers"),F=xe(e,r,"bufferedWrite");let B=xe(e,r,"dataDescriptor"),N=xe(e,r,"dataDescriptorSignature");const Y=xe(e,r,"signal"),j=xe(e,r,"useCompressionStream");B===fe&&(B=!0),B&&N===fe&&(N=!1),r=Object.assign({},r,{rawFilename:i,rawComment:a,version:l,versionMadeBy:o,lastModDate:f,lastAccessDate:d,creationDate:u,rawExtraField:h,zip64:k,password:p,level:A,useWebWorkers:U,encryptionStrength:w,extendedTimestamp:m,zipCrypto:D,bufferedWrite:F,keepOrder:v,dataDescriptor:B,dataDescriptorSignature:N,signal:Y,msDosCompatible:y,internalFileAttribute:x,externalFileAttribute:E,useCompressionStream:j});const q=qf(r),we=zf(r);b=ee(q.localHeaderArray,we.dataDescriptorArray)+_,e.pendingEntriesSize+=b;let W;try{W=await Gf(e,t,n,{headerInfo:q,dataDescriptorInfo:we},r)}finally{e.pendingEntriesSize-=b}return Object.assign(W,{name:t,comment:s,extraField:c}),new xr(W)}async function Gf(e,t,n,r,i){const{files:s,writer:a}=e,{keepOrder:l,dataDescriptor:o,signal:f}=i,d=Array.from(s.values()).pop();let u={},p,w,D,h,c,m;s.set(t,u);try{let v;l&&(v=d&&d.lock,_()),i.bufferedWrite||e.lockWriter||!o?(m=new Kt,m.writable.size=0,p=!0,await ze(a)):(m=a,e.lockWriter=Promise.resolve(),w=()=>delete e.lockWriter),await ze(m);const{writable:g,diskNumber:y}=a;let{diskOffset:x}=a;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const E=new Uint8Array(4),k=He(E);Q(k,0,Bi),await Nt(g,E),e.offset+=4}if(p||await v,c=!0,u.diskNumberStart=y,u=await Zf(n,m,u,r,e.config,i),c=!1,s.set(t,u),u.filename=t,p){await m.writable.close();let E=await m.getData();await v,await b(),h=!0,o||(E=await Kf(u,E,g,i)),u.diskNumberStart=a.diskNumber,x=a.diskOffset,await E.stream().pipeTo(g,{preventClose:!0,signal:f}),g.size+=E.size,h=!1}if(u.offset=e.offset-x,u.zip64)Xf(u);else if(u.offset>=pe)throw new Error(ns);return e.offset+=u.length,u}catch(v){throw(p&&h||!p&&c)&&(e.hasCorruptedEntries=!0,v&&(v.corruptedEntry=!0),p?e.offset+=m.writable.size:e.offset=m.writable.size),s.delete(t),v}finally{D&&D(),w&&w()}function _(){u.lock=new Promise(v=>D=v)}async function b(){const{lockWriter:v}=e;if(v)return await v.then(()=>delete e.lockWriter),b();e.lockWriter=new Promise(g=>w=g)}}async function Zf(e,t,{diskNumberStart:n,lock:r},i,s,a){const{headerInfo:l,dataDescriptorInfo:o}=i,{localHeaderArray:f,headerArray:d,lastModDate:u,rawLastModDate:p,encrypted:w,compressed:D,version:h,compressionMethod:c,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b}=l,{dataDescriptorArray:v}=o,{rawFilename:g,lastAccessDate:y,creationDate:x,password:E,level:k,zip64:S,zipCrypto:A,dataDescriptor:U,directory:F,versionMadeBy:B,rawComment:N,rawExtraField:Y,useWebWorkers:j,onstart:q,onprogress:we,onend:W,signal:he,encryptionStrength:V,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,useCompressionStream:Ht}=a,Dt={lock:r,versionMadeBy:B,zip64:S,directory:Boolean(F),filenameUTF8:!0,rawFilename:g,commentUTF8:!0,rawComment:N,rawExtraFieldExtendedTimestamp:m,rawExtraFieldNTFS:_,rawExtraFieldAES:b,rawExtraField:Y,extendedTimestamp:Z,msDosCompatible:Se,internalFileAttribute:ue,externalFileAttribute:ge,diskNumberStart:n};let mt=0,jt=0,wn;const{writable:Ve}=t;if(e){e.chunkSize=ro(s),await Nt(Ve,f);const gn=e.readable,Ee=gn.size=e.size,Ue={options:{codecType:Eo,level:k,password:E,encryptionStrength:V,zipCrypto:w&&A,passwordVerification:w&&A&&p>>8&255,signed:!0,compressed:D,encrypted:w,useWebWorkers:j,useCompressionStream:Ht,transferStreams:!1},config:s,streamOptions:{signal:he,size:Ee,onstart:q,onprogress:we,onend:W}},Jt=await To({readable:gn,writable:Ve},Ue);Ve.size+=Jt.size,wn=Jt.signature,jt=e.size=gn.size,mt=Jt.size}else await Nt(Ve,f);const Tt=S?new Uint8Array(Jo+4):new Uint8Array;return e&&$f({signature:wn,rawExtraFieldZip64:Tt,compressedSize:mt,uncompressedSize:jt,headerInfo:l,dataDescriptorInfo:o},a),U&&await Nt(Ve,v),Object.assign(Dt,{compressedSize:mt,lastModDate:u,rawLastModDate:p,creationDate:x,lastAccessDate:y,encrypted:w,length:ee(f,v)+mt,compressionMethod:c,version:h,headerArray:d,signature:wn,rawExtraFieldZip64:Tt}),Dt}function qf(e){const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,password:s,level:a,zip64:l,zipCrypto:o,dataDescriptor:f,directory:d,rawExtraField:u,encryptionStrength:p,extendedTimestamp:w}=e,D=a!==0&&!d,h=Boolean(s&&ee(s));let c;if(h&&!o){c=new Uint8Array(ee(Ma)+2);const N=He(c);re(N,0,Ja),ve(c,Ma,2),yr(N,8,p)}else c=new Uint8Array;let m,_;if(w){_=new Uint8Array(9+(r?4:0)+(i?4:0));const N=He(_);re(N,0,Vi),re(N,2,ee(_)-4);const Y=1+(r?2:0)+(i?4:0);yr(N,4,Y),Q(N,5,Math.floor(n.getTime()/1e3)),r&&Q(N,9,Math.floor(r.getTime()/1e3)),i&&Q(N,13,Math.floor(i.getTime()/1e3));try{m=new Uint8Array(36);const j=He(m),q=li(n);re(j,0,Qa),re(j,2,32),re(j,8,eo),re(j,10,24),Pe(j,12,q),Pe(j,20,li(r)||q),Pe(j,28,li(i)||q)}catch{m=new Uint8Array}}else m=_=new Uint8Array;let b=vi;f&&(b=b|bi);let v=Za;D&&(v=wi);let g=e.version||cd;l&&(g=g>aa?g:aa),h&&(b=b|yi,o||(g=g>oa?g:oa,v=qa,D&&(c[9]=wi)));const y=new Uint8Array(26),x=He(y);re(x,0,g),re(x,2,b),re(x,4,v);const E=new Uint32Array(1),k=He(E);let S;nla?S=la:S=n,re(k,0,(S.getHours()<<6|S.getMinutes())<<5|S.getSeconds()/2),re(k,2,(S.getFullYear()-1980<<4|S.getMonth()+1)<<5|S.getDate());const A=E[0];Q(x,6,A),re(x,22,ee(t));const U=ee(c,_,m,u);re(x,24,U);const F=new Uint8Array(30+ee(t)+U),B=He(F);return Q(B,0,za),ve(F,y,4),ve(F,t,30),ve(F,c,30+ee(t)),ve(F,_,30+ee(t,c)),ve(F,m,30+ee(t,c,_)),ve(F,u,30+ee(t,c,_,m)),{localHeaderArray:F,headerArray:y,headerView:x,lastModDate:n,rawLastModDate:A,encrypted:h,compressed:D,version:g,compressionMethod:v,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:m,rawExtraFieldAES:c}}function zf(e){const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i=new Uint8Array,s,a=0;return n&&(i=new Uint8Array(t?r?24:20:r?16:12),s=He(i),r&&(a=4,Q(s,0,id))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}}function $f(e,t){const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:s,headerInfo:a,dataDescriptorInfo:l}=e,{headerView:o,encrypted:f}=a,{dataDescriptorView:d,dataDescriptorOffset:u}=l,{zip64:p,zipCrypto:w,dataDescriptor:D}=t;if((!f||w)&&n!==fe&&(Q(o,10,n),D&&Q(d,u,n)),p){const h=He(r);re(h,0,Xa),re(h,2,Jo),Q(o,14,pe),Pe(h,12,BigInt(i)),Q(o,18,pe),Pe(h,4,BigInt(s)),D&&(Pe(d,u+4,BigInt(i)),Pe(d,u+12,BigInt(s)))}else Q(o,14,i),Q(o,18,s),D&&(Q(d,u+4,i),Q(d,u+8,s))}async function Kf(e,t,n,{zipCrypto:r}){const i=await Qf(t,0,26),s=new DataView(i);return(!e.encrypted||r)&&Q(s,14,e.signature),e.zip64?(Q(s,18,pe),Q(s,22,pe)):(Q(s,18,e.compressedSize),Q(s,22,e.uncompressedSize)),await Nt(n,new Uint8Array(i)),t.slice(i.byteLength)}function Xf(e){const{rawExtraFieldZip64:t,offset:n,diskNumberStart:r}=e,i=He(t);Pe(i,20,BigInt(n)),Q(i,28,r)}async function Jf(e,t,n){const{files:r,writer:i}=e;let s=0,a=0;const{diskOffset:l,writable:o}=i;let{diskNumber:f}=i,d=e.offset-l,u=r.size;for(const[,{rawFilename:v,rawExtraFieldZip64:g,rawExtraFieldAES:y,rawExtraField:x,rawComment:E,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:S}]of r)a+=46+ee(v,E,g,y,k,S,x);let p=n.zip64||e.options.zip64||!1;if(d>=pe||a>=pe||u>=ke){if(n.zip64===!1||e.options.zip64===!1)throw new Error(ns);p=!0}const w=new Uint8Array(a),D=He(w);for(const[v,g]of Array.from(r.values()).entries()){const{offset:y,rawFilename:x,rawExtraFieldZip64:E,rawExtraFieldAES:k,rawExtraFieldNTFS:S,rawExtraField:A,rawComment:U,versionMadeBy:F,headerArray:B,directory:N,zip64:Y,msDosCompatible:j,internalFileAttribute:q,externalFileAttribute:we,extendedTimestamp:W,lastModDate:he,diskNumberStart:V}=g;let Z;if(W){Z=new Uint8Array(9);const ue=He(Z);re(ue,0,Vi),re(ue,2,ee(Z)-4),yr(ue,4,1),Q(ue,5,Math.floor(he.getTime()/1e3))}else Z=new Uint8Array;const Se=ee(E,k,Z,S,A);if(Q(D,s,gi),re(D,s+4,F),ve(w,B,s+6),re(D,s+30,Se),re(D,s+32,ee(U)),re(D,s+34,Y?ke:V),re(D,s+36,q),we?Q(D,s+38,we):N&&j&&yr(D,s+38,ki),Q(D,s+42,Y?pe:y),ve(w,x,s+46),ve(w,E,s+46+ee(x)),ve(w,k,s+46+ee(x,E)),ve(w,Z,s+46+ee(x,E,k)),ve(w,S,s+46+ee(x,E,k,Z)),ve(w,A,s+46+ee(x,E,k,Z,S)),ve(w,U,s+46+ee(x)+Se),s+=46+ee(x,U)+Se,n.onprogress)try{await n.onprogress(v+1,r.size,new xr(g))}catch{}}await ze(i),await Nt(o,w);const h=new Uint8Array(p?sd:an),c=He(h);let m=i.diskNumber;const{availableSize:_}=i;_n&&(t+=n.length)),t}class Qo{constructor(t,n,r,i){const s=this;if(t.root&&i&&i.getChildByName(n))throw new Error("Entry filename already exists");r||(r={}),Object.assign(s,{fs:t,name:n,data:r.data,id:t.entries.length,parent:i,children:[],uncompressedSize:0}),t.entries.push(s),i&&s.parent.children.push(s)}moveTo(t){const n=this;n.fs.move(n,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){const n=this;let r=n.name,i=n.parent;for(;i&&i!=t;)r=(i.name?i.name+"/":"")+r,i=i.parent;return r}isDescendantOf(t){let n=this.parent;for(;n&&n.id!=t.id;)n=n.parent;return Boolean(n)}}class el extends Qo{constructor(t,n,r,i){super(t,n,r,i);const s=this;s.Reader=r.Reader,s.Writer=r.Writer,r.getData&&(s.getData=r.getData)}async getData(t,n={}){const r=this;if(!t||t.constructor==r.Writer&&r.data)return r.data;{const i=r.reader=new r.Reader(r.data,n);await Promise.all([ze(i),ze(t,r.data.uncompressedSize)]);const s=i.readable;return s.size=r.uncompressedSize=i.size,await s.pipeTo(t.writable),t.getData?t.getData():t.writable}}getText(t,n){return this.getData(new Ti(t),n)}getBlob(t,n){return this.getData(new Kt(t),n)}getData64URI(t,n){return this.getData(new wr(t),n)}getUint8Array(t){return this.getData(new gr,t)}getWritable(t=new WritableStream,n){return this.getData({writable:t},n)}replaceBlob(t){Object.assign(this,{data:t,Reader:mn,Writer:Kt,reader:null})}replaceText(t){Object.assign(this,{data:t,Reader:Mo,Writer:Ti,reader:null})}replaceData64URI(t){Object.assign(this,{data:t,Reader:Di,Writer:wr,reader:null})}replaceUint8Array(t){Object.assign(this,{data:t,Reader:Ri,Writer:gr,reader:null})}replaceReadable(t){Object.assign(this,{data:null,Reader:function(){return{readable:t}},Writer:null,reader:null})}}class Hn extends Qo{constructor(t,n,r,i){super(t,n,r,i),this.directory=!0}addDirectory(t){return pt(this,t,null,!0)}addText(t,n){return pt(this,t,{data:n,Reader:Mo,Writer:Ti})}addBlob(t,n){return pt(this,t,{data:n,Reader:mn,Writer:Kt})}addData64URI(t,n){return pt(this,t,{data:n,Reader:Di,Writer:wr})}addUint8Array(t,n){return pt(this,t,{data:n,Reader:Ri,Writer:gr})}addHttpContent(t,n,r={}){return pt(this,t,{data:n,Reader:class extends ka{constructor(i){super(i,r)}}})}addReadable(t,n){return pt(this,t,{Reader:function(){return{readable:n}}})}addFileSystemEntry(t){return au(this,t)}addData(t,n){return pt(this,t,n)}async importBlob(t,n={}){await this.importZip(new mn(t),n)}async importData64URI(t,n={}){await this.importZip(new Di(t),n)}async importUint8Array(t,n={}){await this.importZip(new Ri(t),n)}async importHttpContent(t,n={}){await this.importZip(new ka(t,n),n)}async importReadable(t,n={}){await this.importZip({readable:t},n)}exportBlob(t={}){return this.exportZip(new Kt("application/zip"),t)}exportData64URI(t={}){return this.exportZip(new wr("application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new gr,t)}async exportWritable(t=new WritableStream,n={}){return await this.exportZip({writable:t},n),t}async importZip(t,n){await ze(t),(await new Tf(t,n).getEntries()).forEach(s=>{let a=this;const l=s.filename.split("/"),o=l.pop();l.forEach(f=>a=a.getChildByName(f)||new Hn(this.fs,f,null,a)),s.directory||pt(a,o,{data:s,Reader:iu(Object.assign({},n))})})}async exportZip(t,n){const r=this;await Promise.all([tl(r),ze(t)]);const i=new Bf(t,n);return await su(i,r,ru([r],"uncompressedSize"),n),await i.close(),t.getData?t.getData():t.writable}getChildByName(t){const n=this.children;for(let r=0;r{n.id==e.id&&t.splice(r,1)})}async function su(e,t,n,r){const i=t,s=new Map;await a(e,t);async function a(l,o){await f();async function f(){if(r.bufferedWrite)await Promise.all(o.children.map(d));else for(const u of o.children)await d(u)}async function d(u){const p=r.relativePath?u.getRelativeName(i):u.getFullname();await l.add(p,u.reader,Object.assign({directory:u.directory},Object.assign({},r,{onprogress:async w=>{if(r.onprogress){s.set(p,w);try{await r.onprogress(Array.from(s.values()).reduce((D,h)=>D+h),n)}catch{}}}}))),await a(l,u)}}}async function au(e,t){if(t.isDirectory){const i=e.addDirectory(t.name);return await n(i,t),i}else return new Promise((i,s)=>t.file(a=>i(e.addBlob(t.name,a)),s));async function n(i,s){const a=await r(s);for(const l of a)l.isDirectory?await n(i.addDirectory(l.name),l):await new Promise((o,f)=>{l.file(d=>{const u=i.addBlob(l.name,d);u.uncompressedSize=d.size,o(u)},f)})}function r(i){return new Promise((s,a)=>{let l=[];i.isDirectory&&o(i.createReader()),i.isFile&&s(l);function o(f){f.readEntries(d=>{d.length?(l=l.concat(d),o(f)):s(l)},a)}})}}function tn(e){e.entries=[],e.root=new Hn(e)}function pt(e,t,n,r){if(e.directory)return r?new Hn(e.fs,t,n,e):new el(e.fs,t,n,e);throw new Error("Parent entry is not a directory")}let nl;try{nl=import.meta.url}catch{}Zi({baseURL:nl});Xd(Zi);Zi({Deflate:Nc,Inflate:rd});function Ir(e){return e.slice(e.lastIndexOf(Fr)+1)}const Fr="/";async function ou(e,t,n){const r=e.vaultPath+"/.obsidian/"+t+".json";let i;return e.adapter.exists(r)&&(i=JSON.parse(await e.adapter.readFile(r))),n(i)}class lu{constructor(t){Bt(this,"zipFS");Bt(this,"chunks",[]);Bt(this,"chunkIndex",0);this.zipBlob=t}async initReadingVault(){this.zipFS=new nu.FS,await this.zipFS.importBlob(this.zipBlob)}readDirectory(t){return this.zipFS.find(t).children.map(r=>({isDirectory:()=>!!r.directory,getName:()=>r.getFullname()}))}readFile(t){return this.zipFS.find(t).getText("utf-8")}exists(t){return!!this.zipFS.find(t)}resolve(t){return t}resolveInDir(t,n){return t+Fr+n}removeFile(t){}renameFile(t,n){}flushResultsFromInitialProcessing(t){}appendToResultFile(t,n){this.chunks.push(n)}appendToPostProcessingFile(t,n){this.chunks[this.chunkIndex]=n,this.chunkIndex++}initPostProcessingResultFile(t){}chunkIter(){const t=this.chunks;let n=0;return{[Symbol.asyncIterator](){return{async next(){if(n{if(s.forEach((l,o)=>s[o]+=a),r==="seenOne"&&a!=="["&&(r="normal"),r==="seenOneOut"&&a!=="]"&&(r="normal"),a==="["&&(i+=1,r==="seenOne"?(s.push(""),r="normal"):r==="normal"&&(r="seenOne")),a==="]"&&i>0){if(i-=1,r==="seenOneOut"){const l=s.pop();l&&(!t||s.length===0)&&n.push(l.slice(0,-2)),r="normal"}else r==="normal"&&(r="seenOneOut");i===0&&(r="normal")}}),n}//! moment.js //! version : 2.29.4 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com -var wl;function L(){return wl.apply(null,arguments)}function d0(e){wl=e}function rt(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function $t(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function te(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ss(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(te(e,t))return!1;return!0}function Ce(e){return e===void 0}function kt(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Bn(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function gl(e,t){var n=[],r,i=e.length;for(r=0;r>>0,r;for(r=0;r0)for(n=0;n>>0,r;for(r=0;r0)for(n=0;n=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var cs=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,fi={},fn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(fn[e]=i),t&&(fn[t[0]]=function(){return ft(i.apply(this,arguments),t[1],t[2])}),n&&(fn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function p0(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function _0(e){var t=e.match(cs),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var w0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function g0(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(cs).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var x0="Invalid date";function y0(){return this._invalidDate}var b0="%d",v0=/\d{1,2}/;function k0(e){return this._ordinal.replace("%d",e)}var S0={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function E0(e,t,n,r){var i=this._relativeTime[n];return ht(i)?i(e,t,n,r):i.replace(/%d/i,e)}function D0(e,t){var n=this._relativeTime[e>0?"future":"past"];return ht(n)?n(t):n.replace(/%s/i,t)}var Rn={};function Oe(e,t){var n=e.toLowerCase();Rn[n]=Rn[n+"s"]=Rn[t]=e}function Ke(e){return typeof e=="string"?Rn[e]||Rn[e.toLowerCase()]:void 0}function ds(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var vl={};function Re(e,t){vl[e]=t}function T0(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:vl[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Nr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function pn(e,t){return function(n){return n!=null?(kl(this,e,n),L.updateOffset(this,t),this):br(this,e)}}function br(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function kl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Nr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),jr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function A0(e){return e=Ke(e),ht(this[e])?this[e]():this}function O0(e,t){if(typeof e=="object"){e=ds(e);var n=T0(e),r,i=n.length;for(r=0;r68?1900:2e3)};var Fl=pn("FullYear",!0);function z0(){return Nr(this.year())}function $0(e,t,n,r,i,s,a){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,i,s,a),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,i,s,a),l}function Nn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Nn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Ll(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),l=1+7*(t-1)+s+a,o,f;return l<=0?(o=e-1,f=Mn(o)+l):l>Mn(e)?(o=e+1,f=l-Mn(e)):(o=e,f=l),{year:o,dayOfYear:f}}function Pn(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+vt(a,t,n)):i>vt(e.year(),t,n)?(s=i-vt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function vt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(Mn(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Oe("week","w");Oe("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Zn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function K0(e){return Pn(e,this._week.dow,this._week.doy).week}var X0={dow:0,doy:6};function J0(){return this._week.dow}function Q0(){return this._week.doy}function eh(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function th(e){var t=Pn(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Oe("day","d");Oe("weekday","e");Oe("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Zn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Zn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function nh(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function rh(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function hs(e,t){return e.slice(t,7).concat(e.slice(0,t))}var ih="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Cl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),sh="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ah=Gn,oh=Gn,lh=Gn;function ch(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?hs(n,this._week.dow):e?n[e.day()]:n}function dh(e){return e===!0?hs(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function fh(e){return e===!0?hs(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function uh(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ut([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function hh(e,t,n){var r,i,s;if(this._weekdaysParseExact)return uh.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ut([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function mh(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=nh(e,this.localeData()),this.add(e-t,"d")):t}function ph(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function _h(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=rh(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function wh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||ms.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=ah),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function gh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||ms.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=oh),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function xh(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||ms.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=lh),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ms(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,l,o,f;for(s=0;s<7;s++)a=ut([2e3,1]).day(s),l=je(this.weekdaysMin(a,"")),o=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(l),n.push(o),r.push(f),i.push(l),i.push(o),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ps(){return this.hours()%12||12}function yh(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,ps);H("k",["kk",2],0,yh);H("hmm",0,0,function(){return""+ps.apply(this)+ft(this.minutes(),2)});H("hmmss",0,0,function(){return""+ps.apply(this)+ft(this.minutes(),2)+ft(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+ft(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+ft(this.minutes(),2)+ft(this.seconds(),2)});function Nl(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Nl("a",!0);Nl("A",!1);Oe("hour","h");Re("hour",13);function Pl(e,t){return t._meridiemParse}C("a",Pl);C("A",Pl);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",Dl);C("hmmss",Tl);C("Hmm",Dl);C("Hmmss",Tl);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i))});function bh(e){return(e+"").toLowerCase().charAt(0)==="p"}var vh=/[ap]\.?m?\.?/i,kh=pn("Hours",!0);function Sh(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Ul={calendar:h0,longDateFormat:w0,invalidDate:x0,ordinal:b0,dayOfMonthOrdinalParse:v0,relativeTime:S0,months:U0,monthsShort:Al,week:X0,weekdays:ih,weekdaysMin:sh,weekdaysShort:Cl,meridiemParse:vh},de={},Dn={},Un;function Eh(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=Br(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&Eh(s,r)>=n-1)break;n--}t++}return Un}function Th(e){return e.match("^[^/\\\\]*$")!=null}function Br(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&Th(e))try{t=Un._abbr,n=require,n("./locale/"+e),Pt(t)}catch{de[e]=null}return de[e]}function Pt(e,t){var n;return e&&(Ce(t)?n=St(e):n=_s(e,t),n?Un=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Un._abbr}function _s(e,t){if(t!==null){var n,r=Ul;if(t.abbr=e,de[e]!=null)yl("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=Br(t.parentLocale),n!=null)r=n._config;else return Dn[t.parentLocale]||(Dn[t.parentLocale]=[]),Dn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new ls(Ci(r,t)),Dn[e]&&Dn[e].forEach(function(i){_s(i.name,i.config)}),Pt(e),de[e]}else return delete de[e],null}function Ah(e,t){if(t!=null){var n,r,i=Ul;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Ci(de[e]._config,t)):(r=Br(e),r!=null&&(i=r._config),t=Ci(i,t),r==null&&(t.abbr=e),n=new ls(t),n.parentLocale=de[e],de[e]=n),Pt(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Pt()&&Pt(e)):de[e]!=null&&delete de[e]);return de[e]}function St(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Un;if(!rt(e)){if(t=Br(e),t)return t;e=[e]}return Dh(e)}function Oh(){return Ni(de)}function ws(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[gt]<0||n[gt]>11?gt:n[ot]<1||n[ot]>jr(n[Ae],n[gt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[xt]!==0||n[zt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[xt]<0||n[xt]>59?xt:n[zt]<0||n[zt]>999?zt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=C0),z(e)._overflowWeekday&&t===-1&&(t=N0),z(e).overflow=t),e}var Rh=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mh=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ih=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ui=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Fh=/^\/?Date\((-?\d+)/i,Lh=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ch={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Yl(e){var t,n,r=e._i,i=Rh.exec(r)||Mh.exec(r),s,a,l,o,f=ir.length,d=ui.length;if(i){for(z(e).iso=!0,t=0,n=f;tMn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Nn(a,0,e._dayOfYear),e._a[gt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[xt]===0&&e._a[zt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Nn:$0).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function Bh(e){var t,n,r,i,s,a,l,o,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=sn(t.GG,e._a[Ae],Pn(oe(),1,4).year),r=sn(t.W,1),i=sn(t.E,1),(i<1||i>7)&&(o=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Pn(oe(),s,a),n=sn(t.gg,e._a[Ae],f.year),r=sn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(o=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(o=!0)):i=s),r<1||r>vt(n,s,a)?z(e)._overflowWeeks=!0:o!=null?z(e)._overflowWeekday=!0:(l=Ll(n,r,i,s,a),e._a[Ae]=l.year,e._dayOfYear=l.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function xs(e){if(e._f===L.ISO_8601){Yl(e);return}if(e._f===L.RFC_2822){Wl(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,l=t.length,o=0,f,d;for(i=bl(e._f,e._locale).match(cs)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),o+=r.length),fn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),L0(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=l-o,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=Vh(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Ae]=e._locale.erasConvertYear(f,e._a[Ae])),gs(e),ws(e)}function Vh(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Gh(e){var t,n,r,i,s,a,l=!1,o=e._f.length;if(o===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Cr()});function Bl(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function u1(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return os(e,this),e=Hl(e),e._a?(t=e._isUTC?ut(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&r1(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function h1(){return this.isValid()?!this._isUTC:!1}function m1(){return this.isValid()?this._isUTC:!1}function Gl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var p1=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,_1=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:kt(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=p1.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[xt])*i,ms:$(Ui(r[zt]*1e3))*i}):(r=_1.exec(e))?(i=r[1]==="-"?-1:1,n={y:Zt(r[2],i),M:Zt(r[3],i),w:Zt(r[4],i),d:Zt(r[5],i),h:Zt(r[6],i),m:Zt(r[7],i),s:Zt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=w1(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Vr(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Vr.prototype;st.invalid=n1;function Zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Pa(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function w1(e,t){var n;return e.isValid()&&t.isValid()?(t=bs(t,e),e.isBefore(t)?n=Pa(e,t):(n=Pa(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Zl(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(yl(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),ql(this,i,e),this}}function ql(e,t,n,r){var i=t._milliseconds,s=Ui(t._days),a=Ui(t._months);!e.isValid()||(r=r==null?!0:r,a&&Rl(e,br(e,"Month")+a*n),s&&kl(e,"Date",br(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var g1=Zl(1,"add"),x1=Zl(-1,"subtract");function zl(e){return typeof e=="string"||e instanceof String}function y1(e){return it(e)||Bn(e)||zl(e)||kt(e)||v1(e)||b1(e)||e===null||e===void 0}function b1(e){var t=$t(e)&&!ss(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ht(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function N1(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function P1(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function U1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Y1(e){return this.from(oe(),e)}function W1(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function H1(e){return this.to(oe(),e)}function $l(e){var t;return e===void 0?this._locale._abbr:(t=St(e),t!=null&&(this._locale=t),this)}var Kl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Xl(){return this._locale}var Sr=1e3,un=60*Sr,Er=60*un,Jl=(365*400+97)*24*Er;function hn(e,t){return(e%t+t)%t}function Ql(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Jl:new Date(e,t,n).valueOf()}function ec(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Jl:Date.UTC(e,t,n)}function j1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?ec:Ql,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hn(t+(this._isUTC?0:this.utcOffset()*un),Er);break;case"minute":t=this._d.valueOf(),t-=hn(t,un);break;case"second":t=this._d.valueOf(),t-=hn(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function B1(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?ec:Ql,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-hn(t+(this._isUTC?0:this.utcOffset()*un),Er)-1;break;case"minute":t=this._d.valueOf(),t+=un-hn(t,un)-1;break;case"second":t=this._d.valueOf(),t+=Sr-hn(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function V1(){return this._d.valueOf()-(this._offset||0)*6e4}function G1(){return Math.floor(this.valueOf()/1e3)}function Z1(){return new Date(this.valueOf())}function q1(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function z1(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function $1(){return this.isValid()?this.toISOString():null}function K1(){return as(this)}function X1(){return Lt({},z(this))}function J1(){return z(this).overflow}function Q1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",vs);C("NN",vs);C("NNN",vs);C("NNNN",dm);C("NNNNN",fm);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",_n);C("yy",_n);C("yyy",_n);C("yyyy",_n);C("yo",um);ie(["y","yy","yyy","yyyy"],Ae);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ae]=n._locale.eraYearOrdinalParse(e,i):t[Ae]=parseInt(e,10)});function em(e,t){var n,r,i,s=this._eras||St("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function nm(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function rm(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),xm.call(this,e,t,n,r,i))}function xm(e,t,n,r,i){var s=Ll(e,t,n,r,i),a=Nn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Oe("quarter","Q");Re("quarter",7);C("Q",Sl);ie("Q",function(e,t){t[gt]=($(e)-1)*3});function ym(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Oe("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var nc=pn("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Oe("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Ur);C("DDDD",El);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function bm(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Oe("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var vm=pn("Minutes",!1);H("s",["ss",2],0,"second");Oe("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],xt);var km=pn("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Oe("millisecond","ms");Re("millisecond",16);C("S",Ur,Sl);C("SS",Ur,Be);C("SSS",Ur,El);var Ct,rc;for(Ct="SSSS";Ct.length<=9;Ct+="S")C(Ct,_n);function Sm(e,t){t[zt]=$(("0."+e)*1e3)}for(Ct="S";Ct.length<=9;Ct+="S")ie(Ct,Sm);rc=pn("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function Em(){return this._isUTC?"UTC":""}function Dm(){return this._isUTC?"Coordinated Universal Time":""}var M=Vn.prototype;M.add=g1;M.calendar=E1;M.clone=D1;M.diff=F1;M.endOf=B1;M.format=P1;M.from=U1;M.fromNow=Y1;M.to=W1;M.toNow=H1;M.get=A0;M.invalidAt=J1;M.isAfter=T1;M.isBefore=A1;M.isBetween=O1;M.isSame=R1;M.isSameOrAfter=M1;M.isSameOrBefore=I1;M.isValid=K1;M.lang=Kl;M.locale=$l;M.localeData=Xl;M.max=Kh;M.min=$h;M.parsingFlags=X1;M.set=O0;M.startOf=j1;M.subtract=x1;M.toArray=q1;M.toObject=z1;M.toDate=Z1;M.toISOString=C1;M.inspect=N1;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=$1;M.toString=L1;M.unix=G1;M.valueOf=V1;M.creationData=Q1;M.eraName=rm;M.eraNarrow=im;M.eraAbbr=sm;M.eraYear=am;M.year=Fl;M.isLeapYear=z0;M.weekYear=hm;M.isoWeekYear=mm;M.quarter=M.quarters=ym;M.month=Ml;M.daysInMonth=G0;M.week=M.weeks=eh;M.isoWeek=M.isoWeeks=th;M.weeksInYear=wm;M.weeksInWeekYear=gm;M.isoWeeksInYear=pm;M.isoWeeksInISOWeekYear=_m;M.date=nc;M.day=M.days=mh;M.weekday=ph;M.isoWeekday=_h;M.dayOfYear=bm;M.hour=M.hours=kh;M.minute=M.minutes=vm;M.second=M.seconds=km;M.millisecond=M.milliseconds=rc;M.utcOffset=s1;M.utc=o1;M.local=l1;M.parseZone=c1;M.hasAlignedHourOffset=d1;M.isDST=f1;M.isLocal=h1;M.isUtcOffset=m1;M.isUtc=Gl;M.isUTC=Gl;M.zoneAbbr=Em;M.zoneName=Dm;M.dates=$e("dates accessor is deprecated. Use date instead.",nc);M.months=$e("months accessor is deprecated. Use month instead",Ml);M.years=$e("years accessor is deprecated. Use year instead",Fl);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",a1);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",u1);function Tm(e){return oe(e*1e3)}function Am(){return oe.apply(null,arguments).parseZone()}function ic(e){return e}var ne=ls.prototype;ne.calendar=m0;ne.longDateFormat=g0;ne.invalidDate=y0;ne.ordinal=k0;ne.preparse=ic;ne.postformat=ic;ne.relativeTime=E0;ne.pastFuture=D0;ne.set=u0;ne.eras=em;ne.erasParse=tm;ne.erasConvertYear=nm;ne.erasAbbrRegex=lm;ne.erasNameRegex=om;ne.erasNarrowRegex=cm;ne.months=H0;ne.monthsShort=j0;ne.monthsParse=V0;ne.monthsRegex=q0;ne.monthsShortRegex=Z0;ne.week=K0;ne.firstDayOfYear=Q0;ne.firstDayOfWeek=J0;ne.weekdays=ch;ne.weekdaysMin=fh;ne.weekdaysShort=dh;ne.weekdaysParse=hh;ne.weekdaysRegex=wh;ne.weekdaysShortRegex=gh;ne.weekdaysMinRegex=xh;ne.isPM=bh;ne.meridiem=Sh;function Dr(e,t,n,r){var i=St(),s=ut().set(r,t);return i[n](s,e)}function sc(e,t,n){if(kt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function Ss(e,t,n,r){typeof e=="boolean"?(kt(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,kt(t)&&(n=t,t=void 0),t=t||"");var i=St(),s=e?i._week.dow:0,a,l=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)l[a]=Dr(t,(a+s)%7,r,"day");return l}function Om(e,t){return sc(e,t,"months")}function Rm(e,t){return sc(e,t,"monthsShort")}function Mm(e,t,n){return Ss(e,t,n,"weekdays")}function Im(e,t,n){return Ss(e,t,n,"weekdaysShort")}function Fm(e,t,n){return Ss(e,t,n,"weekdaysMin")}Pt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Pt);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",St);var _t=Math.abs;function Lm(){var e=this._data;return this._milliseconds=_t(this._milliseconds),this._days=_t(this._days),this._months=_t(this._months),e.milliseconds=_t(e.milliseconds),e.seconds=_t(e.seconds),e.minutes=_t(e.minutes),e.hours=_t(e.hours),e.months=_t(e.months),e.years=_t(e.years),this}function ac(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Cm(e,t){return ac(this,e,t,1)}function Nm(e,t){return ac(this,e,t,-1)}function Ua(e){return e<0?Math.floor(e):Math.ceil(e)}function Pm(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,l,o;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Ua(Wi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),o=Ze(oc(t)),n+=o,t-=Ua(Wi(o)),l=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=l,this}function oc(e){return e*4800/146097}function Wi(e){return e*146097/4800}function Um(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+oc(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Wi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Ym(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Et(e){return function(){return this.as(e)}}var Wm=Et("ms"),Hm=Et("s"),jm=Et("m"),Bm=Et("h"),Vm=Et("d"),Gm=Et("w"),Zm=Et("M"),qm=Et("Q"),zm=Et("y");function $m(){return st(this)}function Km(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Xt(e){return function(){return this.isValid()?this._data[e]:NaN}}var Xm=Xt("milliseconds"),Jm=Xt("seconds"),Qm=Xt("minutes"),ep=Xt("hours"),tp=Xt("days"),np=Xt("months"),rp=Xt("years");function ip(){return Ze(this.days()/7)}var wt=Math.round,ln={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function sp(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function ap(e,t,n,r){var i=st(e).abs(),s=wt(i.as("s")),a=wt(i.as("m")),l=wt(i.as("h")),o=wt(i.as("d")),f=wt(i.as("M")),d=wt(i.as("w")),u=wt(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,sp.apply(null,p)}function op(e){return e===void 0?wt:typeof e=="function"?(wt=e,!0):!1}function lp(e,t){return ln[e]===void 0?!1:t===void 0?ln[e]:(ln[e]=t,e==="s"&&(ln.ss=t-1),!0)}function cp(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ln,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ln,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=ap(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var hi=Math.abs;function nn(e){return(e>0)-(e<0)||+e}function Zr(){if(!this.isValid())return this.localeData().invalidDate();var e=hi(this._milliseconds)/1e3,t=hi(this._days),n=hi(this._months),r,i,s,a,l=this.asSeconds(),o,f,d,u;return l?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",o=l<0?"-":"",f=nn(this._months)!==nn(l)?"-":"",d=nn(this._days)!==nn(l)?"-":"",u=nn(this._milliseconds)!==nn(l)?"-":"",o+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Vr.prototype;X.isValid=t1;X.abs=Lm;X.add=Cm;X.subtract=Nm;X.as=Um;X.asMilliseconds=Wm;X.asSeconds=Hm;X.asMinutes=jm;X.asHours=Bm;X.asDays=Vm;X.asWeeks=Gm;X.asMonths=Zm;X.asQuarters=qm;X.asYears=zm;X.valueOf=Ym;X._bubble=Pm;X.clone=$m;X.get=Km;X.milliseconds=Xm;X.seconds=Jm;X.minutes=Qm;X.hours=ep;X.days=tp;X.weeks=ip;X.months=np;X.years=rp;X.humanize=cp;X.toISOString=Zr;X.toString=Zr;X.toJSON=Zr;X.locale=$l;X.localeData=Xl;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zr);X.lang=Kl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Wr);C("X",M0);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js -L.version="2.29.4";d0(oe);L.fn=M;L.min=Xh;L.max=Jh;L.now=Qh;L.utc=ut;L.unix=Tm;L.months=Om;L.isDate=Bn;L.locale=Pt;L.invalid=Cr;L.duration=st;L.isMoment=it;L.weekdays=Mm;L.parseZone=Am;L.localeData=St;L.isDuration=dr;L.monthsShort=Rm;L.weekdaysMin=Fm;L.defineLocale=_s;L.updateLocale=Ah;L.locales=Oh;L.weekdaysShort=Im;L.normalizeUnits=Ke;L.relativeTimeRounding=op;L.relativeTimeThreshold=lp;L.calendarFormat=S1;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function dp(e,t,n,r,i=Date.now()){var p;const[s,a]=(p=l0(n))!=null?p:[[],0];let l=ju(n,a),o=e;const f=l[0]&&l[0].content.match(/^title::(.+)$/);f&&(o=f[1],l=l.slice(1)),l[0]&&l[0].content.replace(/^#+/,"").trim()===o.trim()&&(l=l.slice(1));const d=[],u=fp(o,t,i,r,s);return rl(u,{type:dt.ROOT,level:-1},l,Zu,w=>o0(e,t,w,i,r),(w,D)=>{D.type===dt.HEADING&&d.push({...D,uid:w.uid})}),l=null,r.headingTracker.pathMap.set(t,d),r.headingTracker.nameMap.get(e)||r.headingTracker.nameMap.set(e,d),u}function fp(e,t,n,r,i){let s;const a=[];i.forEach(d=>{d.key==="tags"?s=hl(d.values,r.superTagTracker,r.idGenerator):a.push(r0(e,t,d,n,r))});let l=Tu(e,t,r),o="node";const f=up(e,r.dailyNoteFormat);return f&&(l=f,o="date",e=f,r.summary.calendarNodes++),{uid:l,name:e,createdAt:n,editedAt:n,type:o,supertags:s,children:a.length>0?a:void 0}}function up(e,t){const n=L(e,t,!0);return n.isValid()?n.format("MM-DD-YYYY"):null}function Ya(e,t){return e===t.length-1?"LAST":"NOT_LAST"}function hp(e,t){return e.adapter.readDirectory(t).filter(n=>{const r=t+Fr+n.getName();return n.isDirectory()&&!r.endsWith(".github")&&!r.endsWith(".obsidian")||!n.isDirectory()&&r.endsWith(".md")}).sort((n,r)=>Number(n.isDirectory())-Number(r.isDirectory()))}async function lc(e,t,n,r,i,s="LAST"){n(t);const a=hp(e,t);for(let l=0;l{const i=Ir(r),s=Wt(n);n.adapter.appendToResultFile(e,`{ +`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Ca={};function al(e,t){L.deprecationHandler!=null&&L.deprecationHandler(e,t),Ca[e]||(sl(t),Ca[e]=!0)}L.suppressDeprecationWarnings=!1;L.deprecationHandler=null;function ht(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function hu(e){var t,n;for(n in e)te(e,n)&&(t=e[n],ht(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Li(e,t){var n=Lt({},e),r;for(r in t)te(t,r)&&($t(e[r])&&$t(t[r])?(n[r]={},Lt(n[r],e[r]),Lt(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)te(e,r)&&!te(t,r)&&$t(e[r])&&(n[r]=Lt({},n[r]));return n}function as(e){e!=null&&this.set(e)}var Ci;Object.keys?Ci=Object.keys:Ci=function(e){var t,n=[];for(t in e)te(e,t)&&n.push(t);return n};var mu={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function pu(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return ht(r)?r.call(t,n):r}function dt(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var os=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,di={},fn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(fn[e]=i),t&&(fn[t[0]]=function(){return dt(i.apply(this,arguments),t[1],t[2])}),n&&(fn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function _u(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function wu(e){var t=e.match(os),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var gu={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function xu(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(os).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var yu="Invalid date";function bu(){return this._invalidDate}var vu="%d",ku=/\d{1,2}/;function Su(e){return this._ordinal.replace("%d",e)}var Eu={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Du(e,t,n,r){var i=this._relativeTime[n];return ht(i)?i(e,t,n,r):i.replace(/%d/i,e)}function Tu(e,t){var n=this._relativeTime[e>0?"future":"past"];return ht(n)?n(t):n.replace(/%s/i,t)}var Rn={};function Oe(e,t){var n=e.toLowerCase();Rn[n]=Rn[n+"s"]=Rn[t]=e}function Ke(e){return typeof e=="string"?Rn[e]||Rn[e.toLowerCase()]:void 0}function ls(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var ll={};function Re(e,t){ll[e]=t}function Au(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:ll[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Cr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function pn(e,t){return function(n){return n!=null?(cl(this,e,n),L.updateOffset(this,t),this):br(this,e)}}function br(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function cl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Cr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Hr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ou(e){return e=Ke(e),ht(this[e])?this[e]():this}function Ru(e,t){if(typeof e=="object"){e=ls(e);var n=Au(e),r,i=n.length;for(r=0;r68?1900:2e3)};var xl=pn("FullYear",!0);function $u(){return Cr(this.year())}function Ku(e,t,n,r,i,s,a){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,i,s,a),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,i,s,a),l}function Nn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Nn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function yl(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),l=1+7*(t-1)+s+a,o,f;return l<=0?(o=e-1,f=Mn(o)+l):l>Mn(e)?(o=e+1,f=l-Mn(e)):(o=e,f=l),{year:o,dayOfYear:f}}function Pn(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+vt(a,t,n)):i>vt(e.year(),t,n)?(s=i-vt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function vt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(Mn(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Oe("week","w");Oe("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Gn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function Xu(e){return Pn(e,this._week.dow,this._week.doy).week}var Ju={dow:0,doy:6};function Qu(){return this._week.dow}function e0(){return this._week.doy}function t0(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function n0(e){var t=Pn(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Oe("day","d");Oe("weekday","e");Oe("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Gn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Gn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function r0(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function i0(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function fs(e,t){return e.slice(t,7).concat(e.slice(0,t))}var s0="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),a0="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),o0=Vn,l0=Vn,c0=Vn;function d0(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?fs(n,this._week.dow):e?n[e.day()]:n}function f0(e){return e===!0?fs(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function u0(e){return e===!0?fs(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function h0(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ut([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function m0(e,t,n){var r,i,s;if(this._weekdaysParseExact)return h0.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ut([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function p0(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=r0(e,this.localeData()),this.add(e-t,"d")):t}function _0(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function w0(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=i0(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function g0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=o0),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function x0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=l0),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function y0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=c0),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function us(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,l,o,f;for(s=0;s<7;s++)a=ut([2e3,1]).day(s),l=je(this.weekdaysMin(a,"")),o=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(l),n.push(o),r.push(f),i.push(l),i.push(o),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function hs(){return this.hours()%12||12}function b0(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,hs);H("k",["kk",2],0,b0);H("hmm",0,0,function(){return""+hs.apply(this)+dt(this.minutes(),2)});H("hmmss",0,0,function(){return""+hs.apply(this)+dt(this.minutes(),2)+dt(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+dt(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+dt(this.minutes(),2)+dt(this.seconds(),2)});function vl(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}vl("a",!0);vl("A",!1);Oe("hour","h");Re("hour",13);function kl(e,t){return t._meridiemParse}C("a",kl);C("A",kl);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",ul);C("hmmss",hl);C("Hmm",ul);C("Hmmss",hl);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i))});function v0(e){return(e+"").toLowerCase().charAt(0)==="p"}var k0=/[ap]\.?m?\.?/i,S0=pn("Hours",!0);function E0(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Sl={calendar:mu,longDateFormat:gu,invalidDate:yu,ordinal:vu,dayOfMonthOrdinalParse:ku,relativeTime:Eu,months:Yu,monthsShort:ml,week:Ju,weekdays:s0,weekdaysMin:a0,weekdaysShort:bl,meridiemParse:k0},de={},Dn={},Un;function D0(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=jr(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&D0(s,r)>=n-1)break;n--}t++}return Un}function A0(e){return e.match("^[^/\\\\]*$")!=null}function jr(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&A0(e))try{t=Un._abbr,n=require,n("./locale/"+e),Pt(t)}catch{de[e]=null}return de[e]}function Pt(e,t){var n;return e&&(Ce(t)?n=St(e):n=ms(e,t),n?Un=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Un._abbr}function ms(e,t){if(t!==null){var n,r=Sl;if(t.abbr=e,de[e]!=null)al("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=jr(t.parentLocale),n!=null)r=n._config;else return Dn[t.parentLocale]||(Dn[t.parentLocale]=[]),Dn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new as(Li(r,t)),Dn[e]&&Dn[e].forEach(function(i){ms(i.name,i.config)}),Pt(e),de[e]}else return delete de[e],null}function O0(e,t){if(t!=null){var n,r,i=Sl;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Li(de[e]._config,t)):(r=jr(e),r!=null&&(i=r._config),t=Li(i,t),r==null&&(t.abbr=e),n=new as(t),n.parentLocale=de[e],de[e]=n),Pt(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Pt()&&Pt(e)):de[e]!=null&&delete de[e]);return de[e]}function St(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Un;if(!rt(e)){if(t=jr(e),t)return t;e=[e]}return T0(e)}function R0(){return Ci(de)}function ps(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[gt]<0||n[gt]>11?gt:n[ot]<1||n[ot]>Hr(n[Ae],n[gt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[xt]!==0||n[zt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[xt]<0||n[xt]>59?xt:n[zt]<0||n[zt]>999?zt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=Nu),z(e)._overflowWeekday&&t===-1&&(t=Pu),z(e).overflow=t),e}var M0=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,I0=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,F0=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],fi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],L0=/^\/?Date\((-?\d+)/i,C0=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,N0={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function El(e){var t,n,r=e._i,i=M0.exec(r)||I0.exec(r),s,a,l,o,f=ir.length,d=fi.length;if(i){for(z(e).iso=!0,t=0,n=f;tMn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Nn(a,0,e._dayOfYear),e._a[gt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[xt]===0&&e._a[zt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Nn:Ku).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function V0(e){var t,n,r,i,s,a,l,o,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=sn(t.GG,e._a[Ae],Pn(oe(),1,4).year),r=sn(t.W,1),i=sn(t.E,1),(i<1||i>7)&&(o=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Pn(oe(),s,a),n=sn(t.gg,e._a[Ae],f.year),r=sn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(o=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(o=!0)):i=s),r<1||r>vt(n,s,a)?z(e)._overflowWeeks=!0:o!=null?z(e)._overflowWeekday=!0:(l=yl(n,r,i,s,a),e._a[Ae]=l.year,e._dayOfYear=l.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function ws(e){if(e._f===L.ISO_8601){El(e);return}if(e._f===L.RFC_2822){Dl(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,l=t.length,o=0,f,d;for(i=ol(e._f,e._locale).match(os)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),o+=r.length),fn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),Cu(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=l-o,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=G0(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Ae]=e._locale.erasConvertYear(f,e._a[Ae])),_s(e),ps(e)}function G0(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Z0(e){var t,n,r,i,s,a,l=!1,o=e._f.length;if(o===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Lr()});function Ol(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function hh(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return ss(e,this),e=Tl(e),e._a?(t=e._isUTC?ut(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&ih(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function mh(){return this.isValid()?!this._isUTC:!1}function ph(){return this.isValid()?this._isUTC:!1}function Ml(){return this.isValid()?this._isUTC&&this._offset===0:!1}var _h=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,wh=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:kt(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=_h.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[xt])*i,ms:$(Pi(r[zt]*1e3))*i}):(r=wh.exec(e))?(i=r[1]==="-"?-1:1,n={y:Zt(r[2],i),M:Zt(r[3],i),w:Zt(r[4],i),d:Zt(r[5],i),h:Zt(r[6],i),m:Zt(r[7],i),s:Zt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=gh(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Br(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Br.prototype;st.invalid=rh;function Zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Pa(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function gh(e,t){var n;return e.isValid()&&t.isValid()?(t=xs(t,e),e.isBefore(t)?n=Pa(e,t):(n=Pa(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Il(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(al(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),Fl(this,i,e),this}}function Fl(e,t,n,r){var i=t._milliseconds,s=Pi(t._days),a=Pi(t._months);!e.isValid()||(r=r==null?!0:r,a&&_l(e,br(e,"Month")+a*n),s&&cl(e,"Date",br(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var xh=Il(1,"add"),yh=Il(-1,"subtract");function Ll(e){return typeof e=="string"||e instanceof String}function bh(e){return it(e)||jn(e)||Ll(e)||kt(e)||kh(e)||vh(e)||e===null||e===void 0}function vh(e){var t=$t(e)&&!rs(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ht(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ph(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function Uh(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function Yh(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Wh(e){return this.from(oe(),e)}function Hh(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function jh(e){return this.to(oe(),e)}function Cl(e){var t;return e===void 0?this._locale._abbr:(t=St(e),t!=null&&(this._locale=t),this)}var Nl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Pl(){return this._locale}var Sr=1e3,un=60*Sr,Er=60*un,Ul=(365*400+97)*24*Er;function hn(e,t){return(e%t+t)%t}function Yl(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Ul:new Date(e,t,n).valueOf()}function Wl(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Ul:Date.UTC(e,t,n)}function Bh(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Wl:Yl,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hn(t+(this._isUTC?0:this.utcOffset()*un),Er);break;case"minute":t=this._d.valueOf(),t-=hn(t,un);break;case"second":t=this._d.valueOf(),t-=hn(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function Vh(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Wl:Yl,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-hn(t+(this._isUTC?0:this.utcOffset()*un),Er)-1;break;case"minute":t=this._d.valueOf(),t+=un-hn(t,un)-1;break;case"second":t=this._d.valueOf(),t+=Sr-hn(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function Gh(){return this._d.valueOf()-(this._offset||0)*6e4}function Zh(){return Math.floor(this.valueOf()/1e3)}function qh(){return new Date(this.valueOf())}function zh(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function $h(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Kh(){return this.isValid()?this.toISOString():null}function Xh(){return is(this)}function Jh(){return Lt({},z(this))}function Qh(){return z(this).overflow}function e1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",ys);C("NN",ys);C("NNN",ys);C("NNNN",f1);C("NNNNN",u1);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",_n);C("yy",_n);C("yyy",_n);C("yyyy",_n);C("yo",h1);ie(["y","yy","yyy","yyyy"],Ae);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ae]=n._locale.eraYearOrdinalParse(e,i):t[Ae]=parseInt(e,10)});function t1(e,t){var n,r,i,s=this._eras||St("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function r1(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function i1(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),y1.call(this,e,t,n,r,i))}function y1(e,t,n,r,i){var s=yl(e,t,n,r,i),a=Nn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Oe("quarter","Q");Re("quarter",7);C("Q",dl);ie("Q",function(e,t){t[gt]=($(e)-1)*3});function b1(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Oe("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var jl=pn("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Oe("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Pr);C("DDDD",fl);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function v1(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Oe("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var k1=pn("Minutes",!1);H("s",["ss",2],0,"second");Oe("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],xt);var S1=pn("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Oe("millisecond","ms");Re("millisecond",16);C("S",Pr,dl);C("SS",Pr,Be);C("SSS",Pr,fl);var Ct,Bl;for(Ct="SSSS";Ct.length<=9;Ct+="S")C(Ct,_n);function E1(e,t){t[zt]=$(("0."+e)*1e3)}for(Ct="S";Ct.length<=9;Ct+="S")ie(Ct,E1);Bl=pn("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function D1(){return this._isUTC?"UTC":""}function T1(){return this._isUTC?"Coordinated Universal Time":""}var M=Bn.prototype;M.add=xh;M.calendar=Dh;M.clone=Th;M.diff=Lh;M.endOf=Vh;M.format=Uh;M.from=Yh;M.fromNow=Wh;M.to=Hh;M.toNow=jh;M.get=Ou;M.invalidAt=Qh;M.isAfter=Ah;M.isBefore=Oh;M.isBetween=Rh;M.isSame=Mh;M.isSameOrAfter=Ih;M.isSameOrBefore=Fh;M.isValid=Xh;M.lang=Nl;M.locale=Cl;M.localeData=Pl;M.max=X0;M.min=K0;M.parsingFlags=Jh;M.set=Ru;M.startOf=Bh;M.subtract=yh;M.toArray=zh;M.toObject=$h;M.toDate=qh;M.toISOString=Nh;M.inspect=Ph;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=Kh;M.toString=Ch;M.unix=Zh;M.valueOf=Gh;M.creationData=e1;M.eraName=i1;M.eraNarrow=s1;M.eraAbbr=a1;M.eraYear=o1;M.year=xl;M.isLeapYear=$u;M.weekYear=m1;M.isoWeekYear=p1;M.quarter=M.quarters=b1;M.month=wl;M.daysInMonth=Zu;M.week=M.weeks=t0;M.isoWeek=M.isoWeeks=n0;M.weeksInYear=g1;M.weeksInWeekYear=x1;M.isoWeeksInYear=_1;M.isoWeeksInISOWeekYear=w1;M.date=jl;M.day=M.days=p0;M.weekday=_0;M.isoWeekday=w0;M.dayOfYear=v1;M.hour=M.hours=S0;M.minute=M.minutes=k1;M.second=M.seconds=S1;M.millisecond=M.milliseconds=Bl;M.utcOffset=ah;M.utc=lh;M.local=ch;M.parseZone=dh;M.hasAlignedHourOffset=fh;M.isDST=uh;M.isLocal=mh;M.isUtcOffset=ph;M.isUtc=Ml;M.isUTC=Ml;M.zoneAbbr=D1;M.zoneName=T1;M.dates=$e("dates accessor is deprecated. Use date instead.",jl);M.months=$e("months accessor is deprecated. Use month instead",wl);M.years=$e("years accessor is deprecated. Use year instead",xl);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",oh);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",hh);function A1(e){return oe(e*1e3)}function O1(){return oe.apply(null,arguments).parseZone()}function Vl(e){return e}var ne=as.prototype;ne.calendar=pu;ne.longDateFormat=xu;ne.invalidDate=bu;ne.ordinal=Su;ne.preparse=Vl;ne.postformat=Vl;ne.relativeTime=Du;ne.pastFuture=Tu;ne.set=hu;ne.eras=t1;ne.erasParse=n1;ne.erasConvertYear=r1;ne.erasAbbrRegex=c1;ne.erasNameRegex=l1;ne.erasNarrowRegex=d1;ne.months=ju;ne.monthsShort=Bu;ne.monthsParse=Gu;ne.monthsRegex=zu;ne.monthsShortRegex=qu;ne.week=Xu;ne.firstDayOfYear=e0;ne.firstDayOfWeek=Qu;ne.weekdays=d0;ne.weekdaysMin=u0;ne.weekdaysShort=f0;ne.weekdaysParse=m0;ne.weekdaysRegex=g0;ne.weekdaysShortRegex=x0;ne.weekdaysMinRegex=y0;ne.isPM=v0;ne.meridiem=E0;function Dr(e,t,n,r){var i=St(),s=ut().set(r,t);return i[n](s,e)}function Gl(e,t,n){if(kt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function vs(e,t,n,r){typeof e=="boolean"?(kt(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,kt(t)&&(n=t,t=void 0),t=t||"");var i=St(),s=e?i._week.dow:0,a,l=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)l[a]=Dr(t,(a+s)%7,r,"day");return l}function R1(e,t){return Gl(e,t,"months")}function M1(e,t){return Gl(e,t,"monthsShort")}function I1(e,t,n){return vs(e,t,n,"weekdays")}function F1(e,t,n){return vs(e,t,n,"weekdaysShort")}function L1(e,t,n){return vs(e,t,n,"weekdaysMin")}Pt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Pt);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",St);var _t=Math.abs;function C1(){var e=this._data;return this._milliseconds=_t(this._milliseconds),this._days=_t(this._days),this._months=_t(this._months),e.milliseconds=_t(e.milliseconds),e.seconds=_t(e.seconds),e.minutes=_t(e.minutes),e.hours=_t(e.hours),e.months=_t(e.months),e.years=_t(e.years),this}function Zl(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function N1(e,t){return Zl(this,e,t,1)}function P1(e,t){return Zl(this,e,t,-1)}function Ua(e){return e<0?Math.floor(e):Math.ceil(e)}function U1(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,l,o;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Ua(Yi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),o=Ze(ql(t)),n+=o,t-=Ua(Yi(o)),l=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=l,this}function ql(e){return e*4800/146097}function Yi(e){return e*146097/4800}function Y1(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+ql(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Yi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function W1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Et(e){return function(){return this.as(e)}}var H1=Et("ms"),j1=Et("s"),B1=Et("m"),V1=Et("h"),G1=Et("d"),Z1=Et("w"),q1=Et("M"),z1=Et("Q"),$1=Et("y");function K1(){return st(this)}function X1(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Xt(e){return function(){return this.isValid()?this._data[e]:NaN}}var J1=Xt("milliseconds"),Q1=Xt("seconds"),em=Xt("minutes"),tm=Xt("hours"),nm=Xt("days"),rm=Xt("months"),im=Xt("years");function sm(){return Ze(this.days()/7)}var wt=Math.round,ln={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function am(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function om(e,t,n,r){var i=st(e).abs(),s=wt(i.as("s")),a=wt(i.as("m")),l=wt(i.as("h")),o=wt(i.as("d")),f=wt(i.as("M")),d=wt(i.as("w")),u=wt(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,am.apply(null,p)}function lm(e){return e===void 0?wt:typeof e=="function"?(wt=e,!0):!1}function cm(e,t){return ln[e]===void 0?!1:t===void 0?ln[e]:(ln[e]=t,e==="s"&&(ln.ss=t-1),!0)}function dm(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ln,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ln,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=om(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var ui=Math.abs;function nn(e){return(e>0)-(e<0)||+e}function Gr(){if(!this.isValid())return this.localeData().invalidDate();var e=ui(this._milliseconds)/1e3,t=ui(this._days),n=ui(this._months),r,i,s,a,l=this.asSeconds(),o,f,d,u;return l?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",o=l<0?"-":"",f=nn(this._months)!==nn(l)?"-":"",d=nn(this._days)!==nn(l)?"-":"",u=nn(this._milliseconds)!==nn(l)?"-":"",o+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Br.prototype;X.isValid=nh;X.abs=C1;X.add=N1;X.subtract=P1;X.as=Y1;X.asMilliseconds=H1;X.asSeconds=j1;X.asMinutes=B1;X.asHours=V1;X.asDays=G1;X.asWeeks=Z1;X.asMonths=q1;X.asQuarters=z1;X.asYears=$1;X.valueOf=W1;X._bubble=U1;X.clone=K1;X.get=X1;X.milliseconds=J1;X.seconds=Q1;X.minutes=em;X.hours=tm;X.days=nm;X.weeks=sm;X.months=rm;X.years=im;X.humanize=dm;X.toISOString=Gr;X.toString=Gr;X.toJSON=Gr;X.locale=Cl;X.localeData=Pl;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gr);X.lang=Nl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Yr);C("X",Iu);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js +L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L.months=R1;L.isDate=jn;L.locale=Pt;L.invalid=Lr;L.duration=st;L.isMoment=it;L.weekdays=I1;L.parseZone=O1;L.localeData=St;L.isDuration=dr;L.monthsShort=M1;L.weekdaysMin=L1;L.defineLocale=ms;L.updateLocale=O0;L.locales=R0;L.weekdaysShort=F1;L.normalizeUnits=Ke;L.relativeTimeRounding=lm;L.relativeTimeThreshold=cm;L.calendarFormat=Eh;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Wi(e,t){const n=L(e,t,!0);if(n.isValid())return n.format("MM-DD-YYYY")}function fm(e){return Ir(e)!==e}class hi{constructor(){Bt(this,"nameWasCalledAsFile",[]);Bt(this,"pathMap",new Map);Bt(this,"nameMap",new Map)}accessAsFile(t,n,r,i){const s=Wi(t,i);s&&(t=s);const a=this.pathMap.get(n);if(a)return this.nameMap.get(t)||this.nameMap.set(t,a),a;const l=this.nameMap.get(t);if(l&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,l),this.nameWasCalledAsFile.push(t),l;const o=r(s);return this.pathMap.set(n,o),this.nameMap.get(t)||this.nameMap.set(t,o),this.nameWasCalledAsFile.push(t),o}accessAsLink(t,n,r){const i=Wi(t,r);i&&(t=i);const s=this.findData(t);if(s)return s;const a=fm(t),l=n(i);return a?this.pathMap.set(t,l):this.nameMap.set(t,l),l}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Zr(e){e.totalNodes++,e.leafNodes++}function zl(e){e.leafNodes--,e.topLevelNodes++}function um(e,t,n=cu,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new hi,headingTracker:new hi,dummyHeadingLinkTracker:new Map,blockLinkTracker:new hi,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function Wt(e){return Zr(e.summary),e.idGenerator()}function hm(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map,t.dailyNoteFormat);let s=i.get(r);return s||(s={uid:Wt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function mm(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map,n.dailyNoteFormat);let a=s.get(i);return a||(a={uid:Wt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function pm(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function _m(e){let t;return[e.split(` +`).map(r=>{const i=r.split(" "),s=i[i.length-1];if(s.startsWith("^"))return t=s,i.slice(0,-1).join(" ")}).join(` +`),t]}function $l(e,t,n,r,i,s){const a=[t],l=[e];for(const o of n){const f=i(o);wm(f,o,a,l,r),s==null||s(f,o)}}function wm(e,t,n,r,i){var l;gm(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(l=a.children)!=null?l:[],a.children.push(e)),n.push(t),r.push(e)}function gm(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function Kl(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=Kl(n.children,r);if(i)return i}}return null}function xm(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function ym(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const l=t.findData(s);if(l){const o={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};$l(f,o,l,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=Kl(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function bm(e,t){const[n,r]=ym(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Zr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let l=a;s.forEach(o=>{l=l.replace(o.old,o.new)}),await t.adapter.appendToPostProcessingFile(i,l)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var Xl=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(Xl||{});function vm(e,t){const n=km(e.name,t);if(n.length>0){const r=new Set;e.refs||(e.refs=[]);for(const[i,s,a]of n)r.add(s),e.name=e.name.replaceAll("[["+i+"]]",a);e.refs.push(...Array.from(r.values()))}}function km(e,t){return du(e,!0).map(n=>[n,n.split("|").map(r=>r.trim())]).filter(n=>n[1][0]!=="").map(n=>{const r=n[1],i=r[0],s=r[1],a=Dm(i,t),l=s!==void 0&&s.trim()!==""?"["+s.trim()+"]([["+a+"]])":"[["+a+"]]";return[n[0],a,l]})}function Sm(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function Em(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function Dm(e,t){const n=Sm(e);switch(Em(n)){case 0:return Tm(n[0],t);case 2:return hm(n,t);case 1:return xm(n,t);default:throw"Invalid link type detected: "+n}}function Tm(e,t){return t.defaultLinkTracker.accessAsLink(e,r=>(Zr(t.summary),{uid:r!=null?r:t.idGenerator(),obsidianLink:e,type:1}),t.dailyNoteFormat).uid}function Jl(e,t,n,r){const[i,s]=_m(n);return s?[mm([e,s],t,r),i]:[Wt(r),n]}function Am(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,s=>(Zr(n.summary),{uid:s!=null?s:n.idGenerator(),obsidianLink:r,type:0}),n.dailyNoteFormat);return i.type=0,i.uid}function Om(e){const t=[];for(const n of e.getData())n.type===Xl.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function Rm(e){return[...e.invalidLinks,...Om(e.defaultLinkTracker),...pm(e.blockLinkTracker)]}function Mm(e,t,n){const r=Rm(n).sort((a,l)=>a.link.localeCompare(l.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:Wt(n),name:i,createdAt:t,editedAt:t,type:"node"};return zl(n.summary),s.children=r,s}function ks(e){return e===" "||e===" "}function Zn(e,t){let n=0;for(;ks(e[t+n]);)n++;return n}function Im(e,t){let n=t,r=e[t];for(;ks(r);)n--,r=e[n];return n+1}function Ut(e,t){let n=0;for(;!Ss(e[t+n]);)n++;return t+n}function Ql(e,t){const n=e[t-1];return Ss(n)}function Ss(e){return e===void 0||e===` +`}function ec(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function Es(e,t){let n=!0;const r=t+Zn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ec(e,r));const a=Im(e,r-1)-1,l=e[a];return Ss(l)&&n?{type:ft.BULLET,level:r-a-1}:null}function Fm(e,t,n){let r=t+n.level;if(ec(e,r))return r;r+=1+1;const i=Zn(e,r);return r+i}function Lm(e,t,n){let r=Ut(e,t+n.level+1+1),i=e[r];for(;;){const s=Zn(e,r+1);if(s==n.level+2&&!Es(e,r+1+s))r=Ut(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Cm(e,t){return e+t.level}function Nm(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=Zn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function tc(e,t){if(!Ql(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=Ut(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],l=e[i+2];for(;[s,a,l].every(d=>d!==void 0)&&[s,a,l].join("")!=="```";)i++,s=e[i],a=e[i+1],l=e[i+2];if([s,a,l].some(d=>d===void 0))return null;const o=Ut(e,i+3);return e.slice(i+3,o).trim()!==""?null:{type:ft.CODEBLOCK,level:o-t+(e[o]===` +`?1:0),codeLanguage:r!==""?r:void 0}}return null}function Pm(e,t){return Ut(e,t)}function nc(e,t){const n=Ut(e,t),r=e.slice(t,n);return rc(r)?{type:ft.DATAVIEWATTRIBUTE,level:0}:null}function rc(e){const t=e.split("::");return t.length===2&&t[0].trim()===t[0]&&t[0]!==""&&t[1]!==""&&t[1]!==" "&&ks(t[1][0])}function ic(e,t){if(!Ql(e,t))return null;const n=Um(e,t);return n>0&&e[t+n]===" "?{type:ft.HEADING,level:n}:null}function Um(e,t){let n=t,r=0;for(;e[n]==="#";)n++,r++;return r}function Ym(e,t,n){const r=t+n.level+1,i=Zn(e,r);return r+i}function Wm(e,t,n){return Ut(e,t+n.level+1)}function Hm(e,t){let n=Ut(e,t),r=e[n],i=r;for(n++,r=e[n];;){if(r===void 0)return[n];if(r===` +`&&i===` +`)return[n-1];{const s=jm(e,n);if(s)return[n-1,s]}i=r,n++,r=e[n]}}function jm(e,t){let n=ic(e,t);return n||(n=nc(e,t),n)||(n=Es(e,t),n)||(n=tc(e,t),n)?n:null}var ft=(e=>(e.ROOT="Root",e.HEADING="Heading",e.BULLET="Bullet Node",e.PARAGRAPH="Paragraph",e.CODEBLOCK="Code Block",e.DATAVIEWATTRIBUTE="Data View Attribute",e))(ft||{});function Bm(e,t=0){const n=[];for(let r=t;rXm(i,t,n,r))))}function Xm(e,t,n,r){let i=e;r&&(i=Km(e));let s=t.get(i);return s===void 0&&(s=n(),t.set(i,s)),s}function Jm(e){return Array.from(e.entries()).map(t=>({name:t[0],uid:t[1]}))}function Qm(e){if(e.startsWith("[ ] "))return"todo";if(e.startsWith("[x] ")||e.startsWith("[X] "))return"done"}function ep(e,t){if(t===ft.BULLET){const n=Qm(e);if(n)return[e.slice(4),n]}return null}function tp(e){const t=[];let n=Hi(e,0);for(;n!==null;){let r;Array.isArray(n)?(t.push(n),r=n[2]):r=n,n=Hi(e,r)}return t}function Hi(e,t){let n,r="",i="";for(let s=t;s{const f=o[0],d=o[1];if(i.every(u=>f.trim()!==u.name||d.trim()!==u.mediaUrl)){const u=o[3],p=Wt(n);s.add(p),e.name=e.name.replaceAll(u,"[["+p+"]]"),i.push({uid:p,name:f.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:d.trim()})}}),s.size>0&&(e.refs=[...(a=e.refs)!=null?a:[],...Array.from(s.values())]),e.children=[...(l=e.children)!=null?l:[],...i]}function oc(e,t,n,r,i,s){var u;const[a,l]=(u=ep(r.name,s))!=null?u:[r.name,void 0];r.name=a,r.todoState=l;const[o,f]=Jl(e,t,r.name,i);r.uid=o,r.name=f,r.name=r.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=$m(r.name);if(d){const p=d[d.length-1];r.name.endsWith(p)&&(r.name=r.name.slice(0,-p.length)),r.supertags=sc(d,i.superTagTracker,i.idGenerator,!0)}return vm(r,i),rp(r,n,i),r}function lc(e,t,n,r,i,s,a,l){let o=l;return r&&r.length>0&&(o=l!=null?l:[],o==null||o.push(...r.map(f=>oc(e,t,i,{name:f,type:"node",createdAt:i,editedAt:i},s)))),sp(n,s.attributes),s.summary.fields++,{uid:a!=null?a:Wt(s),name:n,type:"field",createdAt:i,editedAt:i,children:o}}function ip(e,t,n,r,i){return lc(e,t,n.key,n.values,r,i)}function sp(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function ap(e,t,n){return{uid:Wt(n),name:Nm(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function op(e,t,n,r,i){if(n.type===ft.DATAVIEWATTRIBUTE||rc(n.content)){const[s,a]=Jl(e,t,n.content,i),l=a.split("::");return lc(e,t,l[0],[l[1].trim()],r,i,s)}}function lp(e,t,n,r,i){if(n.type===ft.CODEBLOCK)return ap(n,r,i);const s=op(e,t,n,r,i);return s||oc(e,t,r,{name:n.content,createdAt:r,editedAt:r,type:"node"},i,n.type)}function cp(e){if(e.startsWith(`--- +`)){const t=e.indexOf(` +--- +`);if(t!==-1)return[dp(e.slice(4,t)),t+5]}return null}function dp(e){const t=e.split(` +`).map(r=>r.trim()).filter(r=>r!==""),n=[];for(let r=0;ra.trim()).filter(a=>a!=="");if(!(s[0]==="publish"||s[0]==="cssclass"||s[0]==="aliases"))if(s.length===2)if(s[1].startsWith("[")&&s[1].endsWith("]")){const a=s[1].slice(1,-1).split(",").map(l=>l.trim()).filter(l=>l!=="");n.push({key:s[0],values:a})}else n.push({key:s[0],values:[s[1]]});else{const a={key:s[0],values:[]};let l=1,o=t[r+l];for(;o!==void 0&&o.startsWith("- ");)a.values.push(o.slice(2)),l++,o=t[r+l];r+=l-1,n.push(a)}}return n}function fp(e,t,n,r,i=Date.now()){var p;const[s,a]=(p=cp(n))!=null?p:[[],0];let l=Bm(n,a),o=e;const f=l[0]&&l[0].content.match(/^title::(.+)$/);f&&(o=f[1],l=l.slice(1)),l[0]&&l[0].content.replace(/^#+/,"").trim()===o.trim()&&(l=l.slice(1));const d=[],u=up(o,t,i,r,s);return $l(u,{type:ft.ROOT,level:-1},l,qm,w=>lp(e,t,w,i,r),(w,D)=>{D.type===ft.HEADING&&d.push({...D,uid:w.uid})}),l=null,r.headingTracker.pathMap.set(t,d),r.headingTracker.nameMap.get(e)||r.headingTracker.nameMap.set(e,d),u}function up(e,t,n,r,i){let s;const a=[];i.forEach(d=>{d.key==="tags"?s=sc(d.values,r.superTagTracker,r.idGenerator):a.push(ip(e,t,d,n,r))});const l=Am(e,t,r);let o="node";const f=Wi(e,r.dailyNoteFormat);return f&&(o="date",e=f,r.summary.calendarNodes++),{uid:l,name:e,createdAt:n,editedAt:n,type:o,supertags:s,children:a.length>0?a:void 0}}function Wa(e,t){return e===t.length-1?"LAST":"NOT_LAST"}function hp(e,t){return e.adapter.readDirectory(t).filter(n=>{const r=t+Fr+n.getName();return n.isDirectory()&&!r.endsWith(".github")&&!r.endsWith(".obsidian")||!n.isDirectory()&&r.endsWith(".md")}).sort((n,r)=>n.getName().localeCompare(r.getName())).sort((n,r)=>Number(n.isDirectory())-Number(r.isDirectory()))}async function cc(e,t,n,r,i,s="LAST"){n(t);const a=hp(e,t);for(let l=0;l{const i=Ir(r),s=Wt(n);n.adapter.appendToResultFile(e,`{ "uid": "${s}", "name": "${i}", "createdAt": ${t}, @@ -30,20 +30,20 @@ L.version="2.29.4";d0(oe);L.fn=M;L.min=Xh;L.max=Jh;L.now=Qh;L.utc=ut;L.unix=Tm;L "type": "node", "children": [ `)}}function pp(e,t){return n=>{e.adapter.appendToResultFile(t,`] - }`),n!=="LAST"&&e.adapter.appendToResultFile(t,",")}}function _p(e,t,n){return async(r,i)=>{const s=r.slice(n.vaultPath.length+1,-3),a=dp(Ir(r).replace(".md",""),s,await n.adapter.readFile(r),n,t);n.adapter.appendToResultFile(e,JSON.stringify(a,null,2)),i!=="LAST"&&n.adapter.appendToResultFile(e,",")}}async function wp(e,t=Date.now()){await e.adapter.initReadingVault(),await gp(e);const n=`${e.vaultPath}.tif.json`;try{e.adapter.removeFile(n)}catch{}e.adapter.appendToResultFile(n,`{ + }`),n!=="LAST"&&e.adapter.appendToResultFile(t,",")}}function _p(e,t,n){return async(r,i)=>{const s=r.slice(n.vaultPath.length+1,-3),a=fp(Ir(r).replace(".md",""),s,await n.adapter.readFile(r),n,t);n.adapter.appendToResultFile(e,JSON.stringify(a,null,2)),i!=="LAST"&&n.adapter.appendToResultFile(e,",")}}async function wp(e,t=Date.now()){await e.adapter.initReadingVault(),await gp(e);const n=`${e.vaultPath}.tif.json`;try{e.adapter.removeFile(n)}catch{}e.adapter.appendToResultFile(n,`{ "version": "TanaIntermediateFile V0.1", "nodes": [ -`),await lc(e,e.vaultPath,mp(n,t,e),pp(e,n),_p(n,t,e)),e.adapter.flushResultsFromInitialProcessing(n),nl(e.summary),await yu(n,e);const r=Ru(Ir(e.vaultPath),t,e);r&&e.adapter.appendToResultFile(n,", "+JSON.stringify(r,null,2)),e.adapter.appendToResultFile(n,` - ]`);const i=Xu(e.superTagTracker);return i.length>0&&e.adapter.appendToResultFile(n,`, +`),await cc(e,e.vaultPath,mp(n,t,e),pp(e,n),_p(n,t,e)),e.adapter.flushResultsFromInitialProcessing(n),zl(e.summary),await bm(n,e);const r=Mm(Ir(e.vaultPath),t,e);r&&e.adapter.appendToResultFile(n,", "+JSON.stringify(r,null,2)),e.adapter.appendToResultFile(n,` + ]`);const i=Jm(e.superTagTracker);return i.length>0&&e.adapter.appendToResultFile(n,`, "supertags": `+JSON.stringify(i,null,2)),e.attributes.length>0&&e.adapter.appendToResultFile(n,`, "attributes": `+JSON.stringify(e.attributes,null,2)),e.adapter.appendToResultFile(n,`, "summary": `+JSON.stringify(e.summary,null,2)),e.adapter.appendToResultFile(n,` -}`),e.adapter.flushResultsFromInitialProcessing(n),e.summary}async function gp(e){const t=await au(e,"daily-notes",n=>n||{format:"YYYY-MM-DD"});e.dailyNoteFormat=t.format,console.log("Using daily notes format "+t.format+" for detecting calendar nodes.")}async function xp(e,t,n,r){const i=new ou(e),s=fu(t,i,r);return wp(s,n).then(a=>[a,s,i])}const yp=document.getElementById("vault-zip");yp.addEventListener("change",async e=>{let t,n=0;try{const r=e.target.files[0],i=r.name.slice(0,r.name.indexOf(".zip"));t=document.createElement("b"),t.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(t);const s=setInterval(()=>n++,1e3),[a,,l]=await xp(r,i,Date.now());clearInterval(s),document.body.removeChild(t);const o=document.createElement("b");o.innerHTML="Success! And it only took "+n+" seconds.
",document.body.appendChild(o);const f=document.createElement("h2");f.innerText="Summary:",document.body.appendChild(f);const d=document.createElement("p");d.innerText=Object.entries(a).map(w=>w[0]+": "+w[1]).join(` +}`),e.adapter.flushResultsFromInitialProcessing(n),e.summary}async function gp(e){const t=await ou(e,"daily-notes",n=>n||{format:"YYYY-MM-DD"});e.dailyNoteFormat=t.format,console.log("Using daily notes format "+t.format+" for detecting calendar nodes.")}async function xp(e,t,n,r){const i=new lu(e),s=um(t,i,r);return wp(s,n).then(a=>[a,s,i])}const yp=document.getElementById("vault-zip");yp.addEventListener("change",async e=>{let t,n=0;try{const r=e.target.files[0],i=r.name.slice(0,r.name.indexOf(".zip"));t=document.createElement("b"),t.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(t);const s=setInterval(()=>n++,1e3),[a,,l]=await xp(r,i,Date.now());clearInterval(s),document.body.removeChild(t);const o=document.createElement("b");o.innerHTML="Success! And it only took "+n+" seconds.
",document.body.appendChild(o);const f=document.createElement("h2");f.innerText="Summary:",document.body.appendChild(f);const d=document.createElement("p");d.innerText=Object.entries(a).map(w=>w[0]+": "+w[1]).join(` `),document.body.appendChild(d);const u=l.getResult(),p=document.createElement("button");p.innerText="Download TIF File",p.addEventListener("click",()=>{const w=URL.createObjectURL(new Blob([u])),D=document.createElement("a");D.style.display="none",D.href=w,D.download=i+".tif.json",document.body.appendChild(D),D.click(),URL.revokeObjectURL(w)}),document.body.appendChild(p)}catch(r){console.trace(r),t&&document.body.removeChild(t);const i=r.stack.toString();document.body.appendChild(document.createElement("br"));const s=document.createElement("b");if(s.innerText="An Error occured.",document.body.appendChild(s),i.toLowerCase().includes("readdirectory")){document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const l=document.createElement("b");l.innerText=`It probably has to do with a not properly zipped vault. Please check the text at the top again.`,document.body.appendChild(l)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack): `+i,document.body.appendChild(a)}}); -//# sourceMappingURL=index.cf56bcf7.js.map +//# sourceMappingURL=index.9421258c.js.map diff --git a/docs/assets/index.9421258c.js.map b/docs/assets/index.9421258c.js.map new file mode 100644 index 0000000..09f2a63 --- /dev/null +++ b/docs/assets/index.9421258c.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.9421258c.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: tags are too naive! ()\nexport function detectTags(content: string) {\n return content.match(tagRegex);\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tag without losing meaning because it will show up as a super tag anyways\n const lastTag = tags[tags.length - 1];\n if (tanaNode.name.endsWith(lastTag)) {\n tanaNode.name = tanaNode.name.slice(0, -lastTag.length);\n }\n\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","detectTags","cleanUpTag","tag","superTagUidRequests","tags","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","lastTag","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAAU,YAAc,OAExBA,EAAU,YAAc,cACrBA,CACV,CACD,SAASN,EAAeD,EAAM,CAC1B,GAAIA,EAAK,GAEL,OACJA,EAAK,GAAK,GAEV,MAAMO,EAAYF,EAAaL,CAAI,EACnC,MAAMA,EAAK,KAAMO,CAAS,CAC7B,CACL,KCHA,MAAMC,GAAW,GACXC,GAAU,GACVC,GAAW,GAEXC,GAAe,GACfC,GAAW,IACXC,GAAWD,GAAW,EA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YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file diff --git a/docs/assets/index.cf56bcf7.js.map b/docs/assets/index.cf56bcf7.js.map deleted file mode 100644 index b62446c..0000000 --- a/docs/assets/index.cf56bcf7.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.cf56bcf7.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: () => Data) {\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData();\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: () => Data) {\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData();\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(fileName, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(fileName, filePath, () => {\n return new Map();\n });\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(obsidianLink, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n });\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(obsidianLink, filePath, () => {\n incrementSummary(context.summary);\n const uid = context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n });\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: tags are too naive! ()\nexport function detectTags(content: string) {\n return content.match(tagRegex);\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tag without losing meaning because it will show up as a super tag anyways\n const lastTag = tags[tags.length - 1];\n if (tanaNode.name.endsWith(lastTag)) {\n tanaNode.name = tanaNode.name.slice(0, -lastTag.length);\n }\n\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport moment from 'moment';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n let nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeUid = dateDisplayName;\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n\nfunction dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return null;\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","dailyNoteFormat","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","alias","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","pos","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","detectTags","cleanUpTag","tag","superTagUidRequests","tags","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","lastTag","keyValToFieldNode","values","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","displayName","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","dateStringToDateUID","moment","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAAU,YAAc,OAExBA,EAAU,YAAc,cACrBA,CACV,CACD,SAASN,EAAeD,EAAM,CAC1B,GAAIA,EAAK,GAEL,OACJA,EAAK,GAAK,GAEV,MAAMO,EAAYF,EAAaL,CAAI,EACnC,MAAMA,EAAK,KAAMO,CAAS,CAC7B,CACL,KCHA,MAAMC,GAAW,GACXC,GAAU,GACVC,GAAW,GAEXC,GAAe,GACfC,GAAW,IACXC,GAAWD,GAAW,EAAID,GAC1BG,GAAa,EAAID,GAAU,EAE3BE,GAAY,IAGZC,GAAc,EAGdC,GAAU,GAGVC,GAAY,GAGZC,GAAc,GAMdC,GAAW,EAAI,EAGfC,GAAwB,GAGxBC,GAAa,EACbC,GAAiB,EACjBC,GAAqB,EAErBC,GAAa,EACbC,GAAkB,EAClBC,GAAe,EACfC,GAAW,EAEX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AK,YAAY54D,CAAC,EAC3BA,EAAE,MAAM,EACR,IAAI,gBAAgB2nB,CAAG,CAAA,CACxB,EACQ,SAAA,KAAK,YAAY0xC,CAAc,QACjC50C,GACP,QAAQ,MAAMA,CAAK,EAEfs0C,GACO,SAAA,KAAK,YAAYA,CAAQ,EAI9B,MAAAO,EAAoB70C,EAAc,MAAM,SAAS,EAEvD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAA80C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 7162135..96d09e5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

From c89444e4e2375ceaf4323ccf3c22e807af1d3354 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sun, 30 Oct 2022 22:57:01 +0100 Subject: [PATCH 84/94] Obsidian: added log for empty data view attribute bug --- docs/assets/{index.9421258c.js => index.8c4d8d7f.js} | 4 ++-- docs/assets/{index.9421258c.js.map => index.8c4d8d7f.js.map} | 2 +- docs/index.html | 2 +- src/converters/obsidian/tanaconversion/nodeConversion.ts | 5 +++++ 4 files changed, 9 insertions(+), 4 deletions(-) rename docs/assets/{index.9421258c.js => index.8c4d8d7f.js} (99%) rename docs/assets/{index.9421258c.js.map => index.8c4d8d7f.js.map} (68%) diff --git a/docs/assets/index.9421258c.js b/docs/assets/index.8c4d8d7f.js similarity index 99% rename from docs/assets/index.9421258c.js rename to docs/assets/index.8c4d8d7f.js index dd7f55c..8acdc17 100644 --- a/docs/assets/index.9421258c.js +++ b/docs/assets/index.8c4d8d7f.js @@ -18,7 +18,7 @@ L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L `)continue;let[s,a,l]=Ya(e,r);for(s.content.trim()!==""&&n.push(s);l;){for(;e[a]===` `;)a++;[s,a,l]=Ya(e,a),s.content.trim()!==""&&n.push(s)}r=a-1}return n}function Ya(e,t){const n=Vm(e,t),r=Gm(e,t,n),[i,s]=Zm(e,t,n);return[{...n,content:e.slice(r,i).trimEnd()},i,s]}function Vm(e,t){let n=ic(e,t);return n||(n=Es(e,t),n||(n=tc(e,t),n)||(n=nc(e,t),n)?n:{type:"Paragraph",level:0})}function Gm(e,t,n){switch(n.type){case"Heading":return Ym(e,t,n);case"Bullet Node":return Fm(e,t,n);case"Paragraph":return t;case"Code Block":return t;case"Data View Attribute":return t;default:throw"Unsupported HierarchyType detected: "+n}}function Zm(e,t,n){switch(n.type){case"Heading":return[Wm(e,t,n)];case"Bullet Node":return[Lm(e,t,n)];case"Paragraph":return Hm(e,t);case"Code Block":return[Cm(t,n)];case"Data View Attribute":return[Pm(e,t)];default:throw"Unsupported HierarchyType detected: "+n}}function qm(e,t){return e.type==="Root"||e.type==="Heading"&&t.type!=="Heading"?!0:e.type==="Paragraph"||t.type==="Paragraph"||e.type==="Code Block"||t.type==="Code Block"||e.type==="Data View Attribute"||t.type==="Data View Attribute"?!1:e.type===t.type?e.levelXm(i,t,n,r))))}function Xm(e,t,n,r){let i=e;r&&(i=Km(e));let s=t.get(i);return s===void 0&&(s=n(),t.set(i,s)),s}function Jm(e){return Array.from(e.entries()).map(t=>({name:t[0],uid:t[1]}))}function Qm(e){if(e.startsWith("[ ] "))return"todo";if(e.startsWith("[x] ")||e.startsWith("[X] "))return"done"}function ep(e,t){if(t===ft.BULLET){const n=Qm(e);if(n)return[e.slice(4),n]}return null}function tp(e){const t=[];let n=Hi(e,0);for(;n!==null;){let r;Array.isArray(n)?(t.push(n),r=n[2]):r=n,n=Hi(e,r)}return t}function Hi(e,t){let n,r="",i="";for(let s=t;s{const f=o[0],d=o[1];if(i.every(u=>f.trim()!==u.name||d.trim()!==u.mediaUrl)){const u=o[3],p=Wt(n);s.add(p),e.name=e.name.replaceAll(u,"[["+p+"]]"),i.push({uid:p,name:f.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:d.trim()})}}),s.size>0&&(e.refs=[...(a=e.refs)!=null?a:[],...Array.from(s.values())]),e.children=[...(l=e.children)!=null?l:[],...i]}function oc(e,t,n,r,i,s){var u;const[a,l]=(u=ep(r.name,s))!=null?u:[r.name,void 0];r.name=a,r.todoState=l;const[o,f]=Jl(e,t,r.name,i);r.uid=o,r.name=f,r.name=r.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=$m(r.name);if(d){const p=d[d.length-1];r.name.endsWith(p)&&(r.name=r.name.slice(0,-p.length)),r.supertags=sc(d,i.superTagTracker,i.idGenerator,!0)}return vm(r,i),rp(r,n,i),r}function lc(e,t,n,r,i,s,a,l){let o=l;return r&&r.length>0&&(o=l!=null?l:[],o==null||o.push(...r.map(f=>oc(e,t,i,{name:f,type:"node",createdAt:i,editedAt:i},s)))),sp(n,s.attributes),s.summary.fields++,{uid:a!=null?a:Wt(s),name:n,type:"field",createdAt:i,editedAt:i,children:o}}function ip(e,t,n,r,i){return lc(e,t,n.key,n.values,r,i)}function sp(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function ap(e,t,n){return{uid:Wt(n),name:Nm(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function op(e,t,n,r,i){if(n.type===ft.DATAVIEWATTRIBUTE||rc(n.content)){const[s,a]=Jl(e,t,n.content,i),l=a.split("::");return lc(e,t,l[0],[l[1].trim()],r,i,s)}}function lp(e,t,n,r,i){if(n.type===ft.CODEBLOCK)return ap(n,r,i);const s=op(e,t,n,r,i);return s||oc(e,t,r,{name:n.content,createdAt:r,editedAt:r,type:"node"},i,n.type)}function cp(e){if(e.startsWith(`--- +`)return n;if(!s&&o==="("){s=o;continue}if(s==="("&&o!==")"){a+=o;continue}if(s==="("&&o===")")return a.startsWith("http://")||a.startsWith("https://")?[n[0],ac(a),l+1,"[!["+n[0]+"]("+n[1]+")]("+a+")"]:n}}return n}function ac(e){return e.split(" ")[0].split(" ")[0]}function rp(e,t,n){var a,l;const r=tp(e.name);if(r.length===0)return;if(r.length===1){const o=r[0];e.type="image",e.mediaUrl=o[1].trim(),e.name=e.name.replace(o[3],o[0].trim());return}const i=[],s=new Set;r.forEach(o=>{const f=o[0],d=o[1];if(i.every(u=>f.trim()!==u.name||d.trim()!==u.mediaUrl)){const u=o[3],p=Wt(n);s.add(p),e.name=e.name.replaceAll(u,"[["+p+"]]"),i.push({uid:p,name:f.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:d.trim()})}}),s.size>0&&(e.refs=[...(a=e.refs)!=null?a:[],...Array.from(s.values())]),e.children=[...(l=e.children)!=null?l:[],...i]}function oc(e,t,n,r,i,s){var u;const[a,l]=(u=ep(r.name,s))!=null?u:[r.name,void 0];r.name=a,r.todoState=l;const[o,f]=Jl(e,t,r.name,i);r.uid=o,r.name=f,r.name=r.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=$m(r.name);if(d){const p=d[d.length-1];r.name.endsWith(p)&&(r.name=r.name.slice(0,-p.length)),r.supertags=sc(d,i.superTagTracker,i.idGenerator,!0)}return vm(r,i),rp(r,n,i),r}function lc(e,t,n,r,i,s,a,l){let o=l;return r&&r.length>0&&(o=l!=null?l:[],o==null||o.push(...r.map(f=>oc(e,t,i,{name:f,type:"node",createdAt:i,editedAt:i},s)))),sp(n,s.attributes),s.summary.fields++,{uid:a!=null?a:Wt(s),name:n,type:"field",createdAt:i,editedAt:i,children:o}}function ip(e,t,n,r,i){return lc(e,t,n.key,n.values,r,i)}function sp(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function ap(e,t,n){return{uid:Wt(n),name:Nm(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function op(e,t,n,r,i){if(n.type===ft.DATAVIEWATTRIBUTE||rc(n.content)){const[s,a]=Jl(e,t,n.content,i),l=a.split("::");return l[1]===void 0&&console.log(n.content,a,l),lc(e,t,l[0],[l[1].trim()],r,i,s)}}function lp(e,t,n,r,i){if(n.type===ft.CODEBLOCK)return ap(n,r,i);const s=op(e,t,n,r,i);return s||oc(e,t,r,{name:n.content,createdAt:r,editedAt:r,type:"node"},i,n.type)}function cp(e){if(e.startsWith(`--- `)){const t=e.indexOf(` --- `);if(t!==-1)return[dp(e.slice(4,t)),t+5]}return null}function dp(e){const t=e.split(` @@ -46,4 +46,4 @@ L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L Please check the text at the top again.`,document.body.appendChild(l)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack): `+i,document.body.appendChild(a)}}); -//# sourceMappingURL=index.9421258c.js.map +//# sourceMappingURL=index.8c4d8d7f.js.map diff --git a/docs/assets/index.9421258c.js.map b/docs/assets/index.8c4d8d7f.js.map similarity index 68% rename from docs/assets/index.9421258c.js.map rename to docs/assets/index.8c4d8d7f.js.map index 09f2a63..74d37c1 100644 --- a/docs/assets/index.9421258c.js.map +++ b/docs/assets/index.8c4d8d7f.js.map @@ -1 +1 @@ -{"version":3,"file":"index.9421258c.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: tags are too naive! ()\nexport function detectTags(content: string) {\n return content.match(tagRegex);\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tag without losing meaning because it will show up as a super tag anyways\n const lastTag = tags[tags.length - 1];\n if (tanaNode.name.endsWith(lastTag)) {\n tanaNode.name = tanaNode.name.slice(0, -lastTag.length);\n }\n\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","detectTags","cleanUpTag","tag","superTagUidRequests","tags","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","lastTag","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAAU,YAAc,OAExBA,EAAU,YAAc,cACrBA,CACV,CACD,SAASN,EAAeD,EAAM,CAC1B,GAAIA,EAAK,GAEL,OACJA,EAAK,GAAK,GAEV,MAAMO,EAAYF,EAAaL,CAAI,EACnC,MAAMA,EAAK,KAAMO,CAAS,CAC7B,CACL,KCHA,MAAMC,GAAW,GACXC,GAAU,GACVC,GAAW,GAEXC,GAAe,GACfC,GAAW,IACXC,GAAWD,GAAW,EAAID,GAC1BG,GAAa,EAAID,GAAU,EAE3BE,GAAY,IAGZC,GAAc,EAGdC,GAAU,GAGVC,GAAY,GAGZC,GAAc,GAMdC,GAAW,EAAI,EAGfC,GAAwB,GAGxB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AA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file +{"version":3,"file":"index.8c4d8d7f.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: tags are too naive! ()\nexport function detectTags(content: string) {\n return content.match(tagRegex);\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tag without losing meaning because it will show up as a super tag anyways\n const lastTag = tags[tags.length - 1];\n if (tanaNode.name.endsWith(lastTag)) {\n tanaNode.name = tanaNode.name.slice(0, -lastTag.length);\n }\n\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","detectTags","cleanUpTag","tag","superTagUidRequests","tags","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","lastTag","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iB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IAAM,CACvC,MAAA3xC,EAAM,IAAI,gBAAgB,IAAI,KAAK,CAAC9X,CAAM,CAAC,CAAC,EAC5C7P,EAAI,SAAS,cAAc,GAAG,EACpCA,EAAE,MAAM,QAAU,OAClBA,EAAE,KAAO2nB,EACT3nB,EAAE,SAAW64D,EAAY,YAChB,SAAA,KAAK,YAAY74D,CAAC,EAC3BA,EAAE,MAAM,EACR,IAAI,gBAAgB2nB,CAAG,CAAA,CACxB,EACQ,SAAA,KAAK,YAAY2xC,CAAc,QACjC70C,GACP,QAAQ,MAAMA,CAAK,EAEfu0C,GACO,SAAA,KAAK,YAAYA,CAAQ,EAI9B,MAAAO,EAAoB90C,EAAc,MAAM,SAAS,EAEvD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAA+0C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 96d09e5..3e521df 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

diff --git a/src/converters/obsidian/tanaconversion/nodeConversion.ts b/src/converters/obsidian/tanaconversion/nodeConversion.ts index c5dd49d..7e1283a 100644 --- a/src/converters/obsidian/tanaconversion/nodeConversion.ts +++ b/src/converters/obsidian/tanaconversion/nodeConversion.ts @@ -31,6 +31,11 @@ function convertDataViewAttribute( if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) { const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context); const splitName = content.split('::'); + //empty data view nodes + //TODO: not sure how that happens? + if (splitName[1] === undefined) { + console.log(obsidianNode.content, content, splitName); + } return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid); } } From 73579f80feb2bac5b919eb4ec086479b27b8b0e8 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 31 Oct 2022 20:30:48 +0100 Subject: [PATCH 85/94] Obsidian: support block ids in multiline content --- docs/assets/{index.8c4d8d7f.js => index.7e3a4e90.js} | 4 ++-- .../{index.8c4d8d7f.js.map => index.7e3a4e90.js.map} | 2 +- docs/index.html | 2 +- src/converters/obsidian/markdown/blockIds.ts | 2 ++ src/converters/obsidian/tests/blockIds.test.ts | 9 +++++++++ 5 files changed, 15 insertions(+), 4 deletions(-) rename docs/assets/{index.8c4d8d7f.js => index.7e3a4e90.js} (99%) rename docs/assets/{index.8c4d8d7f.js.map => index.7e3a4e90.js.map} (63%) create mode 100644 src/converters/obsidian/tests/blockIds.test.ts diff --git a/docs/assets/index.8c4d8d7f.js b/docs/assets/index.7e3a4e90.js similarity index 99% rename from docs/assets/index.8c4d8d7f.js rename to docs/assets/index.7e3a4e90.js index 8acdc17..9f7e97f 100644 --- a/docs/assets/index.8c4d8d7f.js +++ b/docs/assets/index.7e3a4e90.js @@ -9,7 +9,7 @@ var rl;function L(){return rl.apply(null,arguments)}function fu(e){rl=e}function Arguments: `+Array.prototype.slice.call(r).join("")+` `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Ca={};function al(e,t){L.deprecationHandler!=null&&L.deprecationHandler(e,t),Ca[e]||(sl(t),Ca[e]=!0)}L.suppressDeprecationWarnings=!1;L.deprecationHandler=null;function ht(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function hu(e){var t,n;for(n in e)te(e,n)&&(t=e[n],ht(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Li(e,t){var n=Lt({},e),r;for(r in t)te(t,r)&&($t(e[r])&&$t(t[r])?(n[r]={},Lt(n[r],e[r]),Lt(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)te(e,r)&&!te(t,r)&&$t(e[r])&&(n[r]=Lt({},n[r]));return n}function as(e){e!=null&&this.set(e)}var Ci;Object.keys?Ci=Object.keys:Ci=function(e){var t,n=[];for(t in e)te(e,t)&&n.push(t);return n};var mu={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function pu(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return ht(r)?r.call(t,n):r}function dt(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var os=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,di={},fn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(fn[e]=i),t&&(fn[t[0]]=function(){return dt(i.apply(this,arguments),t[1],t[2])}),n&&(fn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function _u(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function wu(e){var t=e.match(os),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var gu={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function xu(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(os).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var yu="Invalid date";function bu(){return this._invalidDate}var vu="%d",ku=/\d{1,2}/;function Su(e){return this._ordinal.replace("%d",e)}var Eu={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Du(e,t,n,r){var i=this._relativeTime[n];return ht(i)?i(e,t,n,r):i.replace(/%d/i,e)}function Tu(e,t){var n=this._relativeTime[e>0?"future":"past"];return ht(n)?n(t):n.replace(/%s/i,t)}var Rn={};function Oe(e,t){var n=e.toLowerCase();Rn[n]=Rn[n+"s"]=Rn[t]=e}function Ke(e){return typeof e=="string"?Rn[e]||Rn[e.toLowerCase()]:void 0}function ls(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var ll={};function Re(e,t){ll[e]=t}function Au(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:ll[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Cr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function pn(e,t){return function(n){return n!=null?(cl(this,e,n),L.updateOffset(this,t),this):br(this,e)}}function br(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function cl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Cr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Hr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ou(e){return e=Ke(e),ht(this[e])?this[e]():this}function Ru(e,t){if(typeof e=="object"){e=ls(e);var n=Au(e),r,i=n.length;for(r=0;r68?1900:2e3)};var xl=pn("FullYear",!0);function $u(){return Cr(this.year())}function Ku(e,t,n,r,i,s,a){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,i,s,a),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,i,s,a),l}function Nn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Nn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function yl(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),l=1+7*(t-1)+s+a,o,f;return l<=0?(o=e-1,f=Mn(o)+l):l>Mn(e)?(o=e+1,f=l-Mn(e)):(o=e,f=l),{year:o,dayOfYear:f}}function Pn(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+vt(a,t,n)):i>vt(e.year(),t,n)?(s=i-vt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function vt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(Mn(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Oe("week","w");Oe("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Gn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function Xu(e){return Pn(e,this._week.dow,this._week.doy).week}var Ju={dow:0,doy:6};function Qu(){return this._week.dow}function e0(){return this._week.doy}function t0(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function n0(e){var t=Pn(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Oe("day","d");Oe("weekday","e");Oe("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Gn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Gn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function r0(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function i0(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function fs(e,t){return e.slice(t,7).concat(e.slice(0,t))}var s0="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),a0="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),o0=Vn,l0=Vn,c0=Vn;function d0(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?fs(n,this._week.dow):e?n[e.day()]:n}function f0(e){return e===!0?fs(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function u0(e){return e===!0?fs(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function h0(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ut([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function m0(e,t,n){var r,i,s;if(this._weekdaysParseExact)return h0.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ut([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function p0(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=r0(e,this.localeData()),this.add(e-t,"d")):t}function _0(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function w0(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=i0(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function g0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=o0),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function x0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=l0),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function y0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=c0),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function us(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,l,o,f;for(s=0;s<7;s++)a=ut([2e3,1]).day(s),l=je(this.weekdaysMin(a,"")),o=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(l),n.push(o),r.push(f),i.push(l),i.push(o),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function hs(){return this.hours()%12||12}function b0(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,hs);H("k",["kk",2],0,b0);H("hmm",0,0,function(){return""+hs.apply(this)+dt(this.minutes(),2)});H("hmmss",0,0,function(){return""+hs.apply(this)+dt(this.minutes(),2)+dt(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+dt(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+dt(this.minutes(),2)+dt(this.seconds(),2)});function vl(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}vl("a",!0);vl("A",!1);Oe("hour","h");Re("hour",13);function kl(e,t){return t._meridiemParse}C("a",kl);C("A",kl);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",ul);C("hmmss",hl);C("Hmm",ul);C("Hmmss",hl);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i))});function v0(e){return(e+"").toLowerCase().charAt(0)==="p"}var k0=/[ap]\.?m?\.?/i,S0=pn("Hours",!0);function E0(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Sl={calendar:mu,longDateFormat:gu,invalidDate:yu,ordinal:vu,dayOfMonthOrdinalParse:ku,relativeTime:Eu,months:Yu,monthsShort:ml,week:Ju,weekdays:s0,weekdaysMin:a0,weekdaysShort:bl,meridiemParse:k0},de={},Dn={},Un;function D0(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=jr(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&D0(s,r)>=n-1)break;n--}t++}return Un}function A0(e){return e.match("^[^/\\\\]*$")!=null}function jr(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&A0(e))try{t=Un._abbr,n=require,n("./locale/"+e),Pt(t)}catch{de[e]=null}return de[e]}function Pt(e,t){var n;return e&&(Ce(t)?n=St(e):n=ms(e,t),n?Un=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Un._abbr}function ms(e,t){if(t!==null){var n,r=Sl;if(t.abbr=e,de[e]!=null)al("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=jr(t.parentLocale),n!=null)r=n._config;else return Dn[t.parentLocale]||(Dn[t.parentLocale]=[]),Dn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new as(Li(r,t)),Dn[e]&&Dn[e].forEach(function(i){ms(i.name,i.config)}),Pt(e),de[e]}else return delete de[e],null}function O0(e,t){if(t!=null){var n,r,i=Sl;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Li(de[e]._config,t)):(r=jr(e),r!=null&&(i=r._config),t=Li(i,t),r==null&&(t.abbr=e),n=new as(t),n.parentLocale=de[e],de[e]=n),Pt(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Pt()&&Pt(e)):de[e]!=null&&delete de[e]);return de[e]}function St(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Un;if(!rt(e)){if(t=jr(e),t)return t;e=[e]}return T0(e)}function R0(){return Ci(de)}function ps(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[gt]<0||n[gt]>11?gt:n[ot]<1||n[ot]>Hr(n[Ae],n[gt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[xt]!==0||n[zt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[xt]<0||n[xt]>59?xt:n[zt]<0||n[zt]>999?zt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=Nu),z(e)._overflowWeekday&&t===-1&&(t=Pu),z(e).overflow=t),e}var M0=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,I0=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,F0=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],fi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],L0=/^\/?Date\((-?\d+)/i,C0=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,N0={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function El(e){var t,n,r=e._i,i=M0.exec(r)||I0.exec(r),s,a,l,o,f=ir.length,d=fi.length;if(i){for(z(e).iso=!0,t=0,n=f;tMn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Nn(a,0,e._dayOfYear),e._a[gt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[xt]===0&&e._a[zt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Nn:Ku).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function V0(e){var t,n,r,i,s,a,l,o,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=sn(t.GG,e._a[Ae],Pn(oe(),1,4).year),r=sn(t.W,1),i=sn(t.E,1),(i<1||i>7)&&(o=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Pn(oe(),s,a),n=sn(t.gg,e._a[Ae],f.year),r=sn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(o=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(o=!0)):i=s),r<1||r>vt(n,s,a)?z(e)._overflowWeeks=!0:o!=null?z(e)._overflowWeekday=!0:(l=yl(n,r,i,s,a),e._a[Ae]=l.year,e._dayOfYear=l.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function ws(e){if(e._f===L.ISO_8601){El(e);return}if(e._f===L.RFC_2822){Dl(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,l=t.length,o=0,f,d;for(i=ol(e._f,e._locale).match(os)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),o+=r.length),fn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),Cu(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=l-o,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=G0(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Ae]=e._locale.erasConvertYear(f,e._a[Ae])),_s(e),ps(e)}function G0(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Z0(e){var t,n,r,i,s,a,l=!1,o=e._f.length;if(o===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Lr()});function Ol(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function hh(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return ss(e,this),e=Tl(e),e._a?(t=e._isUTC?ut(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&ih(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function mh(){return this.isValid()?!this._isUTC:!1}function ph(){return this.isValid()?this._isUTC:!1}function Ml(){return this.isValid()?this._isUTC&&this._offset===0:!1}var _h=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,wh=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:kt(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=_h.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[xt])*i,ms:$(Pi(r[zt]*1e3))*i}):(r=wh.exec(e))?(i=r[1]==="-"?-1:1,n={y:Zt(r[2],i),M:Zt(r[3],i),w:Zt(r[4],i),d:Zt(r[5],i),h:Zt(r[6],i),m:Zt(r[7],i),s:Zt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=gh(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Br(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Br.prototype;st.invalid=rh;function Zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Pa(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function gh(e,t){var n;return e.isValid()&&t.isValid()?(t=xs(t,e),e.isBefore(t)?n=Pa(e,t):(n=Pa(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Il(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(al(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),Fl(this,i,e),this}}function Fl(e,t,n,r){var i=t._milliseconds,s=Pi(t._days),a=Pi(t._months);!e.isValid()||(r=r==null?!0:r,a&&_l(e,br(e,"Month")+a*n),s&&cl(e,"Date",br(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var xh=Il(1,"add"),yh=Il(-1,"subtract");function Ll(e){return typeof e=="string"||e instanceof String}function bh(e){return it(e)||jn(e)||Ll(e)||kt(e)||kh(e)||vh(e)||e===null||e===void 0}function vh(e){var t=$t(e)&&!rs(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ht(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ph(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function Uh(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function Yh(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Wh(e){return this.from(oe(),e)}function Hh(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function jh(e){return this.to(oe(),e)}function Cl(e){var t;return e===void 0?this._locale._abbr:(t=St(e),t!=null&&(this._locale=t),this)}var Nl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Pl(){return this._locale}var Sr=1e3,un=60*Sr,Er=60*un,Ul=(365*400+97)*24*Er;function hn(e,t){return(e%t+t)%t}function Yl(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Ul:new Date(e,t,n).valueOf()}function Wl(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Ul:Date.UTC(e,t,n)}function Bh(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Wl:Yl,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hn(t+(this._isUTC?0:this.utcOffset()*un),Er);break;case"minute":t=this._d.valueOf(),t-=hn(t,un);break;case"second":t=this._d.valueOf(),t-=hn(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function Vh(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Wl:Yl,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-hn(t+(this._isUTC?0:this.utcOffset()*un),Er)-1;break;case"minute":t=this._d.valueOf(),t+=un-hn(t,un)-1;break;case"second":t=this._d.valueOf(),t+=Sr-hn(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function Gh(){return this._d.valueOf()-(this._offset||0)*6e4}function Zh(){return Math.floor(this.valueOf()/1e3)}function qh(){return new Date(this.valueOf())}function zh(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function $h(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Kh(){return this.isValid()?this.toISOString():null}function Xh(){return is(this)}function Jh(){return Lt({},z(this))}function Qh(){return z(this).overflow}function e1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",ys);C("NN",ys);C("NNN",ys);C("NNNN",f1);C("NNNNN",u1);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",_n);C("yy",_n);C("yyy",_n);C("yyyy",_n);C("yo",h1);ie(["y","yy","yyy","yyyy"],Ae);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ae]=n._locale.eraYearOrdinalParse(e,i):t[Ae]=parseInt(e,10)});function t1(e,t){var n,r,i,s=this._eras||St("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function r1(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function i1(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),y1.call(this,e,t,n,r,i))}function y1(e,t,n,r,i){var s=yl(e,t,n,r,i),a=Nn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Oe("quarter","Q");Re("quarter",7);C("Q",dl);ie("Q",function(e,t){t[gt]=($(e)-1)*3});function b1(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Oe("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var jl=pn("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Oe("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Pr);C("DDDD",fl);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function v1(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Oe("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var k1=pn("Minutes",!1);H("s",["ss",2],0,"second");Oe("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],xt);var S1=pn("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Oe("millisecond","ms");Re("millisecond",16);C("S",Pr,dl);C("SS",Pr,Be);C("SSS",Pr,fl);var Ct,Bl;for(Ct="SSSS";Ct.length<=9;Ct+="S")C(Ct,_n);function E1(e,t){t[zt]=$(("0."+e)*1e3)}for(Ct="S";Ct.length<=9;Ct+="S")ie(Ct,E1);Bl=pn("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function D1(){return this._isUTC?"UTC":""}function T1(){return this._isUTC?"Coordinated Universal Time":""}var M=Bn.prototype;M.add=xh;M.calendar=Dh;M.clone=Th;M.diff=Lh;M.endOf=Vh;M.format=Uh;M.from=Yh;M.fromNow=Wh;M.to=Hh;M.toNow=jh;M.get=Ou;M.invalidAt=Qh;M.isAfter=Ah;M.isBefore=Oh;M.isBetween=Rh;M.isSame=Mh;M.isSameOrAfter=Ih;M.isSameOrBefore=Fh;M.isValid=Xh;M.lang=Nl;M.locale=Cl;M.localeData=Pl;M.max=X0;M.min=K0;M.parsingFlags=Jh;M.set=Ru;M.startOf=Bh;M.subtract=yh;M.toArray=zh;M.toObject=$h;M.toDate=qh;M.toISOString=Nh;M.inspect=Ph;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=Kh;M.toString=Ch;M.unix=Zh;M.valueOf=Gh;M.creationData=e1;M.eraName=i1;M.eraNarrow=s1;M.eraAbbr=a1;M.eraYear=o1;M.year=xl;M.isLeapYear=$u;M.weekYear=m1;M.isoWeekYear=p1;M.quarter=M.quarters=b1;M.month=wl;M.daysInMonth=Zu;M.week=M.weeks=t0;M.isoWeek=M.isoWeeks=n0;M.weeksInYear=g1;M.weeksInWeekYear=x1;M.isoWeeksInYear=_1;M.isoWeeksInISOWeekYear=w1;M.date=jl;M.day=M.days=p0;M.weekday=_0;M.isoWeekday=w0;M.dayOfYear=v1;M.hour=M.hours=S0;M.minute=M.minutes=k1;M.second=M.seconds=S1;M.millisecond=M.milliseconds=Bl;M.utcOffset=ah;M.utc=lh;M.local=ch;M.parseZone=dh;M.hasAlignedHourOffset=fh;M.isDST=uh;M.isLocal=mh;M.isUtcOffset=ph;M.isUtc=Ml;M.isUTC=Ml;M.zoneAbbr=D1;M.zoneName=T1;M.dates=$e("dates accessor is deprecated. Use date instead.",jl);M.months=$e("months accessor is deprecated. Use month instead",wl);M.years=$e("years accessor is deprecated. Use year instead",xl);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",oh);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",hh);function A1(e){return oe(e*1e3)}function O1(){return oe.apply(null,arguments).parseZone()}function Vl(e){return e}var ne=as.prototype;ne.calendar=pu;ne.longDateFormat=xu;ne.invalidDate=bu;ne.ordinal=Su;ne.preparse=Vl;ne.postformat=Vl;ne.relativeTime=Du;ne.pastFuture=Tu;ne.set=hu;ne.eras=t1;ne.erasParse=n1;ne.erasConvertYear=r1;ne.erasAbbrRegex=c1;ne.erasNameRegex=l1;ne.erasNarrowRegex=d1;ne.months=ju;ne.monthsShort=Bu;ne.monthsParse=Gu;ne.monthsRegex=zu;ne.monthsShortRegex=qu;ne.week=Xu;ne.firstDayOfYear=e0;ne.firstDayOfWeek=Qu;ne.weekdays=d0;ne.weekdaysMin=u0;ne.weekdaysShort=f0;ne.weekdaysParse=m0;ne.weekdaysRegex=g0;ne.weekdaysShortRegex=x0;ne.weekdaysMinRegex=y0;ne.isPM=v0;ne.meridiem=E0;function Dr(e,t,n,r){var i=St(),s=ut().set(r,t);return i[n](s,e)}function Gl(e,t,n){if(kt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function vs(e,t,n,r){typeof e=="boolean"?(kt(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,kt(t)&&(n=t,t=void 0),t=t||"");var i=St(),s=e?i._week.dow:0,a,l=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)l[a]=Dr(t,(a+s)%7,r,"day");return l}function R1(e,t){return Gl(e,t,"months")}function M1(e,t){return Gl(e,t,"monthsShort")}function I1(e,t,n){return vs(e,t,n,"weekdays")}function F1(e,t,n){return vs(e,t,n,"weekdaysShort")}function L1(e,t,n){return vs(e,t,n,"weekdaysMin")}Pt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Pt);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",St);var _t=Math.abs;function C1(){var e=this._data;return this._milliseconds=_t(this._milliseconds),this._days=_t(this._days),this._months=_t(this._months),e.milliseconds=_t(e.milliseconds),e.seconds=_t(e.seconds),e.minutes=_t(e.minutes),e.hours=_t(e.hours),e.months=_t(e.months),e.years=_t(e.years),this}function Zl(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function N1(e,t){return Zl(this,e,t,1)}function P1(e,t){return Zl(this,e,t,-1)}function Ua(e){return e<0?Math.floor(e):Math.ceil(e)}function U1(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,l,o;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Ua(Yi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),o=Ze(ql(t)),n+=o,t-=Ua(Yi(o)),l=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=l,this}function ql(e){return e*4800/146097}function Yi(e){return e*146097/4800}function Y1(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+ql(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Yi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function W1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Et(e){return function(){return this.as(e)}}var H1=Et("ms"),j1=Et("s"),B1=Et("m"),V1=Et("h"),G1=Et("d"),Z1=Et("w"),q1=Et("M"),z1=Et("Q"),$1=Et("y");function K1(){return st(this)}function X1(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Xt(e){return function(){return this.isValid()?this._data[e]:NaN}}var J1=Xt("milliseconds"),Q1=Xt("seconds"),em=Xt("minutes"),tm=Xt("hours"),nm=Xt("days"),rm=Xt("months"),im=Xt("years");function sm(){return Ze(this.days()/7)}var wt=Math.round,ln={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function am(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function om(e,t,n,r){var i=st(e).abs(),s=wt(i.as("s")),a=wt(i.as("m")),l=wt(i.as("h")),o=wt(i.as("d")),f=wt(i.as("M")),d=wt(i.as("w")),u=wt(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,am.apply(null,p)}function lm(e){return e===void 0?wt:typeof e=="function"?(wt=e,!0):!1}function cm(e,t){return ln[e]===void 0?!1:t===void 0?ln[e]:(ln[e]=t,e==="s"&&(ln.ss=t-1),!0)}function dm(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ln,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ln,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=om(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var ui=Math.abs;function nn(e){return(e>0)-(e<0)||+e}function Gr(){if(!this.isValid())return this.localeData().invalidDate();var e=ui(this._milliseconds)/1e3,t=ui(this._days),n=ui(this._months),r,i,s,a,l=this.asSeconds(),o,f,d,u;return l?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",o=l<0?"-":"",f=nn(this._months)!==nn(l)?"-":"",d=nn(this._days)!==nn(l)?"-":"",u=nn(this._milliseconds)!==nn(l)?"-":"",o+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Br.prototype;X.isValid=nh;X.abs=C1;X.add=N1;X.subtract=P1;X.as=Y1;X.asMilliseconds=H1;X.asSeconds=j1;X.asMinutes=B1;X.asHours=V1;X.asDays=G1;X.asWeeks=Z1;X.asMonths=q1;X.asQuarters=z1;X.asYears=$1;X.valueOf=W1;X._bubble=U1;X.clone=K1;X.get=X1;X.milliseconds=J1;X.seconds=Q1;X.minutes=em;X.hours=tm;X.days=nm;X.weeks=sm;X.months=rm;X.years=im;X.humanize=dm;X.toISOString=Gr;X.toString=Gr;X.toJSON=Gr;X.locale=Cl;X.localeData=Pl;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gr);X.lang=Nl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Yr);C("X",Iu);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L.months=R1;L.isDate=jn;L.locale=Pt;L.invalid=Lr;L.duration=st;L.isMoment=it;L.weekdays=I1;L.parseZone=O1;L.localeData=St;L.isDuration=dr;L.monthsShort=M1;L.weekdaysMin=L1;L.defineLocale=ms;L.updateLocale=O0;L.locales=R0;L.weekdaysShort=F1;L.normalizeUnits=Ke;L.relativeTimeRounding=lm;L.relativeTimeThreshold=cm;L.calendarFormat=Eh;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Wi(e,t){const n=L(e,t,!0);if(n.isValid())return n.format("MM-DD-YYYY")}function fm(e){return Ir(e)!==e}class hi{constructor(){Bt(this,"nameWasCalledAsFile",[]);Bt(this,"pathMap",new Map);Bt(this,"nameMap",new Map)}accessAsFile(t,n,r,i){const s=Wi(t,i);s&&(t=s);const a=this.pathMap.get(n);if(a)return this.nameMap.get(t)||this.nameMap.set(t,a),a;const l=this.nameMap.get(t);if(l&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,l),this.nameWasCalledAsFile.push(t),l;const o=r(s);return this.pathMap.set(n,o),this.nameMap.get(t)||this.nameMap.set(t,o),this.nameWasCalledAsFile.push(t),o}accessAsLink(t,n,r){const i=Wi(t,r);i&&(t=i);const s=this.findData(t);if(s)return s;const a=fm(t),l=n(i);return a?this.pathMap.set(t,l):this.nameMap.set(t,l),l}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Zr(e){e.totalNodes++,e.leafNodes++}function zl(e){e.leafNodes--,e.topLevelNodes++}function um(e,t,n=cu,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new hi,headingTracker:new hi,dummyHeadingLinkTracker:new Map,blockLinkTracker:new hi,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function Wt(e){return Zr(e.summary),e.idGenerator()}function hm(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map,t.dailyNoteFormat);let s=i.get(r);return s||(s={uid:Wt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function mm(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map,n.dailyNoteFormat);let a=s.get(i);return a||(a={uid:Wt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function pm(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function _m(e){let t;return[e.split(` -`).map(r=>{const i=r.split(" "),s=i[i.length-1];if(s.startsWith("^"))return t=s,i.slice(0,-1).join(" ")}).join(` +`).map(r=>{const i=r.split(" "),s=i[i.length-1];return s.startsWith("^")?(t=s,i.slice(0,-1).join(" ")):r}).join(` `),t]}function $l(e,t,n,r,i,s){const a=[t],l=[e];for(const o of n){const f=i(o);wm(f,o,a,l,r),s==null||s(f,o)}}function wm(e,t,n,r,i){var l;gm(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(l=a.children)!=null?l:[],a.children.push(e)),n.push(t),r.push(e)}function gm(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function Kl(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=Kl(n.children,r);if(i)return i}}return null}function xm(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function ym(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const l=t.findData(s);if(l){const o={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};$l(f,o,l,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=Kl(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function bm(e,t){const[n,r]=ym(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Zr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let l=a;s.forEach(o=>{l=l.replace(o.old,o.new)}),await t.adapter.appendToPostProcessingFile(i,l)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var Xl=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(Xl||{});function vm(e,t){const n=km(e.name,t);if(n.length>0){const r=new Set;e.refs||(e.refs=[]);for(const[i,s,a]of n)r.add(s),e.name=e.name.replaceAll("[["+i+"]]",a);e.refs.push(...Array.from(r.values()))}}function km(e,t){return du(e,!0).map(n=>[n,n.split("|").map(r=>r.trim())]).filter(n=>n[1][0]!=="").map(n=>{const r=n[1],i=r[0],s=r[1],a=Dm(i,t),l=s!==void 0&&s.trim()!==""?"["+s.trim()+"]([["+a+"]])":"[["+a+"]]";return[n[0],a,l]})}function Sm(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function Em(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function Dm(e,t){const n=Sm(e);switch(Em(n)){case 0:return Tm(n[0],t);case 2:return hm(n,t);case 1:return xm(n,t);default:throw"Invalid link type detected: "+n}}function Tm(e,t){return t.defaultLinkTracker.accessAsLink(e,r=>(Zr(t.summary),{uid:r!=null?r:t.idGenerator(),obsidianLink:e,type:1}),t.dailyNoteFormat).uid}function Jl(e,t,n,r){const[i,s]=_m(n);return s?[mm([e,s],t,r),i]:[Wt(r),n]}function Am(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,s=>(Zr(n.summary),{uid:s!=null?s:n.idGenerator(),obsidianLink:r,type:0}),n.dailyNoteFormat);return i.type=0,i.uid}function Om(e){const t=[];for(const n of e.getData())n.type===Xl.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function Rm(e){return[...e.invalidLinks,...Om(e.defaultLinkTracker),...pm(e.blockLinkTracker)]}function Mm(e,t,n){const r=Rm(n).sort((a,l)=>a.link.localeCompare(l.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:Wt(n),name:i,createdAt:t,editedAt:t,type:"node"};return zl(n.summary),s.children=r,s}function ks(e){return e===" "||e===" "}function Zn(e,t){let n=0;for(;ks(e[t+n]);)n++;return n}function Im(e,t){let n=t,r=e[t];for(;ks(r);)n--,r=e[n];return n+1}function Ut(e,t){let n=0;for(;!Ss(e[t+n]);)n++;return t+n}function Ql(e,t){const n=e[t-1];return Ss(n)}function Ss(e){return e===void 0||e===` `}function ec(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function Es(e,t){let n=!0;const r=t+Zn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ec(e,r));const a=Im(e,r-1)-1,l=e[a];return Ss(l)&&n?{type:ft.BULLET,level:r-a-1}:null}function Fm(e,t,n){let r=t+n.level;if(ec(e,r))return r;r+=1+1;const i=Zn(e,r);return r+i}function Lm(e,t,n){let r=Ut(e,t+n.level+1+1),i=e[r];for(;;){const s=Zn(e,r+1);if(s==n.level+2&&!Es(e,r+1+s))r=Ut(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Cm(e,t){return e+t.level}function Nm(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=Zn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function tc(e,t){if(!Ql(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=Ut(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],l=e[i+2];for(;[s,a,l].every(d=>d!==void 0)&&[s,a,l].join("")!=="```";)i++,s=e[i],a=e[i+1],l=e[i+2];if([s,a,l].some(d=>d===void 0))return null;const o=Ut(e,i+3);return e.slice(i+3,o).trim()!==""?null:{type:ft.CODEBLOCK,level:o-t+(e[o]===` `?1:0),codeLanguage:r!==""?r:void 0}}return null}function Pm(e,t){return Ut(e,t)}function nc(e,t){const n=Ut(e,t),r=e.slice(t,n);return rc(r)?{type:ft.DATAVIEWATTRIBUTE,level:0}:null}function rc(e){const t=e.split("::");return t.length===2&&t[0].trim()===t[0]&&t[0]!==""&&t[1]!==""&&t[1]!==" "&&ks(t[1][0])}function ic(e,t){if(!Ql(e,t))return null;const n=Um(e,t);return n>0&&e[t+n]===" "?{type:ft.HEADING,level:n}:null}function Um(e,t){let n=t,r=0;for(;e[n]==="#";)n++,r++;return r}function Ym(e,t,n){const r=t+n.level+1,i=Zn(e,r);return r+i}function Wm(e,t,n){return Ut(e,t+n.level+1)}function Hm(e,t){let n=Ut(e,t),r=e[n],i=r;for(n++,r=e[n];;){if(r===void 0)return[n];if(r===` @@ -46,4 +46,4 @@ L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L Please check the text at the top again.`,document.body.appendChild(l)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack): `+i,document.body.appendChild(a)}}); -//# sourceMappingURL=index.8c4d8d7f.js.map +//# sourceMappingURL=index.7e3a4e90.js.map diff --git a/docs/assets/index.8c4d8d7f.js.map b/docs/assets/index.7e3a4e90.js.map similarity index 63% rename from docs/assets/index.8c4d8d7f.js.map rename to docs/assets/index.7e3a4e90.js.map index 74d37c1..75fba5e 100644 --- a/docs/assets/index.8c4d8d7f.js.map +++ b/docs/assets/index.7e3a4e90.js.map @@ -1 +1 @@ -{"version":3,"file":"index.8c4d8d7f.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: tags are too naive! ()\nexport function detectTags(content: string) {\n return content.match(tagRegex);\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tag without losing meaning because it will show up as a super tag anyways\n const lastTag = tags[tags.length - 1];\n if (tanaNode.name.endsWith(lastTag)) {\n tanaNode.name = tanaNode.name.slice(0, -lastTag.length);\n }\n\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","detectTags","cleanUpTag","tag","superTagUidRequests","tags","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","lastTag","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAAU,YAAc,OAExBA,EAAU,YAAc,cACrBA,CACV,CACD,SAASN,EAAeD,EAAM,CAC1B,GAAIA,EAAK,GAEL,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,EAI9B,MAAAO,EAAoB90C,EAAc,MAAM,SAAS,EAEvD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAA+0C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file +{"version":3,"file":"index.7e3a4e90.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: tags are too naive! ()\nexport function detectTags(content: string) {\n return content.match(tagRegex);\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tag without losing meaning because it will show up as a super tag anyways\n const lastTag = tags[tags.length - 1];\n if (tanaNode.name.endsWith(lastTag)) {\n tanaNode.name = tanaNode.name.slice(0, -lastTag.length);\n }\n\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","detectTags","cleanUpTag","tag","superTagUidRequests","tags","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","lastTag","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,W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DA,EAAe,UAAY,oBACZA,EAAA,iBAAiB,QAAS,IAAM,CACvC,MAAA3xC,EAAM,IAAI,gBAAgB,IAAI,KAAK,CAAC9X,CAAM,CAAC,CAAC,EAC5C7P,EAAI,SAAS,cAAc,GAAG,EACpCA,EAAE,MAAM,QAAU,OAClBA,EAAE,KAAO2nB,EACT3nB,EAAE,SAAW64D,EAAY,YAChB,SAAA,KAAK,YAAY74D,CAAC,EAC3BA,EAAE,MAAM,EACR,IAAI,gBAAgB2nB,CAAG,CAAA,CACxB,EACQ,SAAA,KAAK,YAAY2xC,CAAc,QACjC70C,GACP,QAAQ,MAAMA,CAAK,EAEfu0C,GACO,SAAA,KAAK,YAAYA,CAAQ,EAI9B,MAAAO,EAAoB90C,EAAc,MAAM,SAAS,EAEvD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAA+0C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 3e521df..599196b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

diff --git a/src/converters/obsidian/markdown/blockIds.ts b/src/converters/obsidian/markdown/blockIds.ts index 3c84ad5..c0ff8e7 100644 --- a/src/converters/obsidian/markdown/blockIds.ts +++ b/src/converters/obsidian/markdown/blockIds.ts @@ -10,6 +10,8 @@ export function removeBlockId(content: string): [string, string | undefined] { //we take the last id, rest will be detected as invalid id = lastEle; return splitLine.slice(0, -1).join(' '); + } else { + return line; } }) .join('\n'); diff --git a/src/converters/obsidian/tests/blockIds.test.ts b/src/converters/obsidian/tests/blockIds.test.ts new file mode 100644 index 0000000..8010551 --- /dev/null +++ b/src/converters/obsidian/tests/blockIds.test.ts @@ -0,0 +1,9 @@ +import { expect, test } from 'vitest'; +import { removeBlockId } from '../markdown/blockIds'; + +test('blockId removal test', () => { + expect(removeBlockId('')).toStrictEqual(['', undefined]); + expect(removeBlockId('^ID')).toStrictEqual(['', '^ID']); + expect(removeBlockId('\n^ID')).toStrictEqual(['\n', '^ID']); + expect(removeBlockId('Test::\n^ID')).toStrictEqual(['Test::\n', '^ID']); +}); From 671f8543bdb2cc33b0a56e22076d2c30b5359ad3 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Mon, 31 Oct 2022 20:33:03 +0100 Subject: [PATCH 86/94] Obsidian: support block ids in multiline content (2) --- src/converters/obsidian/markdown/blockIds.ts | 2 +- src/converters/obsidian/tests/blockIds.test.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/converters/obsidian/markdown/blockIds.ts b/src/converters/obsidian/markdown/blockIds.ts index c0ff8e7..873353f 100644 --- a/src/converters/obsidian/markdown/blockIds.ts +++ b/src/converters/obsidian/markdown/blockIds.ts @@ -7,7 +7,7 @@ export function removeBlockId(content: string): [string, string | undefined] { const splitLine = line.split(' '); const lastEle = splitLine[splitLine.length - 1]; if (lastEle.startsWith('^')) { - //we take the last id, rest will be detected as invalid + //we take the last id, rest will be detected as invalid if they are used id = lastEle; return splitLine.slice(0, -1).join(' '); } else { diff --git a/src/converters/obsidian/tests/blockIds.test.ts b/src/converters/obsidian/tests/blockIds.test.ts index 8010551..19057b3 100644 --- a/src/converters/obsidian/tests/blockIds.test.ts +++ b/src/converters/obsidian/tests/blockIds.test.ts @@ -6,4 +6,7 @@ test('blockId removal test', () => { expect(removeBlockId('^ID')).toStrictEqual(['', '^ID']); expect(removeBlockId('\n^ID')).toStrictEqual(['\n', '^ID']); expect(removeBlockId('Test::\n^ID')).toStrictEqual(['Test::\n', '^ID']); + expect(removeBlockId('Test::\nNOT_ID')).toStrictEqual(['Test::\nNOT_ID', undefined]); + expect(removeBlockId('Test::\nNOT_ID ^ID')).toStrictEqual(['Test::\nNOT_ID', '^ID']); + expect(removeBlockId('Test::\nNOT_ID ^ID1\nNOT_ID ^ID2')).toStrictEqual(['Test::\nNOT_ID\nNOT_ID', '^ID2']); }); From 8085ee1a7d404e2b00d256cbee6aa5a7edbfa705 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sat, 5 Nov 2022 19:52:08 +0100 Subject: [PATCH 87/94] Obsidian: added brute force filtering of invalid obsidian tags --- .../{index.7e3a4e90.js => index.e8feb057.js} | 22 ++--- ....7e3a4e90.js.map => index.e8feb057.js.map} | 2 +- docs/index.html | 2 +- src/converters/obsidian/markdown/tags.ts | 84 +++++++++++++++++- .../obsidian/tanafeatures/postprocessing.ts | 10 +-- .../obsidian/tests/fixtures/vault.zip | Bin 3229 -> 3229 bytes src/converters/obsidian/tests/tags.test.ts | 25 ++++++ 7 files changed, 123 insertions(+), 22 deletions(-) rename docs/assets/{index.7e3a4e90.js => index.e8feb057.js} (98%) rename docs/assets/{index.7e3a4e90.js.map => index.e8feb057.js.map} (63%) create mode 100644 src/converters/obsidian/tests/tags.test.ts diff --git a/docs/assets/index.7e3a4e90.js b/docs/assets/index.e8feb057.js similarity index 98% rename from docs/assets/index.7e3a4e90.js rename to docs/assets/index.e8feb057.js index 9f7e97f..b0208e3 100644 --- a/docs/assets/index.7e3a4e90.js +++ b/docs/assets/index.e8feb057.js @@ -16,34 +16,34 @@ L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L `&&i===` `)return[n-1];{const s=jm(e,n);if(s)return[n-1,s]}i=r,n++,r=e[n]}}function jm(e,t){let n=ic(e,t);return n||(n=nc(e,t),n)||(n=Es(e,t),n)||(n=tc(e,t),n)?n:null}var ft=(e=>(e.ROOT="Root",e.HEADING="Heading",e.BULLET="Bullet Node",e.PARAGRAPH="Paragraph",e.CODEBLOCK="Code Block",e.DATAVIEWATTRIBUTE="Data View Attribute",e))(ft||{});function Bm(e,t=0){const n=[];for(let r=t;rXm(i,t,n,r))))}function Xm(e,t,n,r){let i=e;r&&(i=Km(e));let s=t.get(i);return s===void 0&&(s=n(),t.set(i,s)),s}function Jm(e){return Array.from(e.entries()).map(t=>({name:t[0],uid:t[1]}))}function Qm(e){if(e.startsWith("[ ] "))return"todo";if(e.startsWith("[x] ")||e.startsWith("[X] "))return"done"}function ep(e,t){if(t===ft.BULLET){const n=Qm(e);if(n)return[e.slice(4),n]}return null}function tp(e){const t=[];let n=Hi(e,0);for(;n!==null;){let r;Array.isArray(n)?(t.push(n),r=n[2]):r=n,n=Hi(e,r)}return t}function Hi(e,t){let n,r="",i="";for(let s=t;s{const f=o[0],d=o[1];if(i.every(u=>f.trim()!==u.name||d.trim()!==u.mediaUrl)){const u=o[3],p=Wt(n);s.add(p),e.name=e.name.replaceAll(u,"[["+p+"]]"),i.push({uid:p,name:f.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:d.trim()})}}),s.size>0&&(e.refs=[...(a=e.refs)!=null?a:[],...Array.from(s.values())]),e.children=[...(l=e.children)!=null?l:[],...i]}function oc(e,t,n,r,i,s){var u;const[a,l]=(u=ep(r.name,s))!=null?u:[r.name,void 0];r.name=a,r.todoState=l;const[o,f]=Jl(e,t,r.name,i);r.uid=o,r.name=f,r.name=r.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=$m(r.name);if(d){const p=d[d.length-1];r.name.endsWith(p)&&(r.name=r.name.slice(0,-p.length)),r.supertags=sc(d,i.superTagTracker,i.idGenerator,!0)}return vm(r,i),rp(r,n,i),r}function lc(e,t,n,r,i,s,a,l){let o=l;return r&&r.length>0&&(o=l!=null?l:[],o==null||o.push(...r.map(f=>oc(e,t,i,{name:f,type:"node",createdAt:i,editedAt:i},s)))),sp(n,s.attributes),s.summary.fields++,{uid:a!=null?a:Wt(s),name:n,type:"field",createdAt:i,editedAt:i,children:o}}function ip(e,t,n,r,i){return lc(e,t,n.key,n.values,r,i)}function sp(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function ap(e,t,n){return{uid:Wt(n),name:Nm(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function op(e,t,n,r,i){if(n.type===ft.DATAVIEWATTRIBUTE||rc(n.content)){const[s,a]=Jl(e,t,n.content,i),l=a.split("::");return l[1]===void 0&&console.log(n.content,a,l),lc(e,t,l[0],[l[1].trim()],r,i,s)}}function lp(e,t,n,r,i){if(n.type===ft.CODEBLOCK)return ap(n,r,i);const s=op(e,t,n,r,i);return s||oc(e,t,r,{name:n.content,createdAt:r,editedAt:r,type:"node"},i,n.type)}function cp(e){if(e.startsWith(`--- +`;)a++;[s,a,l]=Ya(e,a),s.content.trim()!==""&&n.push(s)}r=a-1}return n}function Ya(e,t){const n=Vm(e,t),r=Gm(e,t,n),[i,s]=Zm(e,t,n);return[{...n,content:e.slice(r,i).trimEnd()},i,s]}function Vm(e,t){let n=ic(e,t);return n||(n=Es(e,t),n||(n=tc(e,t),n)||(n=nc(e,t),n)?n:{type:"Paragraph",level:0})}function Gm(e,t,n){switch(n.type){case"Heading":return Ym(e,t,n);case"Bullet Node":return Fm(e,t,n);case"Paragraph":return t;case"Code Block":return t;case"Data View Attribute":return t;default:throw"Unsupported HierarchyType detected: "+n}}function Zm(e,t,n){switch(n.type){case"Heading":return[Wm(e,t,n)];case"Bullet Node":return[Lm(e,t,n)];case"Paragraph":return Hm(e,t);case"Code Block":return[Cm(t,n)];case"Data View Attribute":return[Pm(e,t)];default:throw"Unsupported HierarchyType detected: "+n}}function qm(e,t){return e.type==="Root"||e.type==="Heading"&&t.type!=="Heading"?!0:e.type==="Paragraph"||t.type==="Paragraph"||e.type==="Code Block"||t.type==="Code Block"||e.type==="Data View Attribute"||t.type==="Data View Attribute"?!1:e.type===t.type?e.level","\\","*","`","[","]"]);function Xm(e){e=e.trim();let t=e[0];if(t!=="#")return!1;let n=!1;for(let r=1;rXm(n))}function Qm(e,t){let n=e,r=!1;for(;;){let i=!1;for(const s of t)n.endsWith(s)&&(n=n.slice(0,-s.length),i=!0,r=!0);if(!i)break}return r&&(n=n.trimEnd()),n}function ep(e){return e.trim().slice(1)}function sc(e,t,n,r){return Array.from(new Set(e.map(i=>tp(i,t,n,r))))}function tp(e,t,n,r){let i=e;r&&(i=ep(e));let s=t.get(i);return s===void 0&&(s=n(),t.set(i,s)),s}function np(e){return Array.from(e.entries()).map(t=>({name:t[0],uid:t[1]}))}function rp(e){if(e.startsWith("[ ] "))return"todo";if(e.startsWith("[x] ")||e.startsWith("[X] "))return"done"}function ip(e,t){if(t===ft.BULLET){const n=rp(e);if(n)return[e.slice(4),n]}return null}function sp(e){const t=[];let n=Hi(e,0);for(;n!==null;){let r;Array.isArray(n)?(t.push(n),r=n[2]):r=n,n=Hi(e,r)}return t}function Hi(e,t){let n,r="",i="";for(let s=t;s{const f=o[0],d=o[1];if(i.every(u=>f.trim()!==u.name||d.trim()!==u.mediaUrl)){const u=o[3],p=Wt(n);s.add(p),e.name=e.name.replaceAll(u,"[["+p+"]]"),i.push({uid:p,name:f.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:d.trim()})}}),s.size>0&&(e.refs=[...(a=e.refs)!=null?a:[],...Array.from(s.values())]),e.children=[...(l=e.children)!=null?l:[],...i]}function oc(e,t,n,r,i,s){var u;const[a,l]=(u=ip(r.name,s))!=null?u:[r.name,void 0];r.name=a,r.todoState=l;const[o,f]=Jl(e,t,r.name,i);r.uid=o,r.name=f,r.name=r.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=Jm(r.name);return d&&(r.name=Qm(r.name,d),r.supertags=sc(d,i.superTagTracker,i.idGenerator,!0)),vm(r,i),op(r,n,i),r}function lc(e,t,n,r,i,s,a,l){let o=l;return r&&r.length>0&&(o=l!=null?l:[],o==null||o.push(...r.map(f=>oc(e,t,i,{name:f,type:"node",createdAt:i,editedAt:i},s)))),cp(n,s.attributes),s.summary.fields++,{uid:a!=null?a:Wt(s),name:n,type:"field",createdAt:i,editedAt:i,children:o}}function lp(e,t,n,r,i){return lc(e,t,n.key,n.values,r,i)}function cp(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function dp(e,t,n){return{uid:Wt(n),name:Nm(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function fp(e,t,n,r,i){if(n.type===ft.DATAVIEWATTRIBUTE||rc(n.content)){const[s,a]=Jl(e,t,n.content,i),l=a.split("::");return l[1]===void 0&&console.log(n.content,a,l),lc(e,t,l[0],[l[1].trim()],r,i,s)}}function up(e,t,n,r,i){if(n.type===ft.CODEBLOCK)return dp(n,r,i);const s=fp(e,t,n,r,i);return s||oc(e,t,r,{name:n.content,createdAt:r,editedAt:r,type:"node"},i,n.type)}function hp(e){if(e.startsWith(`--- `)){const t=e.indexOf(` --- -`);if(t!==-1)return[dp(e.slice(4,t)),t+5]}return null}function dp(e){const t=e.split(` -`).map(r=>r.trim()).filter(r=>r!==""),n=[];for(let r=0;ra.trim()).filter(a=>a!=="");if(!(s[0]==="publish"||s[0]==="cssclass"||s[0]==="aliases"))if(s.length===2)if(s[1].startsWith("[")&&s[1].endsWith("]")){const a=s[1].slice(1,-1).split(",").map(l=>l.trim()).filter(l=>l!=="");n.push({key:s[0],values:a})}else n.push({key:s[0],values:[s[1]]});else{const a={key:s[0],values:[]};let l=1,o=t[r+l];for(;o!==void 0&&o.startsWith("- ");)a.values.push(o.slice(2)),l++,o=t[r+l];r+=l-1,n.push(a)}}return n}function fp(e,t,n,r,i=Date.now()){var p;const[s,a]=(p=cp(n))!=null?p:[[],0];let l=Bm(n,a),o=e;const f=l[0]&&l[0].content.match(/^title::(.+)$/);f&&(o=f[1],l=l.slice(1)),l[0]&&l[0].content.replace(/^#+/,"").trim()===o.trim()&&(l=l.slice(1));const d=[],u=up(o,t,i,r,s);return $l(u,{type:ft.ROOT,level:-1},l,qm,w=>lp(e,t,w,i,r),(w,D)=>{D.type===ft.HEADING&&d.push({...D,uid:w.uid})}),l=null,r.headingTracker.pathMap.set(t,d),r.headingTracker.nameMap.get(e)||r.headingTracker.nameMap.set(e,d),u}function up(e,t,n,r,i){let s;const a=[];i.forEach(d=>{d.key==="tags"?s=sc(d.values,r.superTagTracker,r.idGenerator):a.push(ip(e,t,d,n,r))});const l=Am(e,t,r);let o="node";const f=Wi(e,r.dailyNoteFormat);return f&&(o="date",e=f,r.summary.calendarNodes++),{uid:l,name:e,createdAt:n,editedAt:n,type:o,supertags:s,children:a.length>0?a:void 0}}function Wa(e,t){return e===t.length-1?"LAST":"NOT_LAST"}function hp(e,t){return e.adapter.readDirectory(t).filter(n=>{const r=t+Fr+n.getName();return n.isDirectory()&&!r.endsWith(".github")&&!r.endsWith(".obsidian")||!n.isDirectory()&&r.endsWith(".md")}).sort((n,r)=>n.getName().localeCompare(r.getName())).sort((n,r)=>Number(n.isDirectory())-Number(r.isDirectory()))}async function cc(e,t,n,r,i,s="LAST"){n(t);const a=hp(e,t);for(let l=0;l{const i=Ir(r),s=Wt(n);n.adapter.appendToResultFile(e,`{ +`);if(t!==-1)return[mp(e.slice(4,t)),t+5]}return null}function mp(e){const t=e.split(` +`).map(r=>r.trim()).filter(r=>r!==""),n=[];for(let r=0;ra.trim()).filter(a=>a!=="");if(!(s[0]==="publish"||s[0]==="cssclass"||s[0]==="aliases"))if(s.length===2)if(s[1].startsWith("[")&&s[1].endsWith("]")){const a=s[1].slice(1,-1).split(",").map(l=>l.trim()).filter(l=>l!=="");n.push({key:s[0],values:a})}else n.push({key:s[0],values:[s[1]]});else{const a={key:s[0],values:[]};let l=1,o=t[r+l];for(;o!==void 0&&o.startsWith("- ");)a.values.push(o.slice(2)),l++,o=t[r+l];r+=l-1,n.push(a)}}return n}function pp(e,t,n,r,i=Date.now()){var p;const[s,a]=(p=hp(n))!=null?p:[[],0];let l=Bm(n,a),o=e;const f=l[0]&&l[0].content.match(/^title::(.+)$/);f&&(o=f[1],l=l.slice(1)),l[0]&&l[0].content.replace(/^#+/,"").trim()===o.trim()&&(l=l.slice(1));const d=[],u=_p(o,t,i,r,s);return $l(u,{type:ft.ROOT,level:-1},l,qm,w=>up(e,t,w,i,r),(w,D)=>{D.type===ft.HEADING&&d.push({...D,uid:w.uid})}),l=null,r.headingTracker.pathMap.set(t,d),r.headingTracker.nameMap.get(e)||r.headingTracker.nameMap.set(e,d),u}function _p(e,t,n,r,i){let s;const a=[];i.forEach(d=>{d.key==="tags"?s=sc(d.values,r.superTagTracker,r.idGenerator):a.push(lp(e,t,d,n,r))});const l=Am(e,t,r);let o="node";const f=Wi(e,r.dailyNoteFormat);return f&&(o="date",e=f,r.summary.calendarNodes++),{uid:l,name:e,createdAt:n,editedAt:n,type:o,supertags:s,children:a.length>0?a:void 0}}function Wa(e,t){return e===t.length-1?"LAST":"NOT_LAST"}function wp(e,t){return e.adapter.readDirectory(t).filter(n=>{const r=t+Fr+n.getName();return n.isDirectory()&&!r.endsWith(".github")&&!r.endsWith(".obsidian")||!n.isDirectory()&&r.endsWith(".md")}).sort((n,r)=>n.getName().localeCompare(r.getName())).sort((n,r)=>Number(n.isDirectory())-Number(r.isDirectory()))}async function cc(e,t,n,r,i,s="LAST"){n(t);const a=wp(e,t);for(let l=0;l{const i=Ir(r),s=Wt(n);n.adapter.appendToResultFile(e,`{ "uid": "${s}", "name": "${i}", "createdAt": ${t}, "editedAt": ${t}, "type": "node", "children": [ - `)}}function pp(e,t){return n=>{e.adapter.appendToResultFile(t,`] - }`),n!=="LAST"&&e.adapter.appendToResultFile(t,",")}}function _p(e,t,n){return async(r,i)=>{const s=r.slice(n.vaultPath.length+1,-3),a=fp(Ir(r).replace(".md",""),s,await n.adapter.readFile(r),n,t);n.adapter.appendToResultFile(e,JSON.stringify(a,null,2)),i!=="LAST"&&n.adapter.appendToResultFile(e,",")}}async function wp(e,t=Date.now()){await e.adapter.initReadingVault(),await gp(e);const n=`${e.vaultPath}.tif.json`;try{e.adapter.removeFile(n)}catch{}e.adapter.appendToResultFile(n,`{ + `)}}function xp(e,t){return n=>{e.adapter.appendToResultFile(t,`] + }`),n!=="LAST"&&e.adapter.appendToResultFile(t,",")}}function yp(e,t,n){return async(r,i)=>{const s=r.slice(n.vaultPath.length+1,-3),a=pp(Ir(r).replace(".md",""),s,await n.adapter.readFile(r),n,t);n.adapter.appendToResultFile(e,JSON.stringify(a,null,2)),i!=="LAST"&&n.adapter.appendToResultFile(e,",")}}async function bp(e,t=Date.now()){await e.adapter.initReadingVault(),await vp(e);const n=`${e.vaultPath}.tif.json`;try{e.adapter.removeFile(n)}catch{}e.adapter.appendToResultFile(n,`{ "version": "TanaIntermediateFile V0.1", "nodes": [ -`),await cc(e,e.vaultPath,mp(n,t,e),pp(e,n),_p(n,t,e)),e.adapter.flushResultsFromInitialProcessing(n),zl(e.summary),await bm(n,e);const r=Mm(Ir(e.vaultPath),t,e);r&&e.adapter.appendToResultFile(n,", "+JSON.stringify(r,null,2)),e.adapter.appendToResultFile(n,` - ]`);const i=Jm(e.superTagTracker);return i.length>0&&e.adapter.appendToResultFile(n,`, +`),await cc(e,e.vaultPath,gp(n,t,e),xp(e,n),yp(n,t,e)),e.adapter.flushResultsFromInitialProcessing(n),zl(e.summary),await bm(n,e);const r=Mm(Ir(e.vaultPath),t,e);r&&e.adapter.appendToResultFile(n,", "+JSON.stringify(r,null,2)),e.adapter.appendToResultFile(n,` + ]`);const i=np(e.superTagTracker);return i.length>0&&e.adapter.appendToResultFile(n,`, "supertags": `+JSON.stringify(i,null,2)),e.attributes.length>0&&e.adapter.appendToResultFile(n,`, "attributes": `+JSON.stringify(e.attributes,null,2)),e.adapter.appendToResultFile(n,`, "summary": `+JSON.stringify(e.summary,null,2)),e.adapter.appendToResultFile(n,` -}`),e.adapter.flushResultsFromInitialProcessing(n),e.summary}async function gp(e){const t=await ou(e,"daily-notes",n=>n||{format:"YYYY-MM-DD"});e.dailyNoteFormat=t.format,console.log("Using daily notes format "+t.format+" for detecting calendar nodes.")}async function xp(e,t,n,r){const i=new lu(e),s=um(t,i,r);return wp(s,n).then(a=>[a,s,i])}const yp=document.getElementById("vault-zip");yp.addEventListener("change",async e=>{let t,n=0;try{const r=e.target.files[0],i=r.name.slice(0,r.name.indexOf(".zip"));t=document.createElement("b"),t.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(t);const s=setInterval(()=>n++,1e3),[a,,l]=await xp(r,i,Date.now());clearInterval(s),document.body.removeChild(t);const o=document.createElement("b");o.innerHTML="Success! And it only took "+n+" seconds.
",document.body.appendChild(o);const f=document.createElement("h2");f.innerText="Summary:",document.body.appendChild(f);const d=document.createElement("p");d.innerText=Object.entries(a).map(w=>w[0]+": "+w[1]).join(` +}`),e.adapter.flushResultsFromInitialProcessing(n),e.summary}async function vp(e){const t=await ou(e,"daily-notes",n=>n||{format:"YYYY-MM-DD"});e.dailyNoteFormat=t.format,console.log("Using daily notes format "+t.format+" for detecting calendar nodes.")}async function kp(e,t,n,r){const i=new lu(e),s=um(t,i,r);return bp(s,n).then(a=>[a,s,i])}const Sp=document.getElementById("vault-zip");Sp.addEventListener("change",async e=>{let t,n=0;try{const r=e.target.files[0],i=r.name.slice(0,r.name.indexOf(".zip"));t=document.createElement("b"),t.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(t);const s=setInterval(()=>n++,1e3),[a,,l]=await kp(r,i,Date.now());clearInterval(s),document.body.removeChild(t);const o=document.createElement("b");o.innerHTML="Success! And it only took "+n+" seconds.
",document.body.appendChild(o);const f=document.createElement("h2");f.innerText="Summary:",document.body.appendChild(f);const d=document.createElement("p");d.innerText=Object.entries(a).map(w=>w[0]+": "+w[1]).join(` `),document.body.appendChild(d);const u=l.getResult(),p=document.createElement("button");p.innerText="Download TIF File",p.addEventListener("click",()=>{const w=URL.createObjectURL(new Blob([u])),D=document.createElement("a");D.style.display="none",D.href=w,D.download=i+".tif.json",document.body.appendChild(D),D.click(),URL.revokeObjectURL(w)}),document.body.appendChild(p)}catch(r){console.trace(r),t&&document.body.removeChild(t);const i=r.stack.toString();document.body.appendChild(document.createElement("br"));const s=document.createElement("b");if(s.innerText="An Error occured.",document.body.appendChild(s),i.toLowerCase().includes("readdirectory")){document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const l=document.createElement("b");l.innerText=`It probably has to do with a not properly zipped vault. Please check the text at the top again.`,document.body.appendChild(l)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack): `+i,document.body.appendChild(a)}}); -//# sourceMappingURL=index.7e3a4e90.js.map +//# sourceMappingURL=index.e8feb057.js.map diff --git a/docs/assets/index.7e3a4e90.js.map b/docs/assets/index.e8feb057.js.map similarity index 63% rename from docs/assets/index.7e3a4e90.js.map rename to docs/assets/index.e8feb057.js.map index 75fba5e..b1c0b34 100644 --- a/docs/assets/index.7e3a4e90.js.map +++ b/docs/assets/index.e8feb057.js.map @@ -1 +1 @@ -{"version":3,"file":"index.7e3a4e90.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: tags are too naive! ()\nexport function detectTags(content: string) {\n return content.match(tagRegex);\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tag without losing meaning because it will show up as a super tag anyways\n const lastTag = tags[tags.length - 1];\n if (tanaNode.name.endsWith(lastTag)) {\n tanaNode.name = tanaNode.name.slice(0, -lastTag.length);\n }\n\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","detectTags","cleanUpTag","tag","superTagUidRequests","tags","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","lastTag","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorPar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C,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file +{"version":3,"file":"index.e8feb057.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid if they are used\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: do inline tags work? or just the last one?\n\nconst nonDigit = new RegExp('\\\\D');\n\n// https://help.obsidian.md/How+to/Working+with+tags\n// only - _ and / are allowed\n// this is a brute force approach, because its not trivial to detect invalid tags in other languages\n// (can not use \\w for example because e.g. korean characters are excluded)\nconst disallowedSymbols = new Set([\n '#',\n '!',\n '{',\n '}',\n '(',\n ')',\n '?',\n '$',\n '%',\n '&',\n '\"',\n \"'\",\n '<',\n '>',\n '\\\\',\n '*',\n '`',\n '[',\n ']',\n]);\n\nexport function validTag(tag: string) {\n //currently whitespace is also detected as part of the tag\n tag = tag.trim();\n let char = tag[0];\n //sanity check\n if (char !== '#') {\n return false;\n }\n\n let foundNonDigit = false;\n\n for (let index = 1; index < tag.length; index++) {\n char = tag[index];\n if (char.match(nonDigit)) {\n foundNonDigit = true;\n }\n\n if (disallowedSymbols.has(char)) {\n return false;\n }\n }\n\n return foundNonDigit;\n}\n\nexport function detectTags(content: string) {\n return content.match(tagRegex)?.filter((tag) => validTag(tag));\n}\n\nexport function removeTagsFromEnd(content: string, tags: string[]) {\n let curContent = content;\n let globalRemovedTag = false;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let removedTag = false;\n for (const tag of tags) {\n if (curContent.endsWith(tag)) {\n curContent = curContent.slice(0, -tag.length);\n removedTag = true;\n globalRemovedTag = true;\n }\n }\n\n if (!removedTag) {\n break;\n }\n }\n\n //removing empty space at the end, because the tag detection only detects leading empty space\n if (globalRemovedTag) {\n curContent = curContent.trimEnd();\n }\n\n return curContent;\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags, removeTagsFromEnd } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tags without losing meaning because they will show up as super tags anyways\n tanaNode.name = removeTagsFromEnd(tanaNode.name, tags);\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","nonDigit","disallowedSymbols","validTag","tag","foundNonDigit","detectTags","removeTagsFromEnd","tags","curContent","globalRemovedTag","removedTag","cleanUpTag","superTagUidRequests","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAA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EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 599196b..06997c6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

diff --git a/src/converters/obsidian/markdown/tags.ts b/src/converters/obsidian/markdown/tags.ts index bb252fa..7e1a595 100644 --- a/src/converters/obsidian/markdown/tags.ts +++ b/src/converters/obsidian/markdown/tags.ts @@ -2,9 +2,89 @@ // eslint-disable-next-line no-useless-escape const tagRegex = /(?:\s|^)(#([^\[\]]+?))(?:(?=\s)|$)/g; -//TODO: tags are too naive! () +const nonDigit = new RegExp('\\D'); + +// https://help.obsidian.md/How+to/Working+with+tags +// only - _ and / are allowed +// this is a brute force approach, because its not trivial to detect invalid tags in other languages +// (can not use \w for example because e.g. korean characters are excluded) +const disallowedSymbols = new Set([ + '#', + '!', + '{', + '}', + '(', + ')', + '?', + '$', + '%', + '&', + '"', + "'", + '<', + '>', + '\\', + '*', + '`', + '[', + ']', +]); + +export function validTag(tag: string) { + //currently whitespace is also detected as part of the tag + tag = tag.trim(); + let char = tag[0]; + //sanity check + if (char !== '#') { + return false; + } + + let foundNonDigit = false; + + for (let index = 1; index < tag.length; index++) { + char = tag[index]; + if (char.match(nonDigit)) { + foundNonDigit = true; + } + + if (disallowedSymbols.has(char)) { + return false; + } + } + + return foundNonDigit; +} + export function detectTags(content: string) { - return content.match(tagRegex); + return content.match(tagRegex)?.filter((tag) => validTag(tag)); +} + +export function removeTagsFromEnd(content: string, tags: string[]) { + let curContent = content; + let globalRemovedTag = false; + + // eslint-disable-next-line no-constant-condition + while (true) { + let removedTag = false; + for (const tag of tags) { + if (curContent.endsWith(tag)) { + curContent = curContent.slice(0, -tag.length); + removedTag = true; + globalRemovedTag = true; + } + } + + if (!removedTag) { + break; + } + } + + //removing empty space at the end, because the tag detection only detects leading empty space + if (globalRemovedTag) { + curContent = curContent.trimEnd(); + } + + return curContent; } export function cleanUpTag(tag: string) { diff --git a/src/converters/obsidian/tanafeatures/postprocessing.ts b/src/converters/obsidian/tanafeatures/postprocessing.ts index 9deea81..0a84b81 100644 --- a/src/converters/obsidian/tanafeatures/postprocessing.ts +++ b/src/converters/obsidian/tanafeatures/postprocessing.ts @@ -3,7 +3,7 @@ import { HierarchyType } from '../hierarchy/markdownNodes'; import { VaultContext } from '../VaultContext'; import { superTagUidRequests } from './supertags'; import { removeTodo } from '../markdown/todo'; -import { detectTags } from '../markdown/tags'; +import { detectTags, removeTagsFromEnd } from '../markdown/tags'; import { handleImages } from './imageNodes'; import { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks'; @@ -30,12 +30,8 @@ export function postProcessContentNode( // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed const tags = detectTags(tanaNode.name); if (tags) { - //we can remove the last tag without losing meaning because it will show up as a super tag anyways - const lastTag = tags[tags.length - 1]; - if (tanaNode.name.endsWith(lastTag)) { - tanaNode.name = tanaNode.name.slice(0, -lastTag.length); - } - + //we can remove the last tags without losing meaning because they will show up as super tags anyways + tanaNode.name = removeTagsFromEnd(tanaNode.name, tags); tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true); } diff --git a/src/converters/obsidian/tests/fixtures/vault.zip b/src/converters/obsidian/tests/fixtures/vault.zip index 8f25098a47291fdab859cd60a03376596d771d95..543fad1545114b7d2ad3a37c4182486ddbfcfe45 100644 GIT binary patch delta 115 zcmbO$IahLmE_3FLw21~D%u9h(bsmV?_(qPAc`-;-WU?ZYGxMPpX_M2LiXcK#lfN+; p!k8}1mLLt28<@*M^yXj8p^RXIfI8Dy4ZvbES^b&7jMwa&SOD18D{ue+ delta 121 zcmbO$IahLmE~EYAg&ZQ2-!XAa^wMK~`QC40bsjT=kpIRva*WKs1pOx(h)h;wa%SHD z&2Mr#QxWqIkdV~mZ%l?TrVFzr^JXFc$qmfq%=^CkZT`g^$_O$6q%)1x0L0uplhvPz Nd9#fF=GW|-SOD}jD1-n2 diff --git a/src/converters/obsidian/tests/tags.test.ts b/src/converters/obsidian/tests/tags.test.ts new file mode 100644 index 0000000..952a779 --- /dev/null +++ b/src/converters/obsidian/tests/tags.test.ts @@ -0,0 +1,25 @@ +import { expect, test } from 'vitest'; +import { detectTags, removeTagsFromEnd } from '../markdown/tags'; + +test('tag detection test', () => { + expect(detectTags('')).toStrictEqual(undefined); + expect(detectTags('#tag')).toStrictEqual(['#tag']); + expect(detectTags(' #tag')).toStrictEqual([' #tag']); + expect(detectTags(' #inlinetag blub #endtag ')).toStrictEqual([' #inlinetag', ' #endtag']); +}); + +test('tag removal test', () => { + expect(removeTagsFromEnd('', detectTags('') ?? [])).toStrictEqual(''); + expect(removeTagsFromEnd('#tag', detectTags('#tag') as string[])).toStrictEqual(''); + expect(removeTagsFromEnd('blub #tag', detectTags('blub #tag ') as string[])).toStrictEqual('blub'); + expect(removeTagsFromEnd('#tag blub', detectTags('#tag blub') as string[])).toStrictEqual('#tag blub'); + expect(removeTagsFromEnd(' #tag', detectTags(' #tag') as string[])).toStrictEqual(''); + //only remove from the end + expect( + removeTagsFromEnd(' #inlinetag blub #endtag', detectTags(' #inlinetag blub #endtag') as string[]), + ).toStrictEqual(' #inlinetag blub'); + //remove multiple tags + expect(removeTagsFromEnd('blub #endtag0 #endtag1', detectTags('blub #endtag0 #endtag1') as string[])).toStrictEqual( + 'blub', + ); +}); From ae890ad9e75df797c651a9b582605c77ba2ccdf5 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sat, 5 Nov 2022 19:57:32 +0100 Subject: [PATCH 88/94] Obsidian: added more invalid symbols to tag detection filter --- docs/assets/{index.e8feb057.js => index.bc4aa878.js} | 4 ++-- .../{index.e8feb057.js.map => index.bc4aa878.js.map} | 2 +- docs/index.html | 2 +- src/converters/obsidian/markdown/tags.ts | 9 +++++++++ src/converters/obsidian/tests/tags.test.ts | 6 +++++- 5 files changed, 18 insertions(+), 5 deletions(-) rename docs/assets/{index.e8feb057.js => index.bc4aa878.js} (99%) rename docs/assets/{index.e8feb057.js.map => index.bc4aa878.js.map} (66%) diff --git a/docs/assets/index.e8feb057.js b/docs/assets/index.bc4aa878.js similarity index 99% rename from docs/assets/index.e8feb057.js rename to docs/assets/index.bc4aa878.js index b0208e3..0eb5d25 100644 --- a/docs/assets/index.e8feb057.js +++ b/docs/assets/index.bc4aa878.js @@ -16,7 +16,7 @@ L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L `&&i===` `)return[n-1];{const s=jm(e,n);if(s)return[n-1,s]}i=r,n++,r=e[n]}}function jm(e,t){let n=ic(e,t);return n||(n=nc(e,t),n)||(n=Es(e,t),n)||(n=tc(e,t),n)?n:null}var ft=(e=>(e.ROOT="Root",e.HEADING="Heading",e.BULLET="Bullet Node",e.PARAGRAPH="Paragraph",e.CODEBLOCK="Code Block",e.DATAVIEWATTRIBUTE="Data View Attribute",e))(ft||{});function Bm(e,t=0){const n=[];for(let r=t;r","\\","*","`","[","]"]);function Xm(e){e=e.trim();let t=e[0];if(t!=="#")return!1;let n=!1;for(let r=1;rXm(n))}function Qm(e,t){let n=e,r=!1;for(;;){let i=!1;for(const s of t)n.endsWith(s)&&(n=n.slice(0,-s.length),i=!0,r=!0);if(!i)break}return r&&(n=n.trimEnd()),n}function ep(e){return e.trim().slice(1)}function sc(e,t,n,r){return Array.from(new Set(e.map(i=>tp(i,t,n,r))))}function tp(e,t,n,r){let i=e;r&&(i=ep(e));let s=t.get(i);return s===void 0&&(s=n(),t.set(i,s)),s}function np(e){return Array.from(e.entries()).map(t=>({name:t[0],uid:t[1]}))}function rp(e){if(e.startsWith("[ ] "))return"todo";if(e.startsWith("[x] ")||e.startsWith("[X] "))return"done"}function ip(e,t){if(t===ft.BULLET){const n=rp(e);if(n)return[e.slice(4),n]}return null}function sp(e){const t=[];let n=Hi(e,0);for(;n!==null;){let r;Array.isArray(n)?(t.push(n),r=n[2]):r=n,n=Hi(e,r)}return t}function Hi(e,t){let n,r="",i="";for(let s=t;s","\\","*","`","[","]",":",",",";","~","=","\xA7",".","\xB0","^"]);function Xm(e){e=e.trim();let t=e[0];if(t!=="#")return!1;let n=!1;for(let r=1;rXm(n))}function Qm(e,t){let n=e,r=!1;for(;;){let i=!1;for(const s of t)n.endsWith(s)&&(n=n.slice(0,-s.length),i=!0,r=!0);if(!i)break}return r&&(n=n.trimEnd()),n}function ep(e){return e.trim().slice(1)}function sc(e,t,n,r){return Array.from(new Set(e.map(i=>tp(i,t,n,r))))}function tp(e,t,n,r){let i=e;r&&(i=ep(e));let s=t.get(i);return s===void 0&&(s=n(),t.set(i,s)),s}function np(e){return Array.from(e.entries()).map(t=>({name:t[0],uid:t[1]}))}function rp(e){if(e.startsWith("[ ] "))return"todo";if(e.startsWith("[x] ")||e.startsWith("[X] "))return"done"}function ip(e,t){if(t===ft.BULLET){const n=rp(e);if(n)return[e.slice(4),n]}return null}function sp(e){const t=[];let n=Hi(e,0);for(;n!==null;){let r;Array.isArray(n)?(t.push(n),r=n[2]):r=n,n=Hi(e,r)}return t}function Hi(e,t){let n,r="",i="";for(let s=t;s{const f=o[0],d=o[1];if(i.every(u=>f.trim()!==u.name||d.trim()!==u.mediaUrl)){const u=o[3],p=Wt(n);s.add(p),e.name=e.name.replaceAll(u,"[["+p+"]]"),i.push({uid:p,name:f.trim(),createdAt:t,editedAt:t,type:"image",mediaUrl:d.trim()})}}),s.size>0&&(e.refs=[...(a=e.refs)!=null?a:[],...Array.from(s.values())]),e.children=[...(l=e.children)!=null?l:[],...i]}function oc(e,t,n,r,i,s){var u;const[a,l]=(u=ip(r.name,s))!=null?u:[r.name,void 0];r.name=a,r.todoState=l;const[o,f]=Jl(e,t,r.name,i);r.uid=o,r.name=f,r.name=r.name.replace("collapsed:: true","").replace(/^#+ /,"").trim();const d=Jm(r.name);return d&&(r.name=Qm(r.name,d),r.supertags=sc(d,i.superTagTracker,i.idGenerator,!0)),vm(r,i),op(r,n,i),r}function lc(e,t,n,r,i,s,a,l){let o=l;return r&&r.length>0&&(o=l!=null?l:[],o==null||o.push(...r.map(f=>oc(e,t,i,{name:f,type:"node",createdAt:i,editedAt:i},s)))),cp(n,s.attributes),s.summary.fields++,{uid:a!=null?a:Wt(s),name:n,type:"field",createdAt:i,editedAt:i,children:o}}function lp(e,t,n,r,i){return lc(e,t,n.key,n.values,r,i)}function cp(e,t){const n=t.filter(r=>r.name===e)[0];n?n.count++:t.push({name:e,values:[],count:1})}function dp(e,t,n){return{uid:Wt(n),name:Nm(e),createdAt:t,editedAt:t,codeLanguage:e.codeLanguage,type:"codeblock"}}function fp(e,t,n,r,i){if(n.type===ft.DATAVIEWATTRIBUTE||rc(n.content)){const[s,a]=Jl(e,t,n.content,i),l=a.split("::");return l[1]===void 0&&console.log(n.content,a,l),lc(e,t,l[0],[l[1].trim()],r,i,s)}}function up(e,t,n,r,i){if(n.type===ft.CODEBLOCK)return dp(n,r,i);const s=fp(e,t,n,r,i);return s||oc(e,t,r,{name:n.content,createdAt:r,editedAt:r,type:"node"},i,n.type)}function hp(e){if(e.startsWith(`--- `)){const t=e.indexOf(` @@ -46,4 +46,4 @@ L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L Please check the text at the top again.`,document.body.appendChild(l)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack): `+i,document.body.appendChild(a)}}); -//# sourceMappingURL=index.e8feb057.js.map +//# sourceMappingURL=index.bc4aa878.js.map diff --git a/docs/assets/index.e8feb057.js.map b/docs/assets/index.bc4aa878.js.map similarity index 66% rename from docs/assets/index.e8feb057.js.map rename to docs/assets/index.bc4aa878.js.map index b1c0b34..ecb8007 100644 --- a/docs/assets/index.e8feb057.js.map +++ b/docs/assets/index.bc4aa878.js.map @@ -1 +1 @@ -{"version":3,"file":"index.e8feb057.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid if they are used\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\n//TODO: do inline tags work? or just the last one?\n\nconst nonDigit = new RegExp('\\\\D');\n\n// https://help.obsidian.md/How+to/Working+with+tags\n// only - _ and / are allowed\n// this is a brute force approach, because its not trivial to detect invalid tags in other languages\n// (can not use \\w for example because e.g. korean characters are excluded)\nconst disallowedSymbols = new Set([\n '#',\n '!',\n '{',\n '}',\n '(',\n ')',\n '?',\n '$',\n '%',\n '&',\n '\"',\n \"'\",\n '<',\n '>',\n '\\\\',\n '*',\n '`',\n '[',\n ']',\n]);\n\nexport function validTag(tag: string) {\n //currently whitespace is also detected as part of the tag\n tag = tag.trim();\n let char = tag[0];\n //sanity check\n if (char !== '#') {\n return false;\n }\n\n let foundNonDigit = false;\n\n for (let index = 1; index < tag.length; index++) {\n char = tag[index];\n if (char.match(nonDigit)) {\n foundNonDigit = true;\n }\n\n if (disallowedSymbols.has(char)) {\n return false;\n }\n }\n\n return foundNonDigit;\n}\n\nexport function detectTags(content: string) {\n return content.match(tagRegex)?.filter((tag) => validTag(tag));\n}\n\nexport function removeTagsFromEnd(content: string, tags: string[]) {\n let curContent = content;\n let globalRemovedTag = false;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let removedTag = false;\n for (const tag of tags) {\n if (curContent.endsWith(tag)) {\n curContent = curContent.slice(0, -tag.length);\n removedTag = true;\n globalRemovedTag = true;\n }\n }\n\n if (!removedTag) {\n break;\n }\n }\n\n //removing empty space at the end, because the tag detection only detects leading empty space\n if (globalRemovedTag) {\n curContent = curContent.trimEnd();\n }\n\n return curContent;\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags, removeTagsFromEnd } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tags without losing meaning because they will show up as super tags anyways\n tanaNode.name = removeTagsFromEnd(tanaNode.name, tags);\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","nonDigit","disallowedSymbols","validTag","tag","foundNonDigit","detectTags","removeTagsFromEnd","tags","curContent","globalRemovedTag","removedTag","cleanUpTag","superTagUidRequests","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAAU,YAAc,OAExBA,EAAU,YAAc,cACrBA,CACV,CACD,SAASN,EAAeD,EAAM,CAC1B,GAAIA,EAAK,GAEL,OACJA,EAAK,GAAK,GAEV,MAAMO,EAAYF,EAAaL,CAAI,EACnC,MAAMA,EAAK,KAAMO,CAAS,CAC7B,CACL,KCHA,MAAMC,GAAW,GACXC,GAAU,GACVC,GAAW,GAEXC,GAAe,GACfC,GAAW,IACXC,GAAWD,GAAW,EAAID,GAC1BG,GAAa,EAAID,GAAU,EAE3BE,GAAY,IAGZC,GAAc,EAGdC,GAAU,GAGVC,GAAY,GAGZC,GAAc,GAMdC,GAAW,EAAI,EAGfC,GAAwB,GAGxBC,GAAa,EACbC,GAAiB,EACjBC,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,iBAAiB,QAAS,IAAM,CACvC,MAAAlyC,EAAM,IAAI,gBAAgB,IAAI,KAAK,CAAC9X,CAAM,CAAC,CAAC,EAC5C7P,EAAI,SAAS,cAAc,GAAG,EACpCA,EAAE,MAAM,QAAU,OAClBA,EAAE,KAAO2nB,EACT3nB,EAAE,SAAWo5D,EAAY,YAChB,SAAA,KAAK,YAAYp5D,CAAC,EAC3BA,EAAE,MAAM,EACR,IAAI,gBAAgB2nB,CAAG,CAAA,CACxB,EACQ,SAAA,KAAK,YAAYkyC,CAAc,QACjCp1C,GACP,QAAQ,MAAMA,CAAK,EAEf80C,GACO,SAAA,KAAK,YAAYA,CAAQ,EAI9B,MAAAO,EAAoBr1C,EAAc,MAAM,SAAS,EAEvD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAs1C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file +{"version":3,"file":"index.bc4aa878.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid if they are used\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\nconst nonDigit = new RegExp('\\\\D');\n\n// https://help.obsidian.md/How+to/Working+with+tags\n// only - _ and / are allowed\n// this is a brute force approach, because its not trivial to detect invalid tags in other languages\n// (can not use \\w for example because e.g. korean characters are excluded)\nconst disallowedSymbols = new Set([\n '#',\n '!',\n '{',\n '}',\n '(',\n ')',\n '?',\n '$',\n '%',\n '&',\n '\"',\n \"'\",\n '<',\n '>',\n '\\\\',\n '*',\n '`',\n '[',\n ']',\n ':',\n ',',\n ';',\n '~',\n '=',\n '§',\n '.',\n '°',\n '^',\n]);\n\nexport function validTag(tag: string) {\n //currently whitespace is also detected as part of the tag\n tag = tag.trim();\n let char = tag[0];\n //sanity check\n if (char !== '#') {\n return false;\n }\n\n let foundNonDigit = false;\n\n for (let index = 1; index < tag.length; index++) {\n char = tag[index];\n if (char.match(nonDigit)) {\n foundNonDigit = true;\n }\n\n if (disallowedSymbols.has(char)) {\n return false;\n }\n }\n\n return foundNonDigit;\n}\n\nexport function detectTags(content: string) {\n return content.match(tagRegex)?.filter((tag) => validTag(tag));\n}\n\nexport function removeTagsFromEnd(content: string, tags: string[]) {\n let curContent = content;\n let globalRemovedTag = false;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let removedTag = false;\n for (const tag of tags) {\n if (curContent.endsWith(tag)) {\n curContent = curContent.slice(0, -tag.length);\n removedTag = true;\n globalRemovedTag = true;\n }\n }\n\n if (!removedTag) {\n break;\n }\n }\n\n //removing empty space at the end, because the tag detection only detects leading empty space\n if (globalRemovedTag) {\n curContent = curContent.trimEnd();\n }\n\n return curContent;\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags, removeTagsFromEnd } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tags without losing meaning because they will show up as super tags anyways\n tanaNode.name = removeTagsFromEnd(tanaNode.name, tags);\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","nonDigit","disallowedSymbols","validTag","tag","foundNonDigit","detectTags","removeTagsFromEnd","tags","curContent","globalRemovedTag","removedTag","cleanUpTag","superTagUidRequests","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,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G,CAAA,CACxB,EACQ,SAAA,KAAK,YAAYkyC,CAAc,QACjCp1C,GACP,QAAQ,MAAMA,CAAK,EAEf80C,GACO,SAAA,KAAK,YAAYA,CAAQ,EAI9B,MAAAO,EAAoBr1C,EAAc,MAAM,SAAS,EAEvD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAs1C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 06997c6..f4ff845 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

diff --git a/src/converters/obsidian/markdown/tags.ts b/src/converters/obsidian/markdown/tags.ts index 7e1a595..8d88e98 100644 --- a/src/converters/obsidian/markdown/tags.ts +++ b/src/converters/obsidian/markdown/tags.ts @@ -28,6 +28,15 @@ const disallowedSymbols = new Set([ '`', '[', ']', + ':', + ',', + ';', + '~', + '=', + '§', + '.', + '°', + '^', ]); export function validTag(tag: string) { diff --git a/src/converters/obsidian/tests/tags.test.ts b/src/converters/obsidian/tests/tags.test.ts index 952a779..049c259 100644 --- a/src/converters/obsidian/tests/tags.test.ts +++ b/src/converters/obsidian/tests/tags.test.ts @@ -5,7 +5,11 @@ test('tag detection test', () => { expect(detectTags('')).toStrictEqual(undefined); expect(detectTags('#tag')).toStrictEqual(['#tag']); expect(detectTags(' #tag')).toStrictEqual([' #tag']); - expect(detectTags(' #inlinetag blub #endtag ')).toStrictEqual([' #inlinetag', ' #endtag']); + expect(detectTags(' #inlinetag1 blub #endtag ')).toStrictEqual([' #inlinetag1', ' #endtag']); + expect(detectTags('#11) #inlinetag #123 blub #endtag #2
#Readwise! #1**')).toStrictEqual([ + ' #inlinetag', + ' #endtag', + ]); }); test('tag removal test', () => { From b616690b2f61d74a630de17e4c4103f382d8e439 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sat, 5 Nov 2022 22:18:34 +0100 Subject: [PATCH 89/94] Obsidian: be more lenient in multi-line bullet content --- .../{index.bc4aa878.js => index.83e0e1b3.js} | 4 +- ....bc4aa878.js.map => index.83e0e1b3.js.map} | 2 +- docs/index.html | 2 +- src/converters/obsidian/hierarchy/bullets.ts | 16 +- .../obsidian/tests/fixtures/full.tif.json | 161 ++++++++++-------- .../obsidian/tests/fixtures/vault.zip | Bin 3229 -> 3245 bytes .../tests/fixtures/vault/04-10-2022.md | 7 +- 7 files changed, 110 insertions(+), 82 deletions(-) rename docs/assets/{index.bc4aa878.js => index.83e0e1b3.js} (99%) rename docs/assets/{index.bc4aa878.js.map => index.83e0e1b3.js.map} (64%) diff --git a/docs/assets/index.bc4aa878.js b/docs/assets/index.83e0e1b3.js similarity index 99% rename from docs/assets/index.bc4aa878.js rename to docs/assets/index.83e0e1b3.js index 0eb5d25..9c08981 100644 --- a/docs/assets/index.bc4aa878.js +++ b/docs/assets/index.83e0e1b3.js @@ -11,7 +11,7 @@ Arguments: `+Array.prototype.slice.call(r).join("")+` L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L.months=R1;L.isDate=jn;L.locale=Pt;L.invalid=Lr;L.duration=st;L.isMoment=it;L.weekdays=I1;L.parseZone=O1;L.localeData=St;L.isDuration=dr;L.monthsShort=M1;L.weekdaysMin=L1;L.defineLocale=ms;L.updateLocale=O0;L.locales=R0;L.weekdaysShort=F1;L.normalizeUnits=Ke;L.relativeTimeRounding=lm;L.relativeTimeThreshold=cm;L.calendarFormat=Eh;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Wi(e,t){const n=L(e,t,!0);if(n.isValid())return n.format("MM-DD-YYYY")}function fm(e){return Ir(e)!==e}class hi{constructor(){Bt(this,"nameWasCalledAsFile",[]);Bt(this,"pathMap",new Map);Bt(this,"nameMap",new Map)}accessAsFile(t,n,r,i){const s=Wi(t,i);s&&(t=s);const a=this.pathMap.get(n);if(a)return this.nameMap.get(t)||this.nameMap.set(t,a),a;const l=this.nameMap.get(t);if(l&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,l),this.nameWasCalledAsFile.push(t),l;const o=r(s);return this.pathMap.set(n,o),this.nameMap.get(t)||this.nameMap.set(t,o),this.nameWasCalledAsFile.push(t),o}accessAsLink(t,n,r){const i=Wi(t,r);i&&(t=i);const s=this.findData(t);if(s)return s;const a=fm(t),l=n(i);return a?this.pathMap.set(t,l):this.nameMap.set(t,l),l}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Zr(e){e.totalNodes++,e.leafNodes++}function zl(e){e.leafNodes--,e.topLevelNodes++}function um(e,t,n=cu,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new hi,headingTracker:new hi,dummyHeadingLinkTracker:new Map,blockLinkTracker:new hi,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function Wt(e){return Zr(e.summary),e.idGenerator()}function hm(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map,t.dailyNoteFormat);let s=i.get(r);return s||(s={uid:Wt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function mm(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map,n.dailyNoteFormat);let a=s.get(i);return a||(a={uid:Wt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function pm(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function _m(e){let t;return[e.split(` `).map(r=>{const i=r.split(" "),s=i[i.length-1];return s.startsWith("^")?(t=s,i.slice(0,-1).join(" ")):r}).join(` `),t]}function $l(e,t,n,r,i,s){const a=[t],l=[e];for(const o of n){const f=i(o);wm(f,o,a,l,r),s==null||s(f,o)}}function wm(e,t,n,r,i){var l;gm(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(l=a.children)!=null?l:[],a.children.push(e)),n.push(t),r.push(e)}function gm(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function Kl(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=Kl(n.children,r);if(i)return i}}return null}function xm(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function ym(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const l=t.findData(s);if(l){const o={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};$l(f,o,l,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=Kl(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function bm(e,t){const[n,r]=ym(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Zr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let l=a;s.forEach(o=>{l=l.replace(o.old,o.new)}),await t.adapter.appendToPostProcessingFile(i,l)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var Xl=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(Xl||{});function vm(e,t){const n=km(e.name,t);if(n.length>0){const r=new Set;e.refs||(e.refs=[]);for(const[i,s,a]of n)r.add(s),e.name=e.name.replaceAll("[["+i+"]]",a);e.refs.push(...Array.from(r.values()))}}function km(e,t){return du(e,!0).map(n=>[n,n.split("|").map(r=>r.trim())]).filter(n=>n[1][0]!=="").map(n=>{const r=n[1],i=r[0],s=r[1],a=Dm(i,t),l=s!==void 0&&s.trim()!==""?"["+s.trim()+"]([["+a+"]])":"[["+a+"]]";return[n[0],a,l]})}function Sm(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function Em(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function Dm(e,t){const n=Sm(e);switch(Em(n)){case 0:return Tm(n[0],t);case 2:return hm(n,t);case 1:return xm(n,t);default:throw"Invalid link type detected: "+n}}function Tm(e,t){return t.defaultLinkTracker.accessAsLink(e,r=>(Zr(t.summary),{uid:r!=null?r:t.idGenerator(),obsidianLink:e,type:1}),t.dailyNoteFormat).uid}function Jl(e,t,n,r){const[i,s]=_m(n);return s?[mm([e,s],t,r),i]:[Wt(r),n]}function Am(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,s=>(Zr(n.summary),{uid:s!=null?s:n.idGenerator(),obsidianLink:r,type:0}),n.dailyNoteFormat);return i.type=0,i.uid}function Om(e){const t=[];for(const n of e.getData())n.type===Xl.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function Rm(e){return[...e.invalidLinks,...Om(e.defaultLinkTracker),...pm(e.blockLinkTracker)]}function Mm(e,t,n){const r=Rm(n).sort((a,l)=>a.link.localeCompare(l.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:Wt(n),name:i,createdAt:t,editedAt:t,type:"node"};return zl(n.summary),s.children=r,s}function ks(e){return e===" "||e===" "}function Zn(e,t){let n=0;for(;ks(e[t+n]);)n++;return n}function Im(e,t){let n=t,r=e[t];for(;ks(r);)n--,r=e[n];return n+1}function Ut(e,t){let n=0;for(;!Ss(e[t+n]);)n++;return t+n}function Ql(e,t){const n=e[t-1];return Ss(n)}function Ss(e){return e===void 0||e===` -`}function ec(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function Es(e,t){let n=!0;const r=t+Zn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ec(e,r));const a=Im(e,r-1)-1,l=e[a];return Ss(l)&&n?{type:ft.BULLET,level:r-a-1}:null}function Fm(e,t,n){let r=t+n.level;if(ec(e,r))return r;r+=1+1;const i=Zn(e,r);return r+i}function Lm(e,t,n){let r=Ut(e,t+n.level+1+1),i=e[r];for(;;){const s=Zn(e,r+1);if(s==n.level+2&&!Es(e,r+1+s))r=Ut(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Cm(e,t){return e+t.level}function Nm(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=Zn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function tc(e,t){if(!Ql(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=Ut(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],l=e[i+2];for(;[s,a,l].every(d=>d!==void 0)&&[s,a,l].join("")!=="```";)i++,s=e[i],a=e[i+1],l=e[i+2];if([s,a,l].some(d=>d===void 0))return null;const o=Ut(e,i+3);return e.slice(i+3,o).trim()!==""?null:{type:ft.CODEBLOCK,level:o-t+(e[o]===` +`}function ec(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function Es(e,t){let n=!0;const r=t+Zn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ec(e,r));const a=Im(e,r-1)-1,l=e[a];return Ss(l)&&n?{type:ft.BULLET,level:r-a-1}:null}function Fm(e,t,n){let r=t+n.level;if(ec(e,r))return r;r+=1+1;const i=Zn(e,r);return r+i}function Lm(e,t,n){let r=Ut(e,t+n.level+1+1),i=e[r];for(;;){const s=Zn(e,r+1);if(s>0&&(s==n.level+2||s==n.level)&&!Es(e,r+1+s))r=Ut(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Cm(e,t){return e+t.level}function Nm(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=Zn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function tc(e,t){if(!Ql(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=Ut(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],l=e[i+2];for(;[s,a,l].every(d=>d!==void 0)&&[s,a,l].join("")!=="```";)i++,s=e[i],a=e[i+1],l=e[i+2];if([s,a,l].some(d=>d===void 0))return null;const o=Ut(e,i+3);return e.slice(i+3,o).trim()!==""?null:{type:ft.CODEBLOCK,level:o-t+(e[o]===` `?1:0),codeLanguage:r!==""?r:void 0}}return null}function Pm(e,t){return Ut(e,t)}function nc(e,t){const n=Ut(e,t),r=e.slice(t,n);return rc(r)?{type:ft.DATAVIEWATTRIBUTE,level:0}:null}function rc(e){const t=e.split("::");return t.length===2&&t[0].trim()===t[0]&&t[0]!==""&&t[1]!==""&&t[1]!==" "&&ks(t[1][0])}function ic(e,t){if(!Ql(e,t))return null;const n=Um(e,t);return n>0&&e[t+n]===" "?{type:ft.HEADING,level:n}:null}function Um(e,t){let n=t,r=0;for(;e[n]==="#";)n++,r++;return r}function Ym(e,t,n){const r=t+n.level+1,i=Zn(e,r);return r+i}function Wm(e,t,n){return Ut(e,t+n.level+1)}function Hm(e,t){let n=Ut(e,t),r=e[n],i=r;for(n++,r=e[n];;){if(r===void 0)return[n];if(r===` `&&i===` `)return[n-1];{const s=jm(e,n);if(s)return[n-1,s]}i=r,n++,r=e[n]}}function jm(e,t){let n=ic(e,t);return n||(n=nc(e,t),n)||(n=Es(e,t),n)||(n=tc(e,t),n)?n:null}var ft=(e=>(e.ROOT="Root",e.HEADING="Heading",e.BULLET="Bullet Node",e.PARAGRAPH="Paragraph",e.CODEBLOCK="Code Block",e.DATAVIEWATTRIBUTE="Data View Attribute",e))(ft||{});function Bm(e,t=0){const n=[];for(let r=t;r {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid if they are used\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n //TODO: numbered? Works but might search one char extra, oh no\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\nconst nonDigit = new RegExp('\\\\D');\n\n// https://help.obsidian.md/How+to/Working+with+tags\n// only - _ and / are allowed\n// this is a brute force approach, because its not trivial to detect invalid tags in other languages\n// (can not use \\w for example because e.g. korean characters are excluded)\nconst disallowedSymbols = new Set([\n '#',\n '!',\n '{',\n '}',\n '(',\n ')',\n '?',\n '$',\n '%',\n '&',\n '\"',\n \"'\",\n '<',\n '>',\n '\\\\',\n '*',\n '`',\n '[',\n ']',\n ':',\n ',',\n ';',\n '~',\n '=',\n '§',\n '.',\n '°',\n '^',\n]);\n\nexport function validTag(tag: string) {\n //currently whitespace is also detected as part of the tag\n tag = tag.trim();\n let char = tag[0];\n //sanity check\n if (char !== '#') {\n return false;\n }\n\n let foundNonDigit = false;\n\n for (let index = 1; index < tag.length; index++) {\n char = tag[index];\n if (char.match(nonDigit)) {\n foundNonDigit = true;\n }\n\n if (disallowedSymbols.has(char)) {\n return false;\n }\n }\n\n return foundNonDigit;\n}\n\nexport function detectTags(content: string) {\n return content.match(tagRegex)?.filter((tag) => validTag(tag));\n}\n\nexport function removeTagsFromEnd(content: string, tags: string[]) {\n let curContent = content;\n let globalRemovedTag = false;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let removedTag = false;\n for (const tag of tags) {\n if (curContent.endsWith(tag)) {\n curContent = curContent.slice(0, -tag.length);\n removedTag = true;\n globalRemovedTag = true;\n }\n }\n\n if (!removedTag) {\n break;\n }\n }\n\n //removing empty space at the end, because the tag detection only detects leading empty space\n if (globalRemovedTag) {\n curContent = curContent.trimEnd();\n }\n\n return curContent;\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags, removeTagsFromEnd } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tags without losing meaning because they will show up as super tags anyways\n tanaNode.name = removeTagsFromEnd(tanaNode.name, tags);\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","nonDigit","disallowedSymbols","validTag","tag","foundNonDigit","detectTags","removeTagsFromEnd","tags","curContent","globalRemovedTag","removedTag","cleanUpTag","superTagUidRequests","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAW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p1C,GACP,QAAQ,MAAMA,CAAK,EAEf80C,GACO,SAAA,KAAK,YAAYA,CAAQ,EAI9B,MAAAO,EAAoBr1C,EAAc,MAAM,SAAS,EAEvD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAs1C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file +{"version":3,"file":"index.83e0e1b3.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid if they are used\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n\n //but also if they are just equal to the hierachy-level:\n //e.g.\n //- Text1\n // - Text2\n // Text3\n //Text4\n //\"Text3\" is still part of Text2 because Obsidian allows that!\n //but not \"Text4\" because its on the zero level\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (\n emptySpaces > 0 &&\n (emptySpaces == hierarchy.level + 2 || emptySpaces == hierarchy.level) &&\n !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)\n ) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\nconst nonDigit = new RegExp('\\\\D');\n\n// https://help.obsidian.md/How+to/Working+with+tags\n// only - _ and / are allowed\n// this is a brute force approach, because its not trivial to detect invalid tags in other languages\n// (can not use \\w for example because e.g. korean characters are excluded)\nconst disallowedSymbols = new Set([\n '#',\n '!',\n '{',\n '}',\n '(',\n ')',\n '?',\n '$',\n '%',\n '&',\n '\"',\n \"'\",\n '<',\n '>',\n '\\\\',\n '*',\n '`',\n '[',\n ']',\n ':',\n ',',\n ';',\n '~',\n '=',\n '§',\n '.',\n '°',\n '^',\n]);\n\nexport function validTag(tag: string) {\n //currently whitespace is also detected as part of the tag\n tag = tag.trim();\n let char = tag[0];\n //sanity check\n if (char !== '#') {\n return false;\n }\n\n let foundNonDigit = false;\n\n for (let index = 1; index < tag.length; index++) {\n char = tag[index];\n if (char.match(nonDigit)) {\n foundNonDigit = true;\n }\n\n if (disallowedSymbols.has(char)) {\n return false;\n }\n }\n\n return foundNonDigit;\n}\n\nexport function detectTags(content: string) {\n return content.match(tagRegex)?.filter((tag) => validTag(tag));\n}\n\nexport function removeTagsFromEnd(content: string, tags: string[]) {\n let curContent = content;\n let globalRemovedTag = false;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let removedTag = false;\n for (const tag of tags) {\n if (curContent.endsWith(tag)) {\n curContent = curContent.slice(0, -tag.length);\n removedTag = true;\n globalRemovedTag = true;\n }\n }\n\n if (!removedTag) {\n break;\n }\n }\n\n //removing empty space at the end, because the tag detection only detects leading empty space\n if (globalRemovedTag) {\n curContent = curContent.trimEnd();\n }\n\n return curContent;\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags, removeTagsFromEnd } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tags without losing meaning because they will show up as super tags anyways\n tanaNode.name = removeTagsFromEnd(tanaNode.name, tags);\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","nonDigit","disallowedSymbols","validTag","tag","foundNonDigit","detectTags","removeTagsFromEnd","tags","curContent","globalRemovedTag","removedTag","cleanUpTag","superTagUidRequests","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAA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docs/index.html b/docs/index.html index f4ff845..4e5eade 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

diff --git a/src/converters/obsidian/hierarchy/bullets.ts b/src/converters/obsidian/hierarchy/bullets.ts index 0b50994..0c08a49 100644 --- a/src/converters/obsidian/hierarchy/bullets.ts +++ b/src/converters/obsidian/hierarchy/bullets.ts @@ -47,15 +47,27 @@ export function findBulletSliceStartPosition(content: string, curPosition: numbe export function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) { //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol - //TODO: numbered? Works but might search one char extra, oh no let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1); let char = content[endPosition]; // eslint-disable-next-line no-constant-condition while (true) { //new lines that start with the number of empty spaces of the level+1 are considered part of the node + + //but also if they are just equal to the hierachy-level: + //e.g. + //- Text1 + // - Text2 + // Text3 + //Text4 + //"Text3" is still part of Text2 because Obsidian allows that! + //but not "Text4" because its on the zero level const emptySpaces = countEmptySpace(content, endPosition + 1); - if (emptySpaces == hierarchy.level + 2 && !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)) { + if ( + emptySpaces > 0 && + (emptySpaces == hierarchy.level + 2 || emptySpaces == hierarchy.level) && + !detectBulletHierarchy(content, endPosition + 1 + emptySpaces) + ) { endPosition = nextNewLine(content, endPosition + 1); char = content[endPosition]; } else { diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index f5b7fe5..a8c6b0b 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -121,12 +121,12 @@ "refs": ["21"] }, { - "name": "[[70]]", + "name": "[[73]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "22", - "refs": ["70"] + "refs": ["73"] }, { "name": "[[25]]", @@ -151,7 +151,18 @@ "type": "node", "uid": "28", "refs": ["29"] - } + }, + { + "name": "Text1", + "createdAt": 1, + "editedAt": 1, + "type": "node", + "uid": "30", + "children": [ + { "name": "Text2\n Text3", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "31" } + ] + }, + { "name": "Text4", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "32" } ] } ] @@ -161,30 +172,30 @@ ] }, { - "uid": "37", + "uid": "40", "name": "test", "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["32", "33"], + "supertags": ["35", "36"], "children": [ { - "uid": "31", + "uid": "34", "name": "field0", "type": "field", "createdAt": 1, "editedAt": 1, - "children": [{ "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "30" }] + "children": [{ "name": "zero", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "33" }] }, { - "uid": "36", + "uid": "39", "name": "field1", "type": "field", "createdAt": 1, "editedAt": 1, "children": [ - { "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "34" }, - { "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "35" } + { "name": "value1", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "37" }, + { "name": "value2", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "38" } ] }, { @@ -192,7 +203,7 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "38", + "uid": "41", "refs": ["8"] }, { @@ -200,33 +211,33 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "39", + "uid": "42", "children": [ - { "name": "[[11]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "40", "refs": ["11"] }, - { "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "41" }, + { "name": "[[11]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "43", "refs": ["11"] }, + { "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "44" }, { "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "42", + "uid": "45", "children": [ - { "name": "```", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "43" }, + { "name": "```", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "46" }, { - "name": "Invalid Heading [[!45!]]", + "name": "Invalid Heading [[!48!]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "44", - "refs": ["!45!"], + "uid": "47", + "refs": ["!48!"], "children": [ { "name": "Block with #inlinetag2 [alias]([[16]]) [[16]] [[17]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "46", - "supertags": ["47", "48"], + "uid": "49", + "supertags": ["50", "51"], "refs": ["16", "17"] }, { @@ -234,13 +245,13 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "49", - "supertags": ["47"] + "uid": "52", + "supertags": ["50"] } ] }, { - "uid": "50", + "uid": "53", "name": "(defn meta-data-finished? [process]\n (let [{meta-data :meta-data, :or {}} process\n {a :a, b :b, c :c} meta-data] ; any one could be missing!\n (not-any? nil? [a b c])))", "createdAt": 1, "editedAt": 1, @@ -252,15 +263,15 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "51", + "uid": "54", "children": [ - { "uid": "52", "name": "code here", "createdAt": 1, "editedAt": 1, "type": "codeblock" }, + { "uid": "55", "name": "code here", "createdAt": 1, "editedAt": 1, "type": "codeblock" }, { "name": "single image", "createdAt": 1, "editedAt": 1, "type": "image", - "uid": "53", + "uid": "56", "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { @@ -268,19 +279,19 @@ "createdAt": 1, "editedAt": 1, "type": "image", - "uid": "54", + "uid": "57", "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "name": "[[56]] [[57]]", + "name": "[[59]] [[60]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "55", - "refs": ["56", "57"], + "uid": "58", + "refs": ["59", "60"], "children": [ { - "uid": "56", + "uid": "59", "name": "multiple images", "createdAt": 1, "editedAt": 1, @@ -288,7 +299,7 @@ "mediaUrl": "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100" }, { - "uid": "57", + "uid": "60", "name": "multiple images 2", "createdAt": 1, "editedAt": 1, @@ -298,15 +309,15 @@ ] }, { - "name": "[[59]] [[59]]", + "name": "[[62]] [[62]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "58", - "refs": ["59"], + "uid": "61", + "refs": ["62"], "children": [ { - "uid": "59", + "uid": "62", "name": "same image", "createdAt": 1, "editedAt": 1, @@ -320,7 +331,7 @@ "createdAt": 1, "editedAt": 1, "type": "image", - "uid": "60", + "uid": "63", "mediaUrl": "http://dankoboldt.com/wp-content/uploads/2020/07/ancient-public-baths.jpg" } ] @@ -332,7 +343,7 @@ ] }, { - "uid": "61", + "uid": "64", "name": "folder", "createdAt": 1, "editedAt": 1, @@ -344,14 +355,14 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "supertags": ["32", "33"], + "supertags": ["35", "36"], "children": [ { "name": "Starting without [[8]] 2.", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "62", + "uid": "65", "refs": ["8"] }, { @@ -359,41 +370,41 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "63", + "uid": "66", "children": [ - { "name": "[[11]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "64", "refs": ["11"] }, + { "name": "[[11]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "67", "refs": ["11"] }, { "name": "Stuff but with\na newline.", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "65" + "uid": "68" }, { - "uid": "66", + "uid": "69", "name": "Key1", "type": "field", "createdAt": 1, "editedAt": 1, "children": [ - { "name": "[[68]]", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "67", "refs": ["68"] } + { "name": "[[71]]", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "70", "refs": ["71"] } ] }, - { "name": "KeyX::ValueY", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "69" }, + { "name": "KeyX::ValueY", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "72" }, { "name": "Heading 2", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "70", + "uid": "73", "children": [ { - "name": "Valid Heading [[51]] with duplicate but valid", + "name": "Valid Heading [[54]] with duplicate but valid", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "27", - "refs": ["51"], + "refs": ["54"], "children": [ { "name": "Node with [[16]] [[17]]", @@ -401,25 +412,25 @@ "editedAt": 1, "type": "node", "todoState": "done", - "uid": "72", + "uid": "75", "refs": ["16", "17"] }, { - "name": "Fun with missing block ref [[74]] [[75]]", + "name": "Fun with missing block ref [[77]] [[78]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "73", - "refs": ["74", "75"] + "uid": "76", + "refs": ["77", "78"] }, { - "uid": "76", + "uid": "79", "name": "Key2", "type": "field", "createdAt": 1, "editedAt": 1, "children": [ - { "name": "Value2", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "77" } + { "name": "Value2", "type": "node", "createdAt": 1, "editedAt": 1, "uid": "80" } ] } ] @@ -429,15 +440,15 @@ "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "78", + "uid": "81", "children": [ { - "name": "Referencing a block [[46]]", + "name": "Referencing a block [[49]]", "createdAt": 1, "editedAt": 1, "type": "node", - "uid": "79", - "refs": ["46"] + "uid": "82", + "refs": ["49"] } ] } @@ -447,9 +458,9 @@ } ] }, - { "uid": "80", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "83", "name": "test3", "createdAt": 1, "editedAt": 1, "type": "node" }, { - "uid": "81", + "uid": "84", "name": "folder", "createdAt": 1, "editedAt": 1, @@ -462,9 +473,9 @@ "editedAt": 1, "type": "node", "children": [ - { "name": "[[|invalid link]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "82" }, + { "name": "[[|invalid link]]", "createdAt": 1, "editedAt": 1, "type": "node", "uid": "85" }, { - "uid": "83", + "uid": "86", "name": "DateTest", "type": "field", "createdAt": 1, @@ -475,7 +486,7 @@ "type": "node", "createdAt": 1, "editedAt": 1, - "uid": "84", + "uid": "87", "refs": ["10-04-2022"] } ] @@ -489,7 +500,7 @@ ] }, { - "uid": "85", + "uid": "88", "name": "Missing Nodes for vault", "createdAt": 1, "editedAt": 1, @@ -497,21 +508,21 @@ "children": [ { "uid": "29", "name": "folder/folder/test", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "8", "name": "heading", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "!45!", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "!48!", "name": "Heading 2#Heading here", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "16", "name": "Link", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "17", "name": "Link2", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "75", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "78", "name": "missing#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, { "uid": "11", "name": "Some", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "74", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, - { "uid": "68", "name": "Value1", "createdAt": 1, "editedAt": 1, "type": "node" } + { "uid": "77", "name": "test#^MISSING", "createdAt": 1, "editedAt": 1, "type": "node" }, + { "uid": "71", "name": "Value1", "createdAt": 1, "editedAt": 1, "type": "node" } ] } ], "supertags": [ - { "name": "supertag1", "uid": "32" }, - { "name": "supertag2", "uid": "33" }, - { "name": "inlinetag2", "uid": "47" }, - { "name": "inlinetag1", "uid": "48" } + { "name": "supertag1", "uid": "35" }, + { "name": "supertag2", "uid": "36" }, + { "name": "inlinetag2", "uid": "50" }, + { "name": "inlinetag1", "uid": "51" } ], "attributes": [ { "name": "DateTest", "values": [], "count": 2 }, @@ -520,5 +531,5 @@ { "name": "Key1", "values": [], "count": 1 }, { "name": "Key2", "values": [], "count": 1 } ], - "summary": { "leafNodes": 79, "topLevelNodes": 2, "totalNodes": 81, "calendarNodes": 1, "fields": 7, "brokenRefs": 0 } + "summary": { "leafNodes": 82, "topLevelNodes": 2, "totalNodes": 84, "calendarNodes": 1, "fields": 7, "brokenRefs": 0 } } diff --git a/src/converters/obsidian/tests/fixtures/vault.zip b/src/converters/obsidian/tests/fixtures/vault.zip index 543fad1545114b7d2ad3a37c4182486ddbfcfe45..208ff76843b452cf6a180c8a972645396fcab11f 100644 GIT binary patch delta 399 zcmbO$xmI$*PTmz zd#65Iu!H4wQoGP4>3L2si*;9&`d=$NIz!UrN5Q@Xe`dyvz31Mi^t@R0eMf2|$HAof zMZr9sX$)uAuVM|*5ORp)n!jmr-~q!}kLu)oj;H52UC8*bPt7oKw&?Bjepy*fuN~(v zUMvWF5%7d}veW0umYIJOb(UdX31;JtFbBdW~0NpRO05GTspd5p* z#q$M_m_AtM1JQS}5Kk3YBz$UFO~hs;_9bA?Cr%n3O7cA3R6bVSVbbV+GAE-yid!9Q zj;e9!+h>Y9SNZY=`H|>xo67EhQcR8C?)%ll%ll^eDC+_&^Hu#{1ko3>;{ihl4V92i zRRAjoCf5J}0BDml2`!T|3>lN23kH*a2_6B{lb#7x104bYlS%?3lNky?0i}~#3Q_^= zldTF_0y+bet_l{D9t%nVypw4QSpyRV0Fyuk7?a%#KmlTt9t=_ewv%xTHU?)100000 DhSiOa diff --git a/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md b/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md index 0a55d08..2b799a8 100644 --- a/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md +++ b/src/converters/obsidian/tests/fixtures/vault/04-10-2022.md @@ -26,4 +26,9 @@ a newline. Using a duplicate but valid block id [[folder/test#^BLOCK_UID]] -Invalid [[folder/folder/test]] \ No newline at end of file +Invalid [[folder/folder/test]] + +- Text1 + - Text2 + Text3 +Text4 \ No newline at end of file From 70d8bfff58bd50afb2511b1e7881333ebbb03c04 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Tue, 29 Nov 2022 19:26:33 +0100 Subject: [PATCH 90/94] Obsidian: add logging to path finding --- docs/assets/{index.83e0e1b3.js => index.70882357.js} | 4 ++-- .../{index.83e0e1b3.js.map => index.70882357.js.map} | 2 +- docs/index.html | 2 +- src/converters/obsidian/links/FileDescMap.ts | 7 ++++++- 4 files changed, 10 insertions(+), 5 deletions(-) rename docs/assets/{index.83e0e1b3.js => index.70882357.js} (99%) rename docs/assets/{index.83e0e1b3.js.map => index.70882357.js.map} (62%) diff --git a/docs/assets/index.83e0e1b3.js b/docs/assets/index.70882357.js similarity index 99% rename from docs/assets/index.83e0e1b3.js rename to docs/assets/index.70882357.js index 9c08981..bfc5af2 100644 --- a/docs/assets/index.83e0e1b3.js +++ b/docs/assets/index.70882357.js @@ -8,7 +8,7 @@ var rl;function L(){return rl.apply(null,arguments)}function fu(e){rl=e}function [`+s+"] ";for(a in arguments[0])te(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[s];r.push(i)}sl(e+` Arguments: `+Array.prototype.slice.call(r).join("")+` `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Ca={};function al(e,t){L.deprecationHandler!=null&&L.deprecationHandler(e,t),Ca[e]||(sl(t),Ca[e]=!0)}L.suppressDeprecationWarnings=!1;L.deprecationHandler=null;function ht(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function hu(e){var t,n;for(n in e)te(e,n)&&(t=e[n],ht(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Li(e,t){var n=Lt({},e),r;for(r in t)te(t,r)&&($t(e[r])&&$t(t[r])?(n[r]={},Lt(n[r],e[r]),Lt(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)te(e,r)&&!te(t,r)&&$t(e[r])&&(n[r]=Lt({},n[r]));return n}function as(e){e!=null&&this.set(e)}var Ci;Object.keys?Ci=Object.keys:Ci=function(e){var t,n=[];for(t in e)te(e,t)&&n.push(t);return n};var mu={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function pu(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return ht(r)?r.call(t,n):r}function dt(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var os=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,di={},fn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(fn[e]=i),t&&(fn[t[0]]=function(){return dt(i.apply(this,arguments),t[1],t[2])}),n&&(fn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function _u(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function wu(e){var t=e.match(os),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var gu={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function xu(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(os).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var yu="Invalid date";function bu(){return this._invalidDate}var vu="%d",ku=/\d{1,2}/;function Su(e){return this._ordinal.replace("%d",e)}var Eu={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Du(e,t,n,r){var i=this._relativeTime[n];return ht(i)?i(e,t,n,r):i.replace(/%d/i,e)}function Tu(e,t){var n=this._relativeTime[e>0?"future":"past"];return ht(n)?n(t):n.replace(/%s/i,t)}var Rn={};function Oe(e,t){var n=e.toLowerCase();Rn[n]=Rn[n+"s"]=Rn[t]=e}function Ke(e){return typeof e=="string"?Rn[e]||Rn[e.toLowerCase()]:void 0}function ls(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var ll={};function Re(e,t){ll[e]=t}function Au(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:ll[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Cr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function pn(e,t){return function(n){return n!=null?(cl(this,e,n),L.updateOffset(this,t),this):br(this,e)}}function br(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function cl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Cr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Hr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ou(e){return e=Ke(e),ht(this[e])?this[e]():this}function Ru(e,t){if(typeof e=="object"){e=ls(e);var n=Au(e),r,i=n.length;for(r=0;r68?1900:2e3)};var xl=pn("FullYear",!0);function $u(){return Cr(this.year())}function Ku(e,t,n,r,i,s,a){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,i,s,a),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,i,s,a),l}function Nn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Nn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function yl(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),l=1+7*(t-1)+s+a,o,f;return l<=0?(o=e-1,f=Mn(o)+l):l>Mn(e)?(o=e+1,f=l-Mn(e)):(o=e,f=l),{year:o,dayOfYear:f}}function Pn(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+vt(a,t,n)):i>vt(e.year(),t,n)?(s=i-vt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function vt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(Mn(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Oe("week","w");Oe("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Gn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function Xu(e){return Pn(e,this._week.dow,this._week.doy).week}var Ju={dow:0,doy:6};function Qu(){return this._week.dow}function e0(){return this._week.doy}function t0(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function n0(e){var t=Pn(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Oe("day","d");Oe("weekday","e");Oe("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Gn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Gn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function r0(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function i0(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function fs(e,t){return e.slice(t,7).concat(e.slice(0,t))}var s0="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),a0="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),o0=Vn,l0=Vn,c0=Vn;function d0(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?fs(n,this._week.dow):e?n[e.day()]:n}function f0(e){return e===!0?fs(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function u0(e){return e===!0?fs(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function h0(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ut([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function m0(e,t,n){var r,i,s;if(this._weekdaysParseExact)return h0.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ut([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function p0(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=r0(e,this.localeData()),this.add(e-t,"d")):t}function _0(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function w0(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=i0(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function g0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=o0),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function x0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=l0),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function y0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=c0),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function us(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,l,o,f;for(s=0;s<7;s++)a=ut([2e3,1]).day(s),l=je(this.weekdaysMin(a,"")),o=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(l),n.push(o),r.push(f),i.push(l),i.push(o),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function hs(){return this.hours()%12||12}function b0(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,hs);H("k",["kk",2],0,b0);H("hmm",0,0,function(){return""+hs.apply(this)+dt(this.minutes(),2)});H("hmmss",0,0,function(){return""+hs.apply(this)+dt(this.minutes(),2)+dt(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+dt(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+dt(this.minutes(),2)+dt(this.seconds(),2)});function vl(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}vl("a",!0);vl("A",!1);Oe("hour","h");Re("hour",13);function kl(e,t){return t._meridiemParse}C("a",kl);C("A",kl);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",ul);C("hmmss",hl);C("Hmm",ul);C("Hmmss",hl);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i))});function v0(e){return(e+"").toLowerCase().charAt(0)==="p"}var k0=/[ap]\.?m?\.?/i,S0=pn("Hours",!0);function E0(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Sl={calendar:mu,longDateFormat:gu,invalidDate:yu,ordinal:vu,dayOfMonthOrdinalParse:ku,relativeTime:Eu,months:Yu,monthsShort:ml,week:Ju,weekdays:s0,weekdaysMin:a0,weekdaysShort:bl,meridiemParse:k0},de={},Dn={},Un;function D0(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=jr(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&D0(s,r)>=n-1)break;n--}t++}return Un}function A0(e){return e.match("^[^/\\\\]*$")!=null}function jr(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&A0(e))try{t=Un._abbr,n=require,n("./locale/"+e),Pt(t)}catch{de[e]=null}return de[e]}function Pt(e,t){var n;return e&&(Ce(t)?n=St(e):n=ms(e,t),n?Un=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Un._abbr}function ms(e,t){if(t!==null){var n,r=Sl;if(t.abbr=e,de[e]!=null)al("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=jr(t.parentLocale),n!=null)r=n._config;else return Dn[t.parentLocale]||(Dn[t.parentLocale]=[]),Dn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new as(Li(r,t)),Dn[e]&&Dn[e].forEach(function(i){ms(i.name,i.config)}),Pt(e),de[e]}else return delete de[e],null}function O0(e,t){if(t!=null){var n,r,i=Sl;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Li(de[e]._config,t)):(r=jr(e),r!=null&&(i=r._config),t=Li(i,t),r==null&&(t.abbr=e),n=new as(t),n.parentLocale=de[e],de[e]=n),Pt(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Pt()&&Pt(e)):de[e]!=null&&delete de[e]);return de[e]}function St(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Un;if(!rt(e)){if(t=jr(e),t)return t;e=[e]}return T0(e)}function R0(){return Ci(de)}function ps(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[gt]<0||n[gt]>11?gt:n[ot]<1||n[ot]>Hr(n[Ae],n[gt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[xt]!==0||n[zt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[xt]<0||n[xt]>59?xt:n[zt]<0||n[zt]>999?zt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=Nu),z(e)._overflowWeekday&&t===-1&&(t=Pu),z(e).overflow=t),e}var M0=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,I0=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,F0=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],fi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],L0=/^\/?Date\((-?\d+)/i,C0=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,N0={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function El(e){var t,n,r=e._i,i=M0.exec(r)||I0.exec(r),s,a,l,o,f=ir.length,d=fi.length;if(i){for(z(e).iso=!0,t=0,n=f;tMn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Nn(a,0,e._dayOfYear),e._a[gt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[xt]===0&&e._a[zt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Nn:Ku).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function V0(e){var t,n,r,i,s,a,l,o,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=sn(t.GG,e._a[Ae],Pn(oe(),1,4).year),r=sn(t.W,1),i=sn(t.E,1),(i<1||i>7)&&(o=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Pn(oe(),s,a),n=sn(t.gg,e._a[Ae],f.year),r=sn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(o=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(o=!0)):i=s),r<1||r>vt(n,s,a)?z(e)._overflowWeeks=!0:o!=null?z(e)._overflowWeekday=!0:(l=yl(n,r,i,s,a),e._a[Ae]=l.year,e._dayOfYear=l.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function ws(e){if(e._f===L.ISO_8601){El(e);return}if(e._f===L.RFC_2822){Dl(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,l=t.length,o=0,f,d;for(i=ol(e._f,e._locale).match(os)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),o+=r.length),fn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),Cu(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=l-o,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=G0(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Ae]=e._locale.erasConvertYear(f,e._a[Ae])),_s(e),ps(e)}function G0(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Z0(e){var t,n,r,i,s,a,l=!1,o=e._f.length;if(o===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Lr()});function Ol(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function hh(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return ss(e,this),e=Tl(e),e._a?(t=e._isUTC?ut(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&ih(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function mh(){return this.isValid()?!this._isUTC:!1}function ph(){return this.isValid()?this._isUTC:!1}function Ml(){return this.isValid()?this._isUTC&&this._offset===0:!1}var _h=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,wh=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:kt(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=_h.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[xt])*i,ms:$(Pi(r[zt]*1e3))*i}):(r=wh.exec(e))?(i=r[1]==="-"?-1:1,n={y:Zt(r[2],i),M:Zt(r[3],i),w:Zt(r[4],i),d:Zt(r[5],i),h:Zt(r[6],i),m:Zt(r[7],i),s:Zt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=gh(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Br(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Br.prototype;st.invalid=rh;function Zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Pa(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function gh(e,t){var n;return e.isValid()&&t.isValid()?(t=xs(t,e),e.isBefore(t)?n=Pa(e,t):(n=Pa(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Il(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(al(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),Fl(this,i,e),this}}function Fl(e,t,n,r){var i=t._milliseconds,s=Pi(t._days),a=Pi(t._months);!e.isValid()||(r=r==null?!0:r,a&&_l(e,br(e,"Month")+a*n),s&&cl(e,"Date",br(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var xh=Il(1,"add"),yh=Il(-1,"subtract");function Ll(e){return typeof e=="string"||e instanceof String}function bh(e){return it(e)||jn(e)||Ll(e)||kt(e)||kh(e)||vh(e)||e===null||e===void 0}function vh(e){var t=$t(e)&&!rs(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ht(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ph(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function Uh(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function Yh(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Wh(e){return this.from(oe(),e)}function Hh(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function jh(e){return this.to(oe(),e)}function Cl(e){var t;return e===void 0?this._locale._abbr:(t=St(e),t!=null&&(this._locale=t),this)}var Nl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Pl(){return this._locale}var Sr=1e3,un=60*Sr,Er=60*un,Ul=(365*400+97)*24*Er;function hn(e,t){return(e%t+t)%t}function Yl(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Ul:new Date(e,t,n).valueOf()}function Wl(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Ul:Date.UTC(e,t,n)}function Bh(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Wl:Yl,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hn(t+(this._isUTC?0:this.utcOffset()*un),Er);break;case"minute":t=this._d.valueOf(),t-=hn(t,un);break;case"second":t=this._d.valueOf(),t-=hn(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function Vh(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Wl:Yl,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-hn(t+(this._isUTC?0:this.utcOffset()*un),Er)-1;break;case"minute":t=this._d.valueOf(),t+=un-hn(t,un)-1;break;case"second":t=this._d.valueOf(),t+=Sr-hn(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function Gh(){return this._d.valueOf()-(this._offset||0)*6e4}function Zh(){return Math.floor(this.valueOf()/1e3)}function qh(){return new Date(this.valueOf())}function zh(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function $h(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Kh(){return this.isValid()?this.toISOString():null}function Xh(){return is(this)}function Jh(){return Lt({},z(this))}function Qh(){return z(this).overflow}function e1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",ys);C("NN",ys);C("NNN",ys);C("NNNN",f1);C("NNNNN",u1);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",_n);C("yy",_n);C("yyy",_n);C("yyyy",_n);C("yo",h1);ie(["y","yy","yyy","yyyy"],Ae);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ae]=n._locale.eraYearOrdinalParse(e,i):t[Ae]=parseInt(e,10)});function t1(e,t){var n,r,i,s=this._eras||St("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function r1(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function i1(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),y1.call(this,e,t,n,r,i))}function y1(e,t,n,r,i){var s=yl(e,t,n,r,i),a=Nn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Oe("quarter","Q");Re("quarter",7);C("Q",dl);ie("Q",function(e,t){t[gt]=($(e)-1)*3});function b1(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Oe("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var jl=pn("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Oe("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Pr);C("DDDD",fl);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function v1(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Oe("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var k1=pn("Minutes",!1);H("s",["ss",2],0,"second");Oe("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],xt);var S1=pn("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Oe("millisecond","ms");Re("millisecond",16);C("S",Pr,dl);C("SS",Pr,Be);C("SSS",Pr,fl);var Ct,Bl;for(Ct="SSSS";Ct.length<=9;Ct+="S")C(Ct,_n);function E1(e,t){t[zt]=$(("0."+e)*1e3)}for(Ct="S";Ct.length<=9;Ct+="S")ie(Ct,E1);Bl=pn("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function D1(){return this._isUTC?"UTC":""}function T1(){return this._isUTC?"Coordinated Universal Time":""}var M=Bn.prototype;M.add=xh;M.calendar=Dh;M.clone=Th;M.diff=Lh;M.endOf=Vh;M.format=Uh;M.from=Yh;M.fromNow=Wh;M.to=Hh;M.toNow=jh;M.get=Ou;M.invalidAt=Qh;M.isAfter=Ah;M.isBefore=Oh;M.isBetween=Rh;M.isSame=Mh;M.isSameOrAfter=Ih;M.isSameOrBefore=Fh;M.isValid=Xh;M.lang=Nl;M.locale=Cl;M.localeData=Pl;M.max=X0;M.min=K0;M.parsingFlags=Jh;M.set=Ru;M.startOf=Bh;M.subtract=yh;M.toArray=zh;M.toObject=$h;M.toDate=qh;M.toISOString=Nh;M.inspect=Ph;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=Kh;M.toString=Ch;M.unix=Zh;M.valueOf=Gh;M.creationData=e1;M.eraName=i1;M.eraNarrow=s1;M.eraAbbr=a1;M.eraYear=o1;M.year=xl;M.isLeapYear=$u;M.weekYear=m1;M.isoWeekYear=p1;M.quarter=M.quarters=b1;M.month=wl;M.daysInMonth=Zu;M.week=M.weeks=t0;M.isoWeek=M.isoWeeks=n0;M.weeksInYear=g1;M.weeksInWeekYear=x1;M.isoWeeksInYear=_1;M.isoWeeksInISOWeekYear=w1;M.date=jl;M.day=M.days=p0;M.weekday=_0;M.isoWeekday=w0;M.dayOfYear=v1;M.hour=M.hours=S0;M.minute=M.minutes=k1;M.second=M.seconds=S1;M.millisecond=M.milliseconds=Bl;M.utcOffset=ah;M.utc=lh;M.local=ch;M.parseZone=dh;M.hasAlignedHourOffset=fh;M.isDST=uh;M.isLocal=mh;M.isUtcOffset=ph;M.isUtc=Ml;M.isUTC=Ml;M.zoneAbbr=D1;M.zoneName=T1;M.dates=$e("dates accessor is deprecated. Use date instead.",jl);M.months=$e("months accessor is deprecated. Use month instead",wl);M.years=$e("years accessor is deprecated. Use year instead",xl);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",oh);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",hh);function A1(e){return oe(e*1e3)}function O1(){return oe.apply(null,arguments).parseZone()}function Vl(e){return e}var ne=as.prototype;ne.calendar=pu;ne.longDateFormat=xu;ne.invalidDate=bu;ne.ordinal=Su;ne.preparse=Vl;ne.postformat=Vl;ne.relativeTime=Du;ne.pastFuture=Tu;ne.set=hu;ne.eras=t1;ne.erasParse=n1;ne.erasConvertYear=r1;ne.erasAbbrRegex=c1;ne.erasNameRegex=l1;ne.erasNarrowRegex=d1;ne.months=ju;ne.monthsShort=Bu;ne.monthsParse=Gu;ne.monthsRegex=zu;ne.monthsShortRegex=qu;ne.week=Xu;ne.firstDayOfYear=e0;ne.firstDayOfWeek=Qu;ne.weekdays=d0;ne.weekdaysMin=u0;ne.weekdaysShort=f0;ne.weekdaysParse=m0;ne.weekdaysRegex=g0;ne.weekdaysShortRegex=x0;ne.weekdaysMinRegex=y0;ne.isPM=v0;ne.meridiem=E0;function Dr(e,t,n,r){var i=St(),s=ut().set(r,t);return i[n](s,e)}function Gl(e,t,n){if(kt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function vs(e,t,n,r){typeof e=="boolean"?(kt(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,kt(t)&&(n=t,t=void 0),t=t||"");var i=St(),s=e?i._week.dow:0,a,l=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)l[a]=Dr(t,(a+s)%7,r,"day");return l}function R1(e,t){return Gl(e,t,"months")}function M1(e,t){return Gl(e,t,"monthsShort")}function I1(e,t,n){return vs(e,t,n,"weekdays")}function F1(e,t,n){return vs(e,t,n,"weekdaysShort")}function L1(e,t,n){return vs(e,t,n,"weekdaysMin")}Pt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Pt);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",St);var _t=Math.abs;function C1(){var e=this._data;return this._milliseconds=_t(this._milliseconds),this._days=_t(this._days),this._months=_t(this._months),e.milliseconds=_t(e.milliseconds),e.seconds=_t(e.seconds),e.minutes=_t(e.minutes),e.hours=_t(e.hours),e.months=_t(e.months),e.years=_t(e.years),this}function Zl(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function N1(e,t){return Zl(this,e,t,1)}function P1(e,t){return Zl(this,e,t,-1)}function Ua(e){return e<0?Math.floor(e):Math.ceil(e)}function U1(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,l,o;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Ua(Yi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),o=Ze(ql(t)),n+=o,t-=Ua(Yi(o)),l=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=l,this}function ql(e){return e*4800/146097}function Yi(e){return e*146097/4800}function Y1(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+ql(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Yi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function W1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Et(e){return function(){return this.as(e)}}var H1=Et("ms"),j1=Et("s"),B1=Et("m"),V1=Et("h"),G1=Et("d"),Z1=Et("w"),q1=Et("M"),z1=Et("Q"),$1=Et("y");function K1(){return st(this)}function X1(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Xt(e){return function(){return this.isValid()?this._data[e]:NaN}}var J1=Xt("milliseconds"),Q1=Xt("seconds"),em=Xt("minutes"),tm=Xt("hours"),nm=Xt("days"),rm=Xt("months"),im=Xt("years");function sm(){return Ze(this.days()/7)}var wt=Math.round,ln={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function am(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function om(e,t,n,r){var i=st(e).abs(),s=wt(i.as("s")),a=wt(i.as("m")),l=wt(i.as("h")),o=wt(i.as("d")),f=wt(i.as("M")),d=wt(i.as("w")),u=wt(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,am.apply(null,p)}function lm(e){return e===void 0?wt:typeof e=="function"?(wt=e,!0):!1}function cm(e,t){return ln[e]===void 0?!1:t===void 0?ln[e]:(ln[e]=t,e==="s"&&(ln.ss=t-1),!0)}function dm(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ln,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ln,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=om(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var ui=Math.abs;function nn(e){return(e>0)-(e<0)||+e}function Gr(){if(!this.isValid())return this.localeData().invalidDate();var e=ui(this._milliseconds)/1e3,t=ui(this._days),n=ui(this._months),r,i,s,a,l=this.asSeconds(),o,f,d,u;return l?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",o=l<0?"-":"",f=nn(this._months)!==nn(l)?"-":"",d=nn(this._days)!==nn(l)?"-":"",u=nn(this._milliseconds)!==nn(l)?"-":"",o+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Br.prototype;X.isValid=nh;X.abs=C1;X.add=N1;X.subtract=P1;X.as=Y1;X.asMilliseconds=H1;X.asSeconds=j1;X.asMinutes=B1;X.asHours=V1;X.asDays=G1;X.asWeeks=Z1;X.asMonths=q1;X.asQuarters=z1;X.asYears=$1;X.valueOf=W1;X._bubble=U1;X.clone=K1;X.get=X1;X.milliseconds=J1;X.seconds=Q1;X.minutes=em;X.hours=tm;X.days=nm;X.weeks=sm;X.months=rm;X.years=im;X.humanize=dm;X.toISOString=Gr;X.toString=Gr;X.toJSON=Gr;X.locale=Cl;X.localeData=Pl;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gr);X.lang=Nl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Yr);C("X",Iu);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js -L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L.months=R1;L.isDate=jn;L.locale=Pt;L.invalid=Lr;L.duration=st;L.isMoment=it;L.weekdays=I1;L.parseZone=O1;L.localeData=St;L.isDuration=dr;L.monthsShort=M1;L.weekdaysMin=L1;L.defineLocale=ms;L.updateLocale=O0;L.locales=R0;L.weekdaysShort=F1;L.normalizeUnits=Ke;L.relativeTimeRounding=lm;L.relativeTimeThreshold=cm;L.calendarFormat=Eh;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Wi(e,t){const n=L(e,t,!0);if(n.isValid())return n.format("MM-DD-YYYY")}function fm(e){return Ir(e)!==e}class hi{constructor(){Bt(this,"nameWasCalledAsFile",[]);Bt(this,"pathMap",new Map);Bt(this,"nameMap",new Map)}accessAsFile(t,n,r,i){const s=Wi(t,i);s&&(t=s);const a=this.pathMap.get(n);if(a)return this.nameMap.get(t)||this.nameMap.set(t,a),a;const l=this.nameMap.get(t);if(l&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,l),this.nameWasCalledAsFile.push(t),l;const o=r(s);return this.pathMap.set(n,o),this.nameMap.get(t)||this.nameMap.set(t,o),this.nameWasCalledAsFile.push(t),o}accessAsLink(t,n,r){const i=Wi(t,r);i&&(t=i);const s=this.findData(t);if(s)return s;const a=fm(t),l=n(i);return a?this.pathMap.set(t,l):this.nameMap.set(t,l),l}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Zr(e){e.totalNodes++,e.leafNodes++}function zl(e){e.leafNodes--,e.topLevelNodes++}function um(e,t,n=cu,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new hi,headingTracker:new hi,dummyHeadingLinkTracker:new Map,blockLinkTracker:new hi,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function Wt(e){return Zr(e.summary),e.idGenerator()}function hm(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map,t.dailyNoteFormat);let s=i.get(r);return s||(s={uid:Wt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function mm(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map,n.dailyNoteFormat);let a=s.get(i);return a||(a={uid:Wt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function pm(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function _m(e){let t;return[e.split(` +L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L.months=R1;L.isDate=jn;L.locale=Pt;L.invalid=Lr;L.duration=st;L.isMoment=it;L.weekdays=I1;L.parseZone=O1;L.localeData=St;L.isDuration=dr;L.monthsShort=M1;L.weekdaysMin=L1;L.defineLocale=ms;L.updateLocale=O0;L.locales=R0;L.weekdaysShort=F1;L.normalizeUnits=Ke;L.relativeTimeRounding=lm;L.relativeTimeThreshold=cm;L.calendarFormat=Eh;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Wi(e,t){const n=L(e,t,!0);if(n.isValid())return n.format("MM-DD-YYYY")}function fm(e){try{return Ir(e)!==e}catch{throw console.log("Error in isPath: "+e),"Error in isPath: "+e}}class hi{constructor(){Bt(this,"nameWasCalledAsFile",[]);Bt(this,"pathMap",new Map);Bt(this,"nameMap",new Map)}accessAsFile(t,n,r,i){const s=Wi(t,i);s&&(t=s);const a=this.pathMap.get(n);if(a)return this.nameMap.get(t)||this.nameMap.set(t,a),a;const l=this.nameMap.get(t);if(l&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,l),this.nameWasCalledAsFile.push(t),l;const o=r(s);return this.pathMap.set(n,o),this.nameMap.get(t)||this.nameMap.set(t,o),this.nameWasCalledAsFile.push(t),o}accessAsLink(t,n,r){const i=Wi(t,r);i&&(t=i);const s=this.findData(t);if(s)return s;const a=fm(t),l=n(i);return a?this.pathMap.set(t,l):this.nameMap.set(t,l),l}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Zr(e){e.totalNodes++,e.leafNodes++}function zl(e){e.leafNodes--,e.topLevelNodes++}function um(e,t,n=cu,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new hi,headingTracker:new hi,dummyHeadingLinkTracker:new Map,blockLinkTracker:new hi,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function Wt(e){return Zr(e.summary),e.idGenerator()}function hm(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map,t.dailyNoteFormat);let s=i.get(r);return s||(s={uid:Wt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function mm(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map,n.dailyNoteFormat);let a=s.get(i);return a||(a={uid:Wt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function pm(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function _m(e){let t;return[e.split(` `).map(r=>{const i=r.split(" "),s=i[i.length-1];return s.startsWith("^")?(t=s,i.slice(0,-1).join(" ")):r}).join(` `),t]}function $l(e,t,n,r,i,s){const a=[t],l=[e];for(const o of n){const f=i(o);wm(f,o,a,l,r),s==null||s(f,o)}}function wm(e,t,n,r,i){var l;gm(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(l=a.children)!=null?l:[],a.children.push(e)),n.push(t),r.push(e)}function gm(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function Kl(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=Kl(n.children,r);if(i)return i}}return null}function xm(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function ym(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const l=t.findData(s);if(l){const o={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};$l(f,o,l,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=Kl(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function bm(e,t){const[n,r]=ym(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Zr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let l=a;s.forEach(o=>{l=l.replace(o.old,o.new)}),await t.adapter.appendToPostProcessingFile(i,l)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var Xl=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(Xl||{});function vm(e,t){const n=km(e.name,t);if(n.length>0){const r=new Set;e.refs||(e.refs=[]);for(const[i,s,a]of n)r.add(s),e.name=e.name.replaceAll("[["+i+"]]",a);e.refs.push(...Array.from(r.values()))}}function km(e,t){return du(e,!0).map(n=>[n,n.split("|").map(r=>r.trim())]).filter(n=>n[1][0]!=="").map(n=>{const r=n[1],i=r[0],s=r[1],a=Dm(i,t),l=s!==void 0&&s.trim()!==""?"["+s.trim()+"]([["+a+"]])":"[["+a+"]]";return[n[0],a,l]})}function Sm(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function Em(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function Dm(e,t){const n=Sm(e);switch(Em(n)){case 0:return Tm(n[0],t);case 2:return hm(n,t);case 1:return xm(n,t);default:throw"Invalid link type detected: "+n}}function Tm(e,t){return t.defaultLinkTracker.accessAsLink(e,r=>(Zr(t.summary),{uid:r!=null?r:t.idGenerator(),obsidianLink:e,type:1}),t.dailyNoteFormat).uid}function Jl(e,t,n,r){const[i,s]=_m(n);return s?[mm([e,s],t,r),i]:[Wt(r),n]}function Am(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,s=>(Zr(n.summary),{uid:s!=null?s:n.idGenerator(),obsidianLink:r,type:0}),n.dailyNoteFormat);return i.type=0,i.uid}function Om(e){const t=[];for(const n of e.getData())n.type===Xl.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function Rm(e){return[...e.invalidLinks,...Om(e.defaultLinkTracker),...pm(e.blockLinkTracker)]}function Mm(e,t,n){const r=Rm(n).sort((a,l)=>a.link.localeCompare(l.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:Wt(n),name:i,createdAt:t,editedAt:t,type:"node"};return zl(n.summary),s.children=r,s}function ks(e){return e===" "||e===" "}function Zn(e,t){let n=0;for(;ks(e[t+n]);)n++;return n}function Im(e,t){let n=t,r=e[t];for(;ks(r);)n--,r=e[n];return n+1}function Ut(e,t){let n=0;for(;!Ss(e[t+n]);)n++;return t+n}function Ql(e,t){const n=e[t-1];return Ss(n)}function Ss(e){return e===void 0||e===` `}function ec(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function Es(e,t){let n=!0;const r=t+Zn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ec(e,r));const a=Im(e,r-1)-1,l=e[a];return Ss(l)&&n?{type:ft.BULLET,level:r-a-1}:null}function Fm(e,t,n){let r=t+n.level;if(ec(e,r))return r;r+=1+1;const i=Zn(e,r);return r+i}function Lm(e,t,n){let r=Ut(e,t+n.level+1+1),i=e[r];for(;;){const s=Zn(e,r+1);if(s>0&&(s==n.level+2||s==n.level)&&!Es(e,r+1+s))r=Ut(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Cm(e,t){return e+t.level}function Nm(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=Zn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function tc(e,t){if(!Ql(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=Ut(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],l=e[i+2];for(;[s,a,l].every(d=>d!==void 0)&&[s,a,l].join("")!=="```";)i++,s=e[i],a=e[i+1],l=e[i+2];if([s,a,l].some(d=>d===void 0))return null;const o=Ut(e,i+3);return e.slice(i+3,o).trim()!==""?null:{type:ft.CODEBLOCK,level:o-t+(e[o]===` @@ -46,4 +46,4 @@ L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L Please check the text at the top again.`,document.body.appendChild(l)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack): `+i,document.body.appendChild(a)}}); -//# sourceMappingURL=index.83e0e1b3.js.map +//# sourceMappingURL=index.70882357.js.map diff --git a/docs/assets/index.83e0e1b3.js.map b/docs/assets/index.70882357.js.map similarity index 62% rename from docs/assets/index.83e0e1b3.js.map rename to docs/assets/index.70882357.js.map index 02e5b94..95b970a 100644 --- a/docs/assets/index.83e0e1b3.js.map +++ b/docs/assets/index.70882357.js.map @@ -1 +1 @@ -{"version":3,"file":"index.83e0e1b3.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid if they are used\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n\n //but also if they are just equal to the hierachy-level:\n //e.g.\n //- Text1\n // - Text2\n // Text3\n //Text4\n //\"Text3\" is still part of Text2 because Obsidian allows that!\n //but not \"Text4\" because its on the zero level\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (\n emptySpaces > 0 &&\n (emptySpaces == hierarchy.level + 2 || emptySpaces == hierarchy.level) &&\n !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)\n ) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\nconst nonDigit = new RegExp('\\\\D');\n\n// https://help.obsidian.md/How+to/Working+with+tags\n// only - _ and / are allowed\n// this is a brute force approach, because its not trivial to detect invalid tags in other languages\n// (can not use \\w for example because e.g. korean characters are excluded)\nconst disallowedSymbols = new Set([\n '#',\n '!',\n '{',\n '}',\n '(',\n ')',\n '?',\n '$',\n '%',\n '&',\n '\"',\n \"'\",\n '<',\n '>',\n '\\\\',\n '*',\n '`',\n '[',\n ']',\n ':',\n ',',\n ';',\n '~',\n '=',\n '§',\n '.',\n '°',\n '^',\n]);\n\nexport function validTag(tag: string) {\n //currently whitespace is also detected as part of the tag\n tag = tag.trim();\n let char = tag[0];\n //sanity check\n if (char !== '#') {\n return false;\n }\n\n let foundNonDigit = false;\n\n for (let index = 1; index < tag.length; index++) {\n char = tag[index];\n if (char.match(nonDigit)) {\n foundNonDigit = true;\n }\n\n if (disallowedSymbols.has(char)) {\n return false;\n }\n }\n\n return foundNonDigit;\n}\n\nexport function detectTags(content: string) {\n return content.match(tagRegex)?.filter((tag) => validTag(tag));\n}\n\nexport function removeTagsFromEnd(content: string, tags: string[]) {\n let curContent = content;\n let globalRemovedTag = false;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let removedTag = false;\n for (const tag of tags) {\n if (curContent.endsWith(tag)) {\n curContent = curContent.slice(0, -tag.length);\n removedTag = true;\n globalRemovedTag = true;\n }\n }\n\n if (!removedTag) {\n break;\n }\n }\n\n //removing empty space at the end, because the tag detection only detects leading empty space\n if (globalRemovedTag) {\n curContent = curContent.trimEnd();\n }\n\n return curContent;\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags, removeTagsFromEnd } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tags without losing meaning because they will show up as super tags anyways\n tanaNode.name = removeTagsFromEnd(tanaNode.name, tags);\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","nonDigit","disallowedSymbols","validTag","tag","foundNonDigit","detectTags","removeTagsFromEnd","tags","curContent","globalRemovedTag","removedTag","cleanUpTag","superTagUidRequests","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAAU,YAAc,OAExBA,EAAU,YAAc,cACrBA,CACV,CACD,SAASN,EAAeD,EAAM,CAC1B,GAAIA,EAAK,GAEL,OACJA,EAAK,GAAK,GAEV,MAAMO,EAAYF,EAAaL,CAAI,EACnC,MAAMA,EAAK,KAAMO,CAAS,CAC7B,CACL,KCHA,MAAMC,GAAW,GACXC,GAAU,GACVC,GAAW,GAEXC,GAAe,GACfC,GAAW,IACXC,GAAWD,GAAW,EAAID,GAC1BG,GAAa,EAAID,GAAU,EAE3BE,GAAY,IAGZC,GAAc,EAGdC,GAAU,GAGVC,GAAY,GAGZC,GAAc,GAMdC,GAAW,EAAI,EAGfC,GAAwB,GAGxBC,GAAa,EACbC,GAAiB,EACjBC,G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EAAQ,YACjBQ,EAAiB,SAAS,cAAc,QAAQ,EACtDA,EAAe,UAAY,oBACZA,EAAA,iBAAiB,QAAS,IAAM,CACvC,MAAAlyC,EAAM,IAAI,gBAAgB,IAAI,KAAK,CAAC9X,CAAM,CAAC,CAAC,EAC5C7P,EAAI,SAAS,cAAc,GAAG,EACpCA,EAAE,MAAM,QAAU,OAClBA,EAAE,KAAO2nB,EACT3nB,EAAE,SAAWo5D,EAAY,YAChB,SAAA,KAAK,YAAYp5D,CAAC,EAC3BA,EAAE,MAAM,EACR,IAAI,gBAAgB2nB,CAAG,CAAA,CACxB,EACQ,SAAA,KAAK,YAAYkyC,CAAc,QACjCp1C,GACP,QAAQ,MAAMA,CAAK,EAEf80C,GACO,SAAA,KAAK,YAAYA,CAAQ,EAI9B,MAAAO,EAAoBr1C,EAAc,MAAM,SAAS,EAEvD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAs1C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file +{"version":3,"file":"index.70882357.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n try {\n return basename(searchStr) !== searchStr;\n } catch (error) {\n console.log('Error in isPath: ' + searchStr);\n throw 'Error in isPath: ' + searchStr;\n }\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid if they are used\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n\n //but also if they are just equal to the hierachy-level:\n //e.g.\n //- Text1\n // - Text2\n // Text3\n //Text4\n //\"Text3\" is still part of Text2 because Obsidian allows that!\n //but not \"Text4\" because its on the zero level\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (\n emptySpaces > 0 &&\n (emptySpaces == hierarchy.level + 2 || emptySpaces == hierarchy.level) &&\n !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)\n ) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\nconst nonDigit = new RegExp('\\\\D');\n\n// https://help.obsidian.md/How+to/Working+with+tags\n// only - _ and / are allowed\n// this is a brute force approach, because its not trivial to detect invalid tags in other languages\n// (can not use \\w for example because e.g. korean characters are excluded)\nconst disallowedSymbols = new Set([\n '#',\n '!',\n '{',\n '}',\n '(',\n ')',\n '?',\n '$',\n '%',\n '&',\n '\"',\n \"'\",\n '<',\n '>',\n '\\\\',\n '*',\n '`',\n '[',\n ']',\n ':',\n ',',\n ';',\n '~',\n '=',\n '§',\n '.',\n '°',\n '^',\n]);\n\nexport function validTag(tag: string) {\n //currently whitespace is also detected as part of the tag\n tag = tag.trim();\n let char = tag[0];\n //sanity check\n if (char !== '#') {\n return false;\n }\n\n let foundNonDigit = false;\n\n for (let index = 1; index < tag.length; index++) {\n char = tag[index];\n if (char.match(nonDigit)) {\n foundNonDigit = true;\n }\n\n if (disallowedSymbols.has(char)) {\n return false;\n }\n }\n\n return foundNonDigit;\n}\n\nexport function detectTags(content: string) {\n return content.match(tagRegex)?.filter((tag) => validTag(tag));\n}\n\nexport function removeTagsFromEnd(content: string, tags: string[]) {\n let curContent = content;\n let globalRemovedTag = false;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let removedTag = false;\n for (const tag of tags) {\n if (curContent.endsWith(tag)) {\n curContent = curContent.slice(0, -tag.length);\n removedTag = true;\n globalRemovedTag = true;\n }\n }\n\n if (!removedTag) {\n break;\n }\n }\n\n //removing empty space at the end, because the tag detection only detects leading empty space\n if (globalRemovedTag) {\n curContent = curContent.trimEnd();\n }\n\n return curContent;\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags, removeTagsFromEnd } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tags without losing meaning because they will show up as super tags anyways\n tanaNode.name = removeTagsFromEnd(tanaNode.name, tags);\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","nonDigit","disallowedSymbols","validTag","tag","foundNonDigit","detectTags","removeTagsFromEnd","tags","curContent","globalRemovedTag","removedTag","cleanUpTag","superTagUidRequests","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAAU,YAAc,OAExBA,EAAU,YAAc,cACrBA,CACV,CACD,SAASN,EAAeD,EAAM,CAC1B,GAAIA,EAAK,GAEL,OACJA,EAAK,GAAK,GAEV,MAAMO,EAAYF,EAAaL,CAAI,EACnC,MAAMA,EAAK,KAAMO,CAAS,CAC7B,CACL,KCHA,MAAMC,GAAW,GACXC,GAAU,GACVC,GAAW,GAEXC,GAAe,GACfC,GAAW,IACXC,GAAWD,GAAW,EAAID,GAC1BG,GAAa,EAAID,GAAU,EAE3BE,GAAY,IAGZC,GAAc,EAGdC,GAAU,GAGVC,GAAY,GAGZC,GAAc,GAMdC,GAAW,EAAI,EAGfC,GAAwB,GAGxBC,GAAa,EACbC,GAAiB,EACjBC,GAAqB,EAErBC,GAAa,EACbC,GAAkB,EAClBC,GAAe,EACf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/docs/index.html @@ -4,7 +4,7 @@ Obsidian-2-Tana Converter - +

Obsidian-2-Tana Converter

diff --git a/src/converters/obsidian/links/FileDescMap.ts b/src/converters/obsidian/links/FileDescMap.ts index b17c811..35ee001 100644 --- a/src/converters/obsidian/links/FileDescMap.ts +++ b/src/converters/obsidian/links/FileDescMap.ts @@ -2,7 +2,12 @@ import { basename } from '../filesystem/CustomFileSystemAdapter'; import { dateStringToDateUID } from './dateLinks'; function isPath(searchStr: string) { - return basename(searchStr) !== searchStr; + try { + return basename(searchStr) !== searchStr; + } catch (error) { + console.log('Error in isPath: ' + searchStr); + throw 'Error in isPath: ' + searchStr; + } } //using a mix of fileName and filePath in the links might lead to random results From 989846f490857ceb6a759247e1bbcc2703499cda Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Tue, 29 Nov 2022 19:29:04 +0100 Subject: [PATCH 91/94] Obsidian: added "Inofficial" to web page --- docs/assets/{index.70882357.js => index.4f988c9b.js} | 4 ++-- .../assets/{index.70882357.js.map => index.4f988c9b.js.map} | 2 +- docs/index.html | 6 +++--- index.html | 4 ++-- src/script.ts | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) rename docs/assets/{index.70882357.js => index.4f988c9b.js} (99%) rename docs/assets/{index.70882357.js.map => index.4f988c9b.js.map} (69%) diff --git a/docs/assets/index.70882357.js b/docs/assets/index.4f988c9b.js similarity index 99% rename from docs/assets/index.70882357.js rename to docs/assets/index.4f988c9b.js index bfc5af2..54acea8 100644 --- a/docs/assets/index.70882357.js +++ b/docs/assets/index.4f988c9b.js @@ -43,7 +43,7 @@ L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L `+JSON.stringify(e.summary,null,2)),e.adapter.appendToResultFile(n,` }`),e.adapter.flushResultsFromInitialProcessing(n),e.summary}async function vp(e){const t=await ou(e,"daily-notes",n=>n||{format:"YYYY-MM-DD"});e.dailyNoteFormat=t.format,console.log("Using daily notes format "+t.format+" for detecting calendar nodes.")}async function kp(e,t,n,r){const i=new lu(e),s=um(t,i,r);return bp(s,n).then(a=>[a,s,i])}const Sp=document.getElementById("vault-zip");Sp.addEventListener("change",async e=>{let t,n=0;try{const r=e.target.files[0],i=r.name.slice(0,r.name.indexOf(".zip"));t=document.createElement("b"),t.innerHTML="In Progress... (imagine a fancy timer with 10-30 secs here)
",document.body.appendChild(t);const s=setInterval(()=>n++,1e3),[a,,l]=await kp(r,i,Date.now());clearInterval(s),document.body.removeChild(t);const o=document.createElement("b");o.innerHTML="Success! And it only took "+n+" seconds.
",document.body.appendChild(o);const f=document.createElement("h2");f.innerText="Summary:",document.body.appendChild(f);const d=document.createElement("p");d.innerText=Object.entries(a).map(w=>w[0]+": "+w[1]).join(` `),document.body.appendChild(d);const u=l.getResult(),p=document.createElement("button");p.innerText="Download TIF File",p.addEventListener("click",()=>{const w=URL.createObjectURL(new Blob([u])),D=document.createElement("a");D.style.display="none",D.href=w,D.download=i+".tif.json",document.body.appendChild(D),D.click(),URL.revokeObjectURL(w)}),document.body.appendChild(p)}catch(r){console.trace(r),t&&document.body.removeChild(t);const i=r.stack.toString();document.body.appendChild(document.createElement("br"));const s=document.createElement("b");if(s.innerText="An Error occured.",document.body.appendChild(s),i.toLowerCase().includes("readdirectory")){document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const l=document.createElement("b");l.innerText=`It probably has to do with a not properly zipped vault. -Please check the text at the top again.`,document.body.appendChild(l)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack): +Please check the text at the top again.`,document.body.appendChild(l)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack and tag me): `+i,document.body.appendChild(a)}}); -//# sourceMappingURL=index.70882357.js.map +//# sourceMappingURL=index.4f988c9b.js.map diff --git a/docs/assets/index.70882357.js.map b/docs/assets/index.4f988c9b.js.map similarity index 69% rename from docs/assets/index.70882357.js.map rename to docs/assets/index.4f988c9b.js.map index 95b970a..134a182 100644 --- a/docs/assets/index.70882357.js.map +++ b/docs/assets/index.4f988c9b.js.map @@ -1 +1 @@ -{"version":3,"file":"index.70882357.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n try {\n return basename(searchStr) !== searchStr;\n } catch (error) {\n console.log('Error in isPath: ' + searchStr);\n throw 'Error in isPath: ' + searchStr;\n }\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid if they are used\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n\n //but also if they are just equal to the hierachy-level:\n //e.g.\n //- Text1\n // - Text2\n // Text3\n //Text4\n //\"Text3\" is still part of Text2 because Obsidian allows that!\n //but not \"Text4\" because its on the zero level\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (\n emptySpaces > 0 &&\n (emptySpaces == hierarchy.level + 2 || emptySpaces == hierarchy.level) &&\n !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)\n ) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\nconst nonDigit = new RegExp('\\\\D');\n\n// https://help.obsidian.md/How+to/Working+with+tags\n// only - _ and / are allowed\n// this is a brute force approach, because its not trivial to detect invalid tags in other languages\n// (can not use \\w for example because e.g. korean characters are excluded)\nconst disallowedSymbols = new Set([\n '#',\n '!',\n '{',\n '}',\n '(',\n ')',\n '?',\n '$',\n '%',\n '&',\n '\"',\n \"'\",\n '<',\n '>',\n '\\\\',\n '*',\n '`',\n '[',\n ']',\n ':',\n ',',\n ';',\n '~',\n '=',\n '§',\n '.',\n '°',\n '^',\n]);\n\nexport function validTag(tag: string) {\n //currently whitespace is also detected as part of the tag\n tag = tag.trim();\n let char = tag[0];\n //sanity check\n if (char !== '#') {\n return false;\n }\n\n let foundNonDigit = false;\n\n for (let index = 1; index < tag.length; index++) {\n char = tag[index];\n if (char.match(nonDigit)) {\n foundNonDigit = true;\n }\n\n if (disallowedSymbols.has(char)) {\n return false;\n }\n }\n\n return foundNonDigit;\n}\n\nexport function detectTags(content: string) {\n return content.match(tagRegex)?.filter((tag) => validTag(tag));\n}\n\nexport function removeTagsFromEnd(content: string, tags: string[]) {\n let curContent = content;\n let globalRemovedTag = false;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let removedTag = false;\n for (const tag of tags) {\n if (curContent.endsWith(tag)) {\n curContent = curContent.slice(0, -tag.length);\n removedTag = true;\n globalRemovedTag = true;\n }\n }\n\n if (!removedTag) {\n break;\n }\n }\n\n //removing empty space at the end, because the tag detection only detects leading empty space\n if (globalRemovedTag) {\n curContent = curContent.trimEnd();\n }\n\n return curContent;\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags, removeTagsFromEnd } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tags without losing meaning because they will show up as super tags anyways\n tanaNode.name = removeTagsFromEnd(tanaNode.name, tags);\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","nonDigit","disallowedSymbols","validTag","tag","foundNonDigit","detectTags","removeTagsFromEnd","tags","curContent","globalRemovedTag","removedTag","cleanUpTag","superTagUidRequests","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAAU,YAAc,OAExBA,EAAU,YAAc,cACrBA,CACV,CACD,SAASN,EAAeD,EAAM,CAC1B,GAAIA,EAAK,GAEL,OACJA,EAAK,GAAK,GAEV,MAAMO,EAAYF,EAAaL,CAAI,EACnC,MAAMA,EAAK,KAAMO,CAAS,CAC7B,CACL,KCHA,MAAMC,GAAW,GACXC,GAAU,GACVC,GAAW,GAEXC,GAAe,GACfC,GAAW,IACXC,GAAWD,GA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AS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAqDH,EACrE,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file +{"version":3,"file":"index.4f988c9b.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n try {\n return basename(searchStr) !== searchStr;\n } catch (error) {\n console.log('Error in isPath: ' + searchStr);\n throw 'Error in isPath: ' + searchStr;\n }\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid if they are used\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n\n //but also if they are just equal to the hierachy-level:\n //e.g.\n //- Text1\n // - Text2\n // Text3\n //Text4\n //\"Text3\" is still part of Text2 because Obsidian allows that!\n //but not \"Text4\" because its on the zero level\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (\n emptySpaces > 0 &&\n (emptySpaces == hierarchy.level + 2 || emptySpaces == hierarchy.level) &&\n !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)\n ) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\nconst nonDigit = new RegExp('\\\\D');\n\n// https://help.obsidian.md/How+to/Working+with+tags\n// only - _ and / are allowed\n// this is a brute force approach, because its not trivial to detect invalid tags in other languages\n// (can not use \\w for example because e.g. korean characters are excluded)\nconst disallowedSymbols = new Set([\n '#',\n '!',\n '{',\n '}',\n '(',\n ')',\n '?',\n '$',\n '%',\n '&',\n '\"',\n \"'\",\n '<',\n '>',\n '\\\\',\n '*',\n '`',\n '[',\n ']',\n ':',\n ',',\n ';',\n '~',\n '=',\n '§',\n '.',\n '°',\n '^',\n]);\n\nexport function validTag(tag: string) {\n //currently whitespace is also detected as part of the tag\n tag = tag.trim();\n let char = tag[0];\n //sanity check\n if (char !== '#') {\n return false;\n }\n\n let foundNonDigit = false;\n\n for (let index = 1; index < tag.length; index++) {\n char = tag[index];\n if (char.match(nonDigit)) {\n foundNonDigit = true;\n }\n\n if (disallowedSymbols.has(char)) {\n return false;\n }\n }\n\n return foundNonDigit;\n}\n\nexport function detectTags(content: string) {\n return content.match(tagRegex)?.filter((tag) => validTag(tag));\n}\n\nexport function removeTagsFromEnd(content: string, tags: string[]) {\n let curContent = content;\n let globalRemovedTag = false;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let removedTag = false;\n for (const tag of tags) {\n if (curContent.endsWith(tag)) {\n curContent = curContent.slice(0, -tag.length);\n removedTag = true;\n globalRemovedTag = true;\n }\n }\n\n if (!removedTag) {\n break;\n }\n }\n\n //removing empty space at the end, because the tag detection only detects leading empty space\n if (globalRemovedTag) {\n curContent = curContent.trimEnd();\n }\n\n return curContent;\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags, removeTagsFromEnd } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tags without losing meaning because they will show up as super tags anyways\n tanaNode.name = removeTagsFromEnd(tanaNode.name, tags);\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack and tag me):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","nonDigit","disallowedSymbols","validTag","tag","foundNonDigit","detectTags","removeTagsFromEnd","tags","curContent","globalRemovedTag","removedTag","cleanUpTag","superTagUidRequests","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAAU,YAAc,OAExBA,EAAU,YAAc,cACrBA,CACV,CACD,SAASN,EAAeD,EAAM,CAC1B,GAAIA,EAAK,GAEL,OACJA,EAAK,GAAK,GAEV,MAAMO,EAAYF,EAAaL,CAAI,EACnC,MAAMA,EAAK,KAAMO,CAAS,CAC7B,CACL,KCHA,MAAMC,GAAW,GACXC,GAAU,GACVC,GAAW,GAEXC,GAAe,GAC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AAgB2nB,CAAG,CAAA,CACxB,EACQ,SAAA,KAAK,YAAYkyC,CAAc,QACjCp1C,GACP,QAAQ,MAAMA,CAAK,EAEf80C,GACO,SAAA,KAAK,YAAYA,CAAQ,EAI9B,MAAAO,EAAoBr1C,EAAc,MAAM,SAAS,EAEvD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAs1C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAgEH,EAChF,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 6e1caa8..ed4d046 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,11 +3,11 @@ - Obsidian-2-Tana Converter - + Inofficial Obsidian-2-Tana Converter + -

Obsidian-2-Tana Converter

+

Inofficial Obsidian-2-Tana Converter

Select a zip of your Obsidian vault folder and get a TIF file back, ready to be imported in Tana.
diff --git a/index.html b/index.html index 0bef681..985b6a3 100644 --- a/index.html +++ b/index.html @@ -3,10 +3,10 @@ - Obsidian-2-Tana Converter + Inofficial Obsidian-2-Tana Converter -

Obsidian-2-Tana Converter

+

Inofficial Obsidian-2-Tana Converter

Select a zip of your Obsidian vault folder and get a TIF file back, ready to be imported in Tana.
diff --git a/src/script.ts b/src/script.ts index e1cd634..4e012e3 100644 --- a/src/script.ts +++ b/src/script.ts @@ -69,7 +69,7 @@ zipInput.addEventListener('change', async (event) => { document.body.appendChild(document.createElement('br')); document.body.appendChild(document.createElement('br')); const errorContent = document.createElement('b'); - errorContent.innerText = 'Content of Error (please post in the Slack):\n\n' + stackStr; + errorContent.innerText = 'Content of Error (please post in the Slack and tag me):\n\n' + stackStr; document.body.appendChild(errorContent); } }); From 97bc486e32f5d8e58d8f38e6161898b24408eda6 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Fri, 2 Dec 2022 17:37:55 +0100 Subject: [PATCH 92/94] Obsidian: added logging --- docs/assets/{index.4f988c9b.js => index.1c309ba1.js} | 6 +++--- .../{index.4f988c9b.js.map => index.1c309ba1.js.map} | 2 +- docs/index.html | 2 +- src/converters/obsidian/links/FileDescMap.ts | 7 +------ src/converters/obsidian/links/blockLinks.ts | 3 +++ src/converters/obsidian/links/internalLinks.ts | 3 +++ 6 files changed, 12 insertions(+), 11 deletions(-) rename docs/assets/{index.4f988c9b.js => index.1c309ba1.js} (99%) rename docs/assets/{index.4f988c9b.js.map => index.1c309ba1.js.map} (62%) diff --git a/docs/assets/index.4f988c9b.js b/docs/assets/index.1c309ba1.js similarity index 99% rename from docs/assets/index.4f988c9b.js rename to docs/assets/index.1c309ba1.js index 54acea8..9b533f2 100644 --- a/docs/assets/index.4f988c9b.js +++ b/docs/assets/index.1c309ba1.js @@ -8,9 +8,9 @@ var rl;function L(){return rl.apply(null,arguments)}function fu(e){rl=e}function [`+s+"] ";for(a in arguments[0])te(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[s];r.push(i)}sl(e+` Arguments: `+Array.prototype.slice.call(r).join("")+` `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Ca={};function al(e,t){L.deprecationHandler!=null&&L.deprecationHandler(e,t),Ca[e]||(sl(t),Ca[e]=!0)}L.suppressDeprecationWarnings=!1;L.deprecationHandler=null;function ht(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function hu(e){var t,n;for(n in e)te(e,n)&&(t=e[n],ht(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Li(e,t){var n=Lt({},e),r;for(r in t)te(t,r)&&($t(e[r])&&$t(t[r])?(n[r]={},Lt(n[r],e[r]),Lt(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)te(e,r)&&!te(t,r)&&$t(e[r])&&(n[r]=Lt({},n[r]));return n}function as(e){e!=null&&this.set(e)}var Ci;Object.keys?Ci=Object.keys:Ci=function(e){var t,n=[];for(t in e)te(e,t)&&n.push(t);return n};var mu={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function pu(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return ht(r)?r.call(t,n):r}function dt(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var os=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,di={},fn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(fn[e]=i),t&&(fn[t[0]]=function(){return dt(i.apply(this,arguments),t[1],t[2])}),n&&(fn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function _u(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function wu(e){var t=e.match(os),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var gu={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function xu(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(os).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var yu="Invalid date";function bu(){return this._invalidDate}var vu="%d",ku=/\d{1,2}/;function Su(e){return this._ordinal.replace("%d",e)}var Eu={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Du(e,t,n,r){var i=this._relativeTime[n];return ht(i)?i(e,t,n,r):i.replace(/%d/i,e)}function Tu(e,t){var n=this._relativeTime[e>0?"future":"past"];return ht(n)?n(t):n.replace(/%s/i,t)}var Rn={};function Oe(e,t){var n=e.toLowerCase();Rn[n]=Rn[n+"s"]=Rn[t]=e}function Ke(e){return typeof e=="string"?Rn[e]||Rn[e.toLowerCase()]:void 0}function ls(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var ll={};function Re(e,t){ll[e]=t}function Au(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:ll[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Cr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function pn(e,t){return function(n){return n!=null?(cl(this,e,n),L.updateOffset(this,t),this):br(this,e)}}function br(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function cl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Cr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Hr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ou(e){return e=Ke(e),ht(this[e])?this[e]():this}function Ru(e,t){if(typeof e=="object"){e=ls(e);var n=Au(e),r,i=n.length;for(r=0;r68?1900:2e3)};var xl=pn("FullYear",!0);function $u(){return Cr(this.year())}function Ku(e,t,n,r,i,s,a){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,i,s,a),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,i,s,a),l}function Nn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Nn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function yl(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),l=1+7*(t-1)+s+a,o,f;return l<=0?(o=e-1,f=Mn(o)+l):l>Mn(e)?(o=e+1,f=l-Mn(e)):(o=e,f=l),{year:o,dayOfYear:f}}function Pn(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+vt(a,t,n)):i>vt(e.year(),t,n)?(s=i-vt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function vt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(Mn(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Oe("week","w");Oe("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Gn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function Xu(e){return Pn(e,this._week.dow,this._week.doy).week}var Ju={dow:0,doy:6};function Qu(){return this._week.dow}function e0(){return this._week.doy}function t0(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function n0(e){var t=Pn(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Oe("day","d");Oe("weekday","e");Oe("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Gn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Gn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function r0(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function i0(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function fs(e,t){return e.slice(t,7).concat(e.slice(0,t))}var s0="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),a0="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),o0=Vn,l0=Vn,c0=Vn;function d0(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?fs(n,this._week.dow):e?n[e.day()]:n}function f0(e){return e===!0?fs(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function u0(e){return e===!0?fs(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function h0(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ut([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function m0(e,t,n){var r,i,s;if(this._weekdaysParseExact)return h0.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ut([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function p0(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=r0(e,this.localeData()),this.add(e-t,"d")):t}function _0(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function w0(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=i0(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function g0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=o0),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function x0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=l0),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function y0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=c0),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function us(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,l,o,f;for(s=0;s<7;s++)a=ut([2e3,1]).day(s),l=je(this.weekdaysMin(a,"")),o=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(l),n.push(o),r.push(f),i.push(l),i.push(o),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function hs(){return this.hours()%12||12}function b0(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,hs);H("k",["kk",2],0,b0);H("hmm",0,0,function(){return""+hs.apply(this)+dt(this.minutes(),2)});H("hmmss",0,0,function(){return""+hs.apply(this)+dt(this.minutes(),2)+dt(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+dt(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+dt(this.minutes(),2)+dt(this.seconds(),2)});function vl(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}vl("a",!0);vl("A",!1);Oe("hour","h");Re("hour",13);function kl(e,t){return t._meridiemParse}C("a",kl);C("A",kl);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",ul);C("hmmss",hl);C("Hmm",ul);C("Hmmss",hl);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i))});function v0(e){return(e+"").toLowerCase().charAt(0)==="p"}var k0=/[ap]\.?m?\.?/i,S0=pn("Hours",!0);function E0(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Sl={calendar:mu,longDateFormat:gu,invalidDate:yu,ordinal:vu,dayOfMonthOrdinalParse:ku,relativeTime:Eu,months:Yu,monthsShort:ml,week:Ju,weekdays:s0,weekdaysMin:a0,weekdaysShort:bl,meridiemParse:k0},de={},Dn={},Un;function D0(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=jr(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&D0(s,r)>=n-1)break;n--}t++}return Un}function A0(e){return e.match("^[^/\\\\]*$")!=null}function jr(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&A0(e))try{t=Un._abbr,n=require,n("./locale/"+e),Pt(t)}catch{de[e]=null}return de[e]}function Pt(e,t){var n;return e&&(Ce(t)?n=St(e):n=ms(e,t),n?Un=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Un._abbr}function ms(e,t){if(t!==null){var n,r=Sl;if(t.abbr=e,de[e]!=null)al("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=jr(t.parentLocale),n!=null)r=n._config;else return Dn[t.parentLocale]||(Dn[t.parentLocale]=[]),Dn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new as(Li(r,t)),Dn[e]&&Dn[e].forEach(function(i){ms(i.name,i.config)}),Pt(e),de[e]}else return delete de[e],null}function O0(e,t){if(t!=null){var n,r,i=Sl;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Li(de[e]._config,t)):(r=jr(e),r!=null&&(i=r._config),t=Li(i,t),r==null&&(t.abbr=e),n=new as(t),n.parentLocale=de[e],de[e]=n),Pt(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Pt()&&Pt(e)):de[e]!=null&&delete de[e]);return de[e]}function St(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Un;if(!rt(e)){if(t=jr(e),t)return t;e=[e]}return T0(e)}function R0(){return Ci(de)}function ps(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[gt]<0||n[gt]>11?gt:n[ot]<1||n[ot]>Hr(n[Ae],n[gt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[xt]!==0||n[zt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[xt]<0||n[xt]>59?xt:n[zt]<0||n[zt]>999?zt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=Nu),z(e)._overflowWeekday&&t===-1&&(t=Pu),z(e).overflow=t),e}var M0=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,I0=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,F0=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],fi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],L0=/^\/?Date\((-?\d+)/i,C0=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,N0={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function El(e){var t,n,r=e._i,i=M0.exec(r)||I0.exec(r),s,a,l,o,f=ir.length,d=fi.length;if(i){for(z(e).iso=!0,t=0,n=f;tMn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Nn(a,0,e._dayOfYear),e._a[gt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[xt]===0&&e._a[zt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Nn:Ku).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function V0(e){var t,n,r,i,s,a,l,o,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=sn(t.GG,e._a[Ae],Pn(oe(),1,4).year),r=sn(t.W,1),i=sn(t.E,1),(i<1||i>7)&&(o=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Pn(oe(),s,a),n=sn(t.gg,e._a[Ae],f.year),r=sn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(o=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(o=!0)):i=s),r<1||r>vt(n,s,a)?z(e)._overflowWeeks=!0:o!=null?z(e)._overflowWeekday=!0:(l=yl(n,r,i,s,a),e._a[Ae]=l.year,e._dayOfYear=l.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function ws(e){if(e._f===L.ISO_8601){El(e);return}if(e._f===L.RFC_2822){Dl(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,l=t.length,o=0,f,d;for(i=ol(e._f,e._locale).match(os)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),o+=r.length),fn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),Cu(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=l-o,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=G0(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Ae]=e._locale.erasConvertYear(f,e._a[Ae])),_s(e),ps(e)}function G0(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Z0(e){var t,n,r,i,s,a,l=!1,o=e._f.length;if(o===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Lr()});function Ol(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function hh(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return ss(e,this),e=Tl(e),e._a?(t=e._isUTC?ut(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&ih(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function mh(){return this.isValid()?!this._isUTC:!1}function ph(){return this.isValid()?this._isUTC:!1}function Ml(){return this.isValid()?this._isUTC&&this._offset===0:!1}var _h=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,wh=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:kt(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=_h.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[xt])*i,ms:$(Pi(r[zt]*1e3))*i}):(r=wh.exec(e))?(i=r[1]==="-"?-1:1,n={y:Zt(r[2],i),M:Zt(r[3],i),w:Zt(r[4],i),d:Zt(r[5],i),h:Zt(r[6],i),m:Zt(r[7],i),s:Zt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=gh(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Br(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Br.prototype;st.invalid=rh;function Zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Pa(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function gh(e,t){var n;return e.isValid()&&t.isValid()?(t=xs(t,e),e.isBefore(t)?n=Pa(e,t):(n=Pa(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Il(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(al(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),Fl(this,i,e),this}}function Fl(e,t,n,r){var i=t._milliseconds,s=Pi(t._days),a=Pi(t._months);!e.isValid()||(r=r==null?!0:r,a&&_l(e,br(e,"Month")+a*n),s&&cl(e,"Date",br(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var xh=Il(1,"add"),yh=Il(-1,"subtract");function Ll(e){return typeof e=="string"||e instanceof String}function bh(e){return it(e)||jn(e)||Ll(e)||kt(e)||kh(e)||vh(e)||e===null||e===void 0}function vh(e){var t=$t(e)&&!rs(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ht(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ph(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function Uh(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function Yh(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Wh(e){return this.from(oe(),e)}function Hh(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function jh(e){return this.to(oe(),e)}function Cl(e){var t;return e===void 0?this._locale._abbr:(t=St(e),t!=null&&(this._locale=t),this)}var Nl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Pl(){return this._locale}var Sr=1e3,un=60*Sr,Er=60*un,Ul=(365*400+97)*24*Er;function hn(e,t){return(e%t+t)%t}function Yl(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Ul:new Date(e,t,n).valueOf()}function Wl(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Ul:Date.UTC(e,t,n)}function Bh(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Wl:Yl,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hn(t+(this._isUTC?0:this.utcOffset()*un),Er);break;case"minute":t=this._d.valueOf(),t-=hn(t,un);break;case"second":t=this._d.valueOf(),t-=hn(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function Vh(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Wl:Yl,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-hn(t+(this._isUTC?0:this.utcOffset()*un),Er)-1;break;case"minute":t=this._d.valueOf(),t+=un-hn(t,un)-1;break;case"second":t=this._d.valueOf(),t+=Sr-hn(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function Gh(){return this._d.valueOf()-(this._offset||0)*6e4}function Zh(){return Math.floor(this.valueOf()/1e3)}function qh(){return new Date(this.valueOf())}function zh(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function $h(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Kh(){return this.isValid()?this.toISOString():null}function Xh(){return is(this)}function Jh(){return Lt({},z(this))}function Qh(){return z(this).overflow}function e1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",ys);C("NN",ys);C("NNN",ys);C("NNNN",f1);C("NNNNN",u1);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",_n);C("yy",_n);C("yyy",_n);C("yyyy",_n);C("yo",h1);ie(["y","yy","yyy","yyyy"],Ae);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ae]=n._locale.eraYearOrdinalParse(e,i):t[Ae]=parseInt(e,10)});function t1(e,t){var n,r,i,s=this._eras||St("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function r1(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function i1(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),y1.call(this,e,t,n,r,i))}function y1(e,t,n,r,i){var s=yl(e,t,n,r,i),a=Nn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Oe("quarter","Q");Re("quarter",7);C("Q",dl);ie("Q",function(e,t){t[gt]=($(e)-1)*3});function b1(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Oe("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var jl=pn("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Oe("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Pr);C("DDDD",fl);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function v1(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Oe("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var k1=pn("Minutes",!1);H("s",["ss",2],0,"second");Oe("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],xt);var S1=pn("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Oe("millisecond","ms");Re("millisecond",16);C("S",Pr,dl);C("SS",Pr,Be);C("SSS",Pr,fl);var Ct,Bl;for(Ct="SSSS";Ct.length<=9;Ct+="S")C(Ct,_n);function E1(e,t){t[zt]=$(("0."+e)*1e3)}for(Ct="S";Ct.length<=9;Ct+="S")ie(Ct,E1);Bl=pn("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function D1(){return this._isUTC?"UTC":""}function T1(){return this._isUTC?"Coordinated Universal Time":""}var M=Bn.prototype;M.add=xh;M.calendar=Dh;M.clone=Th;M.diff=Lh;M.endOf=Vh;M.format=Uh;M.from=Yh;M.fromNow=Wh;M.to=Hh;M.toNow=jh;M.get=Ou;M.invalidAt=Qh;M.isAfter=Ah;M.isBefore=Oh;M.isBetween=Rh;M.isSame=Mh;M.isSameOrAfter=Ih;M.isSameOrBefore=Fh;M.isValid=Xh;M.lang=Nl;M.locale=Cl;M.localeData=Pl;M.max=X0;M.min=K0;M.parsingFlags=Jh;M.set=Ru;M.startOf=Bh;M.subtract=yh;M.toArray=zh;M.toObject=$h;M.toDate=qh;M.toISOString=Nh;M.inspect=Ph;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=Kh;M.toString=Ch;M.unix=Zh;M.valueOf=Gh;M.creationData=e1;M.eraName=i1;M.eraNarrow=s1;M.eraAbbr=a1;M.eraYear=o1;M.year=xl;M.isLeapYear=$u;M.weekYear=m1;M.isoWeekYear=p1;M.quarter=M.quarters=b1;M.month=wl;M.daysInMonth=Zu;M.week=M.weeks=t0;M.isoWeek=M.isoWeeks=n0;M.weeksInYear=g1;M.weeksInWeekYear=x1;M.isoWeeksInYear=_1;M.isoWeeksInISOWeekYear=w1;M.date=jl;M.day=M.days=p0;M.weekday=_0;M.isoWeekday=w0;M.dayOfYear=v1;M.hour=M.hours=S0;M.minute=M.minutes=k1;M.second=M.seconds=S1;M.millisecond=M.milliseconds=Bl;M.utcOffset=ah;M.utc=lh;M.local=ch;M.parseZone=dh;M.hasAlignedHourOffset=fh;M.isDST=uh;M.isLocal=mh;M.isUtcOffset=ph;M.isUtc=Ml;M.isUTC=Ml;M.zoneAbbr=D1;M.zoneName=T1;M.dates=$e("dates accessor is deprecated. Use date instead.",jl);M.months=$e("months accessor is deprecated. Use month instead",wl);M.years=$e("years accessor is deprecated. Use year instead",xl);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",oh);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",hh);function A1(e){return oe(e*1e3)}function O1(){return oe.apply(null,arguments).parseZone()}function Vl(e){return e}var ne=as.prototype;ne.calendar=pu;ne.longDateFormat=xu;ne.invalidDate=bu;ne.ordinal=Su;ne.preparse=Vl;ne.postformat=Vl;ne.relativeTime=Du;ne.pastFuture=Tu;ne.set=hu;ne.eras=t1;ne.erasParse=n1;ne.erasConvertYear=r1;ne.erasAbbrRegex=c1;ne.erasNameRegex=l1;ne.erasNarrowRegex=d1;ne.months=ju;ne.monthsShort=Bu;ne.monthsParse=Gu;ne.monthsRegex=zu;ne.monthsShortRegex=qu;ne.week=Xu;ne.firstDayOfYear=e0;ne.firstDayOfWeek=Qu;ne.weekdays=d0;ne.weekdaysMin=u0;ne.weekdaysShort=f0;ne.weekdaysParse=m0;ne.weekdaysRegex=g0;ne.weekdaysShortRegex=x0;ne.weekdaysMinRegex=y0;ne.isPM=v0;ne.meridiem=E0;function Dr(e,t,n,r){var i=St(),s=ut().set(r,t);return i[n](s,e)}function Gl(e,t,n){if(kt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function vs(e,t,n,r){typeof e=="boolean"?(kt(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,kt(t)&&(n=t,t=void 0),t=t||"");var i=St(),s=e?i._week.dow:0,a,l=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)l[a]=Dr(t,(a+s)%7,r,"day");return l}function R1(e,t){return Gl(e,t,"months")}function M1(e,t){return Gl(e,t,"monthsShort")}function I1(e,t,n){return vs(e,t,n,"weekdays")}function F1(e,t,n){return vs(e,t,n,"weekdaysShort")}function L1(e,t,n){return vs(e,t,n,"weekdaysMin")}Pt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Pt);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",St);var _t=Math.abs;function C1(){var e=this._data;return this._milliseconds=_t(this._milliseconds),this._days=_t(this._days),this._months=_t(this._months),e.milliseconds=_t(e.milliseconds),e.seconds=_t(e.seconds),e.minutes=_t(e.minutes),e.hours=_t(e.hours),e.months=_t(e.months),e.years=_t(e.years),this}function Zl(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function N1(e,t){return Zl(this,e,t,1)}function P1(e,t){return Zl(this,e,t,-1)}function Ua(e){return e<0?Math.floor(e):Math.ceil(e)}function U1(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,l,o;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Ua(Yi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),o=Ze(ql(t)),n+=o,t-=Ua(Yi(o)),l=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=l,this}function ql(e){return e*4800/146097}function Yi(e){return e*146097/4800}function Y1(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+ql(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Yi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function W1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Et(e){return function(){return this.as(e)}}var H1=Et("ms"),j1=Et("s"),B1=Et("m"),V1=Et("h"),G1=Et("d"),Z1=Et("w"),q1=Et("M"),z1=Et("Q"),$1=Et("y");function K1(){return st(this)}function X1(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Xt(e){return function(){return this.isValid()?this._data[e]:NaN}}var J1=Xt("milliseconds"),Q1=Xt("seconds"),em=Xt("minutes"),tm=Xt("hours"),nm=Xt("days"),rm=Xt("months"),im=Xt("years");function sm(){return Ze(this.days()/7)}var wt=Math.round,ln={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function am(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function om(e,t,n,r){var i=st(e).abs(),s=wt(i.as("s")),a=wt(i.as("m")),l=wt(i.as("h")),o=wt(i.as("d")),f=wt(i.as("M")),d=wt(i.as("w")),u=wt(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,am.apply(null,p)}function lm(e){return e===void 0?wt:typeof e=="function"?(wt=e,!0):!1}function cm(e,t){return ln[e]===void 0?!1:t===void 0?ln[e]:(ln[e]=t,e==="s"&&(ln.ss=t-1),!0)}function dm(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ln,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ln,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=om(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var ui=Math.abs;function nn(e){return(e>0)-(e<0)||+e}function Gr(){if(!this.isValid())return this.localeData().invalidDate();var e=ui(this._milliseconds)/1e3,t=ui(this._days),n=ui(this._months),r,i,s,a,l=this.asSeconds(),o,f,d,u;return l?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",o=l<0?"-":"",f=nn(this._months)!==nn(l)?"-":"",d=nn(this._days)!==nn(l)?"-":"",u=nn(this._milliseconds)!==nn(l)?"-":"",o+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Br.prototype;X.isValid=nh;X.abs=C1;X.add=N1;X.subtract=P1;X.as=Y1;X.asMilliseconds=H1;X.asSeconds=j1;X.asMinutes=B1;X.asHours=V1;X.asDays=G1;X.asWeeks=Z1;X.asMonths=q1;X.asQuarters=z1;X.asYears=$1;X.valueOf=W1;X._bubble=U1;X.clone=K1;X.get=X1;X.milliseconds=J1;X.seconds=Q1;X.minutes=em;X.hours=tm;X.days=nm;X.weeks=sm;X.months=rm;X.years=im;X.humanize=dm;X.toISOString=Gr;X.toString=Gr;X.toJSON=Gr;X.locale=Cl;X.localeData=Pl;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gr);X.lang=Nl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Yr);C("X",Iu);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js -L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L.months=R1;L.isDate=jn;L.locale=Pt;L.invalid=Lr;L.duration=st;L.isMoment=it;L.weekdays=I1;L.parseZone=O1;L.localeData=St;L.isDuration=dr;L.monthsShort=M1;L.weekdaysMin=L1;L.defineLocale=ms;L.updateLocale=O0;L.locales=R0;L.weekdaysShort=F1;L.normalizeUnits=Ke;L.relativeTimeRounding=lm;L.relativeTimeThreshold=cm;L.calendarFormat=Eh;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Wi(e,t){const n=L(e,t,!0);if(n.isValid())return n.format("MM-DD-YYYY")}function fm(e){try{return Ir(e)!==e}catch{throw console.log("Error in isPath: "+e),"Error in isPath: "+e}}class hi{constructor(){Bt(this,"nameWasCalledAsFile",[]);Bt(this,"pathMap",new Map);Bt(this,"nameMap",new Map)}accessAsFile(t,n,r,i){const s=Wi(t,i);s&&(t=s);const a=this.pathMap.get(n);if(a)return this.nameMap.get(t)||this.nameMap.set(t,a),a;const l=this.nameMap.get(t);if(l&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,l),this.nameWasCalledAsFile.push(t),l;const o=r(s);return this.pathMap.set(n,o),this.nameMap.get(t)||this.nameMap.set(t,o),this.nameWasCalledAsFile.push(t),o}accessAsLink(t,n,r){const i=Wi(t,r);i&&(t=i);const s=this.findData(t);if(s)return s;const a=fm(t),l=n(i);return a?this.pathMap.set(t,l):this.nameMap.set(t,l),l}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Zr(e){e.totalNodes++,e.leafNodes++}function zl(e){e.leafNodes--,e.topLevelNodes++}function um(e,t,n=cu,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new hi,headingTracker:new hi,dummyHeadingLinkTracker:new Map,blockLinkTracker:new hi,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function Wt(e){return Zr(e.summary),e.idGenerator()}function hm(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map,t.dailyNoteFormat);let s=i.get(r);return s||(s={uid:Wt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function mm(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map,n.dailyNoteFormat);let a=s.get(i);return a||(a={uid:Wt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function pm(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function _m(e){let t;return[e.split(` +L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L.months=R1;L.isDate=jn;L.locale=Pt;L.invalid=Lr;L.duration=st;L.isMoment=it;L.weekdays=I1;L.parseZone=O1;L.localeData=St;L.isDuration=dr;L.monthsShort=M1;L.weekdaysMin=L1;L.defineLocale=ms;L.updateLocale=O0;L.locales=R0;L.weekdaysShort=F1;L.normalizeUnits=Ke;L.relativeTimeRounding=lm;L.relativeTimeThreshold=cm;L.calendarFormat=Eh;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Wi(e,t){const n=L(e,t,!0);if(n.isValid())return n.format("MM-DD-YYYY")}function fm(e){return Ir(e)!==e}class hi{constructor(){Bt(this,"nameWasCalledAsFile",[]);Bt(this,"pathMap",new Map);Bt(this,"nameMap",new Map)}accessAsFile(t,n,r,i){const s=Wi(t,i);s&&(t=s);const a=this.pathMap.get(n);if(a)return this.nameMap.get(t)||this.nameMap.set(t,a),a;const l=this.nameMap.get(t);if(l&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,l),this.nameWasCalledAsFile.push(t),l;const o=r(s);return this.pathMap.set(n,o),this.nameMap.get(t)||this.nameMap.set(t,o),this.nameWasCalledAsFile.push(t),o}accessAsLink(t,n,r){const i=Wi(t,r);i&&(t=i);const s=this.findData(t);if(s)return s;const a=fm(t),l=n(i);return a?this.pathMap.set(t,l):this.nameMap.set(t,l),l}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Zr(e){e.totalNodes++,e.leafNodes++}function zl(e){e.leafNodes--,e.topLevelNodes++}function um(e,t,n=cu,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new hi,headingTracker:new hi,dummyHeadingLinkTracker:new Map,blockLinkTracker:new hi,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function Wt(e){return Zr(e.summary),e.idGenerator()}function hm(e,t){const n=e[0],r=e[1];n==null&&console.log("Parsed undefined file name in block link.");const i=t.blockLinkTracker.accessAsLink(n,()=>new Map,t.dailyNoteFormat);let s=i.get(r);return s||(s={uid:Wt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function mm(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map,n.dailyNoteFormat);let a=s.get(i);return a||(a={uid:Wt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function pm(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function _m(e){let t;return[e.split(` `).map(r=>{const i=r.split(" "),s=i[i.length-1];return s.startsWith("^")?(t=s,i.slice(0,-1).join(" ")):r}).join(` -`),t]}function $l(e,t,n,r,i,s){const a=[t],l=[e];for(const o of n){const f=i(o);wm(f,o,a,l,r),s==null||s(f,o)}}function wm(e,t,n,r,i){var l;gm(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(l=a.children)!=null?l:[],a.children.push(e)),n.push(t),r.push(e)}function gm(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function Kl(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=Kl(n.children,r);if(i)return i}}return null}function xm(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function ym(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const l=t.findData(s);if(l){const o={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};$l(f,o,l,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=Kl(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function bm(e,t){const[n,r]=ym(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Zr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let l=a;s.forEach(o=>{l=l.replace(o.old,o.new)}),await t.adapter.appendToPostProcessingFile(i,l)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var Xl=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(Xl||{});function vm(e,t){const n=km(e.name,t);if(n.length>0){const r=new Set;e.refs||(e.refs=[]);for(const[i,s,a]of n)r.add(s),e.name=e.name.replaceAll("[["+i+"]]",a);e.refs.push(...Array.from(r.values()))}}function km(e,t){return du(e,!0).map(n=>[n,n.split("|").map(r=>r.trim())]).filter(n=>n[1][0]!=="").map(n=>{const r=n[1],i=r[0],s=r[1],a=Dm(i,t),l=s!==void 0&&s.trim()!==""?"["+s.trim()+"]([["+a+"]])":"[["+a+"]]";return[n[0],a,l]})}function Sm(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function Em(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function Dm(e,t){const n=Sm(e);switch(Em(n)){case 0:return Tm(n[0],t);case 2:return hm(n,t);case 1:return xm(n,t);default:throw"Invalid link type detected: "+n}}function Tm(e,t){return t.defaultLinkTracker.accessAsLink(e,r=>(Zr(t.summary),{uid:r!=null?r:t.idGenerator(),obsidianLink:e,type:1}),t.dailyNoteFormat).uid}function Jl(e,t,n,r){const[i,s]=_m(n);return s?[mm([e,s],t,r),i]:[Wt(r),n]}function Am(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,s=>(Zr(n.summary),{uid:s!=null?s:n.idGenerator(),obsidianLink:r,type:0}),n.dailyNoteFormat);return i.type=0,i.uid}function Om(e){const t=[];for(const n of e.getData())n.type===Xl.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function Rm(e){return[...e.invalidLinks,...Om(e.defaultLinkTracker),...pm(e.blockLinkTracker)]}function Mm(e,t,n){const r=Rm(n).sort((a,l)=>a.link.localeCompare(l.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:Wt(n),name:i,createdAt:t,editedAt:t,type:"node"};return zl(n.summary),s.children=r,s}function ks(e){return e===" "||e===" "}function Zn(e,t){let n=0;for(;ks(e[t+n]);)n++;return n}function Im(e,t){let n=t,r=e[t];for(;ks(r);)n--,r=e[n];return n+1}function Ut(e,t){let n=0;for(;!Ss(e[t+n]);)n++;return t+n}function Ql(e,t){const n=e[t-1];return Ss(n)}function Ss(e){return e===void 0||e===` +`),t]}function $l(e,t,n,r,i,s){const a=[t],l=[e];for(const o of n){const f=i(o);wm(f,o,a,l,r),s==null||s(f,o)}}function wm(e,t,n,r,i){var l;gm(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(l=a.children)!=null?l:[],a.children.push(e)),n.push(t),r.push(e)}function gm(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function Kl(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=Kl(n.children,r);if(i)return i}}return null}function xm(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function ym(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const l=t.findData(s);if(l){const o={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};$l(f,o,l,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=Kl(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function bm(e,t){const[n,r]=ym(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Zr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let l=a;s.forEach(o=>{l=l.replace(o.old,o.new)}),await t.adapter.appendToPostProcessingFile(i,l)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var Xl=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(Xl||{});function vm(e,t){const n=km(e.name,t);if(n.length>0){const r=new Set;e.refs||(e.refs=[]);for(const[i,s,a]of n)r.add(s),e.name=e.name.replaceAll("[["+i+"]]",a);e.refs.push(...Array.from(r.values()))}}function km(e,t){return du(e,!0).map(n=>[n,n.split("|").map(r=>r.trim())]).filter(n=>n[1][0]!=="").map(n=>{const r=n[1],i=r[0],s=r[1],a=Dm(i,t),l=s!==void 0&&s.trim()!==""?"["+s.trim()+"]([["+a+"]])":"[["+a+"]]";return[n[0],a,l]})}function Sm(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function Em(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function Dm(e,t){const n=Sm(e);switch(Em(n)){case 0:return Tm(n[0],t);case 2:return hm(n,t);case 1:return xm(n,t);default:throw"Invalid link type detected: "+n}}function Tm(e,t){return e==null&&console.log("Parsed undefined link in standard link."),t.defaultLinkTracker.accessAsLink(e,r=>(Zr(t.summary),{uid:r!=null?r:t.idGenerator(),obsidianLink:e,type:1}),t.dailyNoteFormat).uid}function Jl(e,t,n,r){const[i,s]=_m(n);return s?[mm([e,s],t,r),i]:[Wt(r),n]}function Am(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,s=>(Zr(n.summary),{uid:s!=null?s:n.idGenerator(),obsidianLink:r,type:0}),n.dailyNoteFormat);return i.type=0,i.uid}function Om(e){const t=[];for(const n of e.getData())n.type===Xl.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function Rm(e){return[...e.invalidLinks,...Om(e.defaultLinkTracker),...pm(e.blockLinkTracker)]}function Mm(e,t,n){const r=Rm(n).sort((a,l)=>a.link.localeCompare(l.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:Wt(n),name:i,createdAt:t,editedAt:t,type:"node"};return zl(n.summary),s.children=r,s}function ks(e){return e===" "||e===" "}function Zn(e,t){let n=0;for(;ks(e[t+n]);)n++;return n}function Im(e,t){let n=t,r=e[t];for(;ks(r);)n--,r=e[n];return n+1}function Ut(e,t){let n=0;for(;!Ss(e[t+n]);)n++;return t+n}function Ql(e,t){const n=e[t-1];return Ss(n)}function Ss(e){return e===void 0||e===` `}function ec(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function Es(e,t){let n=!0;const r=t+Zn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ec(e,r));const a=Im(e,r-1)-1,l=e[a];return Ss(l)&&n?{type:ft.BULLET,level:r-a-1}:null}function Fm(e,t,n){let r=t+n.level;if(ec(e,r))return r;r+=1+1;const i=Zn(e,r);return r+i}function Lm(e,t,n){let r=Ut(e,t+n.level+1+1),i=e[r];for(;;){const s=Zn(e,r+1);if(s>0&&(s==n.level+2||s==n.level)&&!Es(e,r+1+s))r=Ut(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Cm(e,t){return e+t.level}function Nm(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=Zn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function tc(e,t){if(!Ql(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=Ut(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],l=e[i+2];for(;[s,a,l].every(d=>d!==void 0)&&[s,a,l].join("")!=="```";)i++,s=e[i],a=e[i+1],l=e[i+2];if([s,a,l].some(d=>d===void 0))return null;const o=Ut(e,i+3);return e.slice(i+3,o).trim()!==""?null:{type:ft.CODEBLOCK,level:o-t+(e[o]===` `?1:0),codeLanguage:r!==""?r:void 0}}return null}function Pm(e,t){return Ut(e,t)}function nc(e,t){const n=Ut(e,t),r=e.slice(t,n);return rc(r)?{type:ft.DATAVIEWATTRIBUTE,level:0}:null}function rc(e){const t=e.split("::");return t.length===2&&t[0].trim()===t[0]&&t[0]!==""&&t[1]!==""&&t[1]!==" "&&ks(t[1][0])}function ic(e,t){if(!Ql(e,t))return null;const n=Um(e,t);return n>0&&e[t+n]===" "?{type:ft.HEADING,level:n}:null}function Um(e,t){let n=t,r=0;for(;e[n]==="#";)n++,r++;return r}function Ym(e,t,n){const r=t+n.level+1,i=Zn(e,r);return r+i}function Wm(e,t,n){return Ut(e,t+n.level+1)}function Hm(e,t){let n=Ut(e,t),r=e[n],i=r;for(n++,r=e[n];;){if(r===void 0)return[n];if(r===` `&&i===` @@ -46,4 +46,4 @@ L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L Please check the text at the top again.`,document.body.appendChild(l)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack and tag me): `+i,document.body.appendChild(a)}}); -//# sourceMappingURL=index.4f988c9b.js.map +//# sourceMappingURL=index.1c309ba1.js.map diff --git a/docs/assets/index.4f988c9b.js.map b/docs/assets/index.1c309ba1.js.map similarity index 62% rename from docs/assets/index.4f988c9b.js.map rename to docs/assets/index.1c309ba1.js.map index 134a182..250860c 100644 --- a/docs/assets/index.4f988c9b.js.map +++ b/docs/assets/index.1c309ba1.js.map @@ -1 +1 @@ -{"version":3,"file":"index.4f988c9b.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n try {\n return basename(searchStr) !== searchStr;\n } catch (error) {\n console.log('Error in isPath: ' + searchStr);\n throw 'Error in isPath: ' + searchStr;\n }\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid if they are used\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n\n //but also if they are just equal to the hierachy-level:\n //e.g.\n //- Text1\n // - Text2\n // Text3\n //Text4\n //\"Text3\" is still part of Text2 because Obsidian allows that!\n //but not \"Text4\" because its on the zero level\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (\n emptySpaces > 0 &&\n (emptySpaces == hierarchy.level + 2 || emptySpaces == hierarchy.level) &&\n !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)\n ) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\nconst nonDigit = new RegExp('\\\\D');\n\n// https://help.obsidian.md/How+to/Working+with+tags\n// only - _ and / are allowed\n// this is a brute force approach, because its not trivial to detect invalid tags in other languages\n// (can not use \\w for example because e.g. korean characters are excluded)\nconst disallowedSymbols = new Set([\n '#',\n '!',\n '{',\n '}',\n '(',\n ')',\n '?',\n '$',\n '%',\n '&',\n '\"',\n \"'\",\n '<',\n '>',\n '\\\\',\n '*',\n '`',\n '[',\n ']',\n ':',\n ',',\n ';',\n '~',\n '=',\n '§',\n '.',\n '°',\n '^',\n]);\n\nexport function validTag(tag: string) {\n //currently whitespace is also detected as part of the tag\n tag = tag.trim();\n let char = tag[0];\n //sanity check\n if (char !== '#') {\n return false;\n }\n\n let foundNonDigit = false;\n\n for (let index = 1; index < tag.length; index++) {\n char = tag[index];\n if (char.match(nonDigit)) {\n foundNonDigit = true;\n }\n\n if (disallowedSymbols.has(char)) {\n return false;\n }\n }\n\n return foundNonDigit;\n}\n\nexport function detectTags(content: string) {\n return content.match(tagRegex)?.filter((tag) => validTag(tag));\n}\n\nexport function removeTagsFromEnd(content: string, tags: string[]) {\n let curContent = content;\n let globalRemovedTag = false;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let removedTag = false;\n for (const tag of tags) {\n if (curContent.endsWith(tag)) {\n curContent = curContent.slice(0, -tag.length);\n removedTag = true;\n globalRemovedTag = true;\n }\n }\n\n if (!removedTag) {\n break;\n }\n }\n\n //removing empty space at the end, because the tag detection only detects leading empty space\n if (globalRemovedTag) {\n curContent = curContent.trimEnd();\n }\n\n return curContent;\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags, removeTagsFromEnd } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tags without losing meaning because they will show up as super tags anyways\n tanaNode.name = removeTagsFromEnd(tanaNode.name, tags);\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack and tag me):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","nonDigit","disallowedSymbols","validTag","tag","foundNonDigit","detectTags","removeTagsFromEnd","tags","curContent","globalRemovedTag","removedTag","cleanUpTag","superTagUidRequests","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","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DA,EAAe,UAAY,oBACZA,EAAA,iBAAiB,QAAS,IAAM,CACvC,MAAAlyC,EAAM,IAAI,gBAAgB,IAAI,KAAK,CAAC9X,CAAM,CAAC,CAAC,EAC5C7P,EAAI,SAAS,cAAc,GAAG,EACpCA,EAAE,MAAM,QAAU,OAClBA,EAAE,KAAO2nB,EACT3nB,EAAE,SAAWo5D,EAAY,YAChB,SAAA,KAAK,YAAYp5D,CAAC,EAC3BA,EAAE,MAAM,EACR,IAAI,gBAAgB2nB,CAAG,CAAA,CACxB,EACQ,SAAA,KAAK,YAAYkyC,CAAc,QACjCp1C,GACP,QAAQ,MAAMA,CAAK,EAEf80C,GACO,SAAA,KAAK,YAAYA,CAAQ,EAI9B,MAAAO,EAAoBr1C,EAAc,MAAM,SAAS,EAEvD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAs1C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAgEH,EAChF,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file +{"version":3,"file":"index.1c309ba1.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n if (fileName == undefined) {\n console.log('Parsed undefined file name in block link.');\n }\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid if they are used\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n if (obsidianLink == undefined) {\n console.log('Parsed undefined link in standard link.');\n }\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n\n //but also if they are just equal to the hierachy-level:\n //e.g.\n //- Text1\n // - Text2\n // Text3\n //Text4\n //\"Text3\" is still part of Text2 because Obsidian allows that!\n //but not \"Text4\" because its on the zero level\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (\n emptySpaces > 0 &&\n (emptySpaces == hierarchy.level + 2 || emptySpaces == hierarchy.level) &&\n !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)\n ) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\nconst nonDigit = new RegExp('\\\\D');\n\n// https://help.obsidian.md/How+to/Working+with+tags\n// only - _ and / are allowed\n// this is a brute force approach, because its not trivial to detect invalid tags in other languages\n// (can not use \\w for example because e.g. korean characters are excluded)\nconst disallowedSymbols = new Set([\n '#',\n '!',\n '{',\n '}',\n '(',\n ')',\n '?',\n '$',\n '%',\n '&',\n '\"',\n \"'\",\n '<',\n '>',\n '\\\\',\n '*',\n '`',\n '[',\n ']',\n ':',\n ',',\n ';',\n '~',\n '=',\n '§',\n '.',\n '°',\n '^',\n]);\n\nexport function validTag(tag: string) {\n //currently whitespace is also detected as part of the tag\n tag = tag.trim();\n let char = tag[0];\n //sanity check\n if (char !== '#') {\n return false;\n }\n\n let foundNonDigit = false;\n\n for (let index = 1; index < tag.length; index++) {\n char = tag[index];\n if (char.match(nonDigit)) {\n foundNonDigit = true;\n }\n\n if (disallowedSymbols.has(char)) {\n return false;\n }\n }\n\n return foundNonDigit;\n}\n\nexport function detectTags(content: string) {\n return content.match(tagRegex)?.filter((tag) => validTag(tag));\n}\n\nexport function removeTagsFromEnd(content: string, tags: string[]) {\n let curContent = content;\n let globalRemovedTag = false;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let removedTag = false;\n for (const tag of tags) {\n if (curContent.endsWith(tag)) {\n curContent = curContent.slice(0, -tag.length);\n removedTag = true;\n globalRemovedTag = true;\n }\n }\n\n if (!removedTag) {\n break;\n }\n }\n\n //removing empty space at the end, because the tag detection only detects leading empty space\n if (globalRemovedTag) {\n curContent = curContent.trimEnd();\n }\n\n return curContent;\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags, removeTagsFromEnd } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tags without losing meaning because they will show up as super tags anyways\n tanaNode.name = removeTagsFromEnd(tanaNode.name, tags);\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack and tag me):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","nonDigit","disallowedSymbols","validTag","tag","foundNonDigit","detectTags","removeTagsFromEnd","tags","curContent","globalRemovedTag","removedTag","cleanUpTag","superTagUidRequests","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAAU,YAAc,OAExBA,EAAU,YAAc,cACrBA,CACV,CACD,SAASN,EAAeD,EAAM,CAC1B,GAAIA,EAAK,GAEL,OACJA,EAAK,GAAK,GAEV,MAAMO,EAAYF,EAAaL,CAAI,EACnC,MAAMA,EAAK,KAAMO,CAAS,CAC7B,CACL,KCHA,MAAMC,GAAW,GACXC,GAAU,GACVC,GAAW,GAEXC,GAAe,GACfC,GAAW,IACXC,GAAWD,GAAW,EAAID,GAC1BG,GAAa,EAAID,GAAU,EAE3BE,GAAY,IAGZC,GAAc,EAGdC,GAAU,GAGVC,GAAY,GAGZC,GAAc,GAMdC,GAAW,EAAI,EAGfC,GAAwB,GAGxBC,GAAa,EACbC,GAAiB,EACjBC,GAAqB,EAErBC,GAAa,EACbC,GAAkB,EAClBC,GAAe,EACfC,GAAW,EAEXC,G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s/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Inofficial Obsidian-2-Tana Converter - +

Inofficial Obsidian-2-Tana Converter

diff --git a/src/converters/obsidian/links/FileDescMap.ts b/src/converters/obsidian/links/FileDescMap.ts index 35ee001..b17c811 100644 --- a/src/converters/obsidian/links/FileDescMap.ts +++ b/src/converters/obsidian/links/FileDescMap.ts @@ -2,12 +2,7 @@ import { basename } from '../filesystem/CustomFileSystemAdapter'; import { dateStringToDateUID } from './dateLinks'; function isPath(searchStr: string) { - try { - return basename(searchStr) !== searchStr; - } catch (error) { - console.log('Error in isPath: ' + searchStr); - throw 'Error in isPath: ' + searchStr; - } + return basename(searchStr) !== searchStr; } //using a mix of fileName and filePath in the links might lead to random results diff --git a/src/converters/obsidian/links/blockLinks.ts b/src/converters/obsidian/links/blockLinks.ts index d10d8a4..647fe54 100644 --- a/src/converters/obsidian/links/blockLinks.ts +++ b/src/converters/obsidian/links/blockLinks.ts @@ -18,6 +18,9 @@ export interface BlockUidData { export function blockLinkUidRequestForUsing(link: string[], context: VaultContext) { const fileName = link[0]; const blockObsidianUid = link[1]; + if (fileName == undefined) { + console.log('Parsed undefined file name in block link.'); + } const blockUidMap = context.blockLinkTracker.accessAsLink( fileName, () => { diff --git a/src/converters/obsidian/links/internalLinks.ts b/src/converters/obsidian/links/internalLinks.ts index ab4f6d9..22fabea 100644 --- a/src/converters/obsidian/links/internalLinks.ts +++ b/src/converters/obsidian/links/internalLinks.ts @@ -95,6 +95,9 @@ export function requestUidForLink(obsidianLink: string, context: VaultContext) { } function standardLinkUidRequest(obsidianLink: string, context: VaultContext) { + if (obsidianLink == undefined) { + console.log('Parsed undefined link in standard link.'); + } const uidData = context.defaultLinkTracker.accessAsLink( obsidianLink, (dateUID) => { From fe72309679b4b3173ad9c37c7c2d63e68ccb3359 Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Fri, 2 Dec 2022 18:04:27 +0100 Subject: [PATCH 93/94] Obsidian: added logging --- docs/assets/{index.1c309ba1.js => index.7c88b9a4.js} | 6 +++--- .../{index.1c309ba1.js.map => index.7c88b9a4.js.map} | 2 +- docs/index.html | 2 +- src/converters/obsidian/links/blockLinks.ts | 3 --- src/converters/obsidian/links/internalLinks.ts | 11 ++++++----- 5 files changed, 11 insertions(+), 13 deletions(-) rename docs/assets/{index.1c309ba1.js => index.7c88b9a4.js} (99%) rename docs/assets/{index.1c309ba1.js.map => index.7c88b9a4.js.map} (63%) diff --git a/docs/assets/index.1c309ba1.js b/docs/assets/index.7c88b9a4.js similarity index 99% rename from docs/assets/index.1c309ba1.js rename to docs/assets/index.7c88b9a4.js index 9b533f2..1f67782 100644 --- a/docs/assets/index.1c309ba1.js +++ b/docs/assets/index.7c88b9a4.js @@ -8,9 +8,9 @@ var rl;function L(){return rl.apply(null,arguments)}function fu(e){rl=e}function [`+s+"] ";for(a in arguments[0])te(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[s];r.push(i)}sl(e+` Arguments: `+Array.prototype.slice.call(r).join("")+` `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Ca={};function al(e,t){L.deprecationHandler!=null&&L.deprecationHandler(e,t),Ca[e]||(sl(t),Ca[e]=!0)}L.suppressDeprecationWarnings=!1;L.deprecationHandler=null;function ht(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function hu(e){var t,n;for(n in e)te(e,n)&&(t=e[n],ht(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Li(e,t){var n=Lt({},e),r;for(r in t)te(t,r)&&($t(e[r])&&$t(t[r])?(n[r]={},Lt(n[r],e[r]),Lt(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)te(e,r)&&!te(t,r)&&$t(e[r])&&(n[r]=Lt({},n[r]));return n}function as(e){e!=null&&this.set(e)}var Ci;Object.keys?Ci=Object.keys:Ci=function(e){var t,n=[];for(t in e)te(e,t)&&n.push(t);return n};var mu={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function pu(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return ht(r)?r.call(t,n):r}function dt(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var os=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,di={},fn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(fn[e]=i),t&&(fn[t[0]]=function(){return dt(i.apply(this,arguments),t[1],t[2])}),n&&(fn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function _u(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function wu(e){var t=e.match(os),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var gu={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function xu(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(os).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var yu="Invalid date";function bu(){return this._invalidDate}var vu="%d",ku=/\d{1,2}/;function Su(e){return this._ordinal.replace("%d",e)}var Eu={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Du(e,t,n,r){var i=this._relativeTime[n];return ht(i)?i(e,t,n,r):i.replace(/%d/i,e)}function Tu(e,t){var n=this._relativeTime[e>0?"future":"past"];return ht(n)?n(t):n.replace(/%s/i,t)}var Rn={};function Oe(e,t){var n=e.toLowerCase();Rn[n]=Rn[n+"s"]=Rn[t]=e}function Ke(e){return typeof e=="string"?Rn[e]||Rn[e.toLowerCase()]:void 0}function ls(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var ll={};function Re(e,t){ll[e]=t}function Au(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:ll[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Cr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function pn(e,t){return function(n){return n!=null?(cl(this,e,n),L.updateOffset(this,t),this):br(this,e)}}function br(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function cl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Cr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Hr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ou(e){return e=Ke(e),ht(this[e])?this[e]():this}function Ru(e,t){if(typeof e=="object"){e=ls(e);var n=Au(e),r,i=n.length;for(r=0;r68?1900:2e3)};var xl=pn("FullYear",!0);function $u(){return Cr(this.year())}function Ku(e,t,n,r,i,s,a){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,i,s,a),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,i,s,a),l}function Nn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Nn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function yl(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),l=1+7*(t-1)+s+a,o,f;return l<=0?(o=e-1,f=Mn(o)+l):l>Mn(e)?(o=e+1,f=l-Mn(e)):(o=e,f=l),{year:o,dayOfYear:f}}function Pn(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+vt(a,t,n)):i>vt(e.year(),t,n)?(s=i-vt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function vt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(Mn(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Oe("week","w");Oe("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Gn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function Xu(e){return Pn(e,this._week.dow,this._week.doy).week}var Ju={dow:0,doy:6};function Qu(){return this._week.dow}function e0(){return this._week.doy}function t0(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function n0(e){var t=Pn(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Oe("day","d");Oe("weekday","e");Oe("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Gn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Gn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function r0(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function i0(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function fs(e,t){return e.slice(t,7).concat(e.slice(0,t))}var s0="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),a0="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),o0=Vn,l0=Vn,c0=Vn;function d0(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?fs(n,this._week.dow):e?n[e.day()]:n}function f0(e){return e===!0?fs(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function u0(e){return e===!0?fs(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function h0(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ut([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function m0(e,t,n){var r,i,s;if(this._weekdaysParseExact)return h0.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ut([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function p0(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=r0(e,this.localeData()),this.add(e-t,"d")):t}function _0(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function w0(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=i0(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function g0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=o0),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function x0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=l0),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function y0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=c0),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function us(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,l,o,f;for(s=0;s<7;s++)a=ut([2e3,1]).day(s),l=je(this.weekdaysMin(a,"")),o=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(l),n.push(o),r.push(f),i.push(l),i.push(o),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function hs(){return this.hours()%12||12}function b0(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,hs);H("k",["kk",2],0,b0);H("hmm",0,0,function(){return""+hs.apply(this)+dt(this.minutes(),2)});H("hmmss",0,0,function(){return""+hs.apply(this)+dt(this.minutes(),2)+dt(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+dt(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+dt(this.minutes(),2)+dt(this.seconds(),2)});function vl(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}vl("a",!0);vl("A",!1);Oe("hour","h");Re("hour",13);function kl(e,t){return t._meridiemParse}C("a",kl);C("A",kl);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",ul);C("hmmss",hl);C("Hmm",ul);C("Hmmss",hl);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i))});function v0(e){return(e+"").toLowerCase().charAt(0)==="p"}var k0=/[ap]\.?m?\.?/i,S0=pn("Hours",!0);function E0(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Sl={calendar:mu,longDateFormat:gu,invalidDate:yu,ordinal:vu,dayOfMonthOrdinalParse:ku,relativeTime:Eu,months:Yu,monthsShort:ml,week:Ju,weekdays:s0,weekdaysMin:a0,weekdaysShort:bl,meridiemParse:k0},de={},Dn={},Un;function D0(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=jr(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&D0(s,r)>=n-1)break;n--}t++}return Un}function A0(e){return e.match("^[^/\\\\]*$")!=null}function jr(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&A0(e))try{t=Un._abbr,n=require,n("./locale/"+e),Pt(t)}catch{de[e]=null}return de[e]}function Pt(e,t){var n;return e&&(Ce(t)?n=St(e):n=ms(e,t),n?Un=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Un._abbr}function ms(e,t){if(t!==null){var n,r=Sl;if(t.abbr=e,de[e]!=null)al("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=jr(t.parentLocale),n!=null)r=n._config;else return Dn[t.parentLocale]||(Dn[t.parentLocale]=[]),Dn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new as(Li(r,t)),Dn[e]&&Dn[e].forEach(function(i){ms(i.name,i.config)}),Pt(e),de[e]}else return delete de[e],null}function O0(e,t){if(t!=null){var n,r,i=Sl;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Li(de[e]._config,t)):(r=jr(e),r!=null&&(i=r._config),t=Li(i,t),r==null&&(t.abbr=e),n=new as(t),n.parentLocale=de[e],de[e]=n),Pt(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Pt()&&Pt(e)):de[e]!=null&&delete de[e]);return de[e]}function St(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Un;if(!rt(e)){if(t=jr(e),t)return t;e=[e]}return T0(e)}function R0(){return Ci(de)}function ps(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[gt]<0||n[gt]>11?gt:n[ot]<1||n[ot]>Hr(n[Ae],n[gt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[xt]!==0||n[zt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[xt]<0||n[xt]>59?xt:n[zt]<0||n[zt]>999?zt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=Nu),z(e)._overflowWeekday&&t===-1&&(t=Pu),z(e).overflow=t),e}var M0=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,I0=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,F0=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],fi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],L0=/^\/?Date\((-?\d+)/i,C0=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,N0={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function El(e){var t,n,r=e._i,i=M0.exec(r)||I0.exec(r),s,a,l,o,f=ir.length,d=fi.length;if(i){for(z(e).iso=!0,t=0,n=f;tMn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Nn(a,0,e._dayOfYear),e._a[gt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[xt]===0&&e._a[zt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Nn:Ku).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function V0(e){var t,n,r,i,s,a,l,o,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=sn(t.GG,e._a[Ae],Pn(oe(),1,4).year),r=sn(t.W,1),i=sn(t.E,1),(i<1||i>7)&&(o=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Pn(oe(),s,a),n=sn(t.gg,e._a[Ae],f.year),r=sn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(o=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(o=!0)):i=s),r<1||r>vt(n,s,a)?z(e)._overflowWeeks=!0:o!=null?z(e)._overflowWeekday=!0:(l=yl(n,r,i,s,a),e._a[Ae]=l.year,e._dayOfYear=l.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function ws(e){if(e._f===L.ISO_8601){El(e);return}if(e._f===L.RFC_2822){Dl(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,l=t.length,o=0,f,d;for(i=ol(e._f,e._locale).match(os)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),o+=r.length),fn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),Cu(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=l-o,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=G0(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Ae]=e._locale.erasConvertYear(f,e._a[Ae])),_s(e),ps(e)}function G0(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Z0(e){var t,n,r,i,s,a,l=!1,o=e._f.length;if(o===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Lr()});function Ol(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function hh(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return ss(e,this),e=Tl(e),e._a?(t=e._isUTC?ut(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&ih(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function mh(){return this.isValid()?!this._isUTC:!1}function ph(){return this.isValid()?this._isUTC:!1}function Ml(){return this.isValid()?this._isUTC&&this._offset===0:!1}var _h=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,wh=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:kt(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=_h.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[xt])*i,ms:$(Pi(r[zt]*1e3))*i}):(r=wh.exec(e))?(i=r[1]==="-"?-1:1,n={y:Zt(r[2],i),M:Zt(r[3],i),w:Zt(r[4],i),d:Zt(r[5],i),h:Zt(r[6],i),m:Zt(r[7],i),s:Zt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=gh(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Br(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Br.prototype;st.invalid=rh;function Zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Pa(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function gh(e,t){var n;return e.isValid()&&t.isValid()?(t=xs(t,e),e.isBefore(t)?n=Pa(e,t):(n=Pa(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Il(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(al(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),Fl(this,i,e),this}}function Fl(e,t,n,r){var i=t._milliseconds,s=Pi(t._days),a=Pi(t._months);!e.isValid()||(r=r==null?!0:r,a&&_l(e,br(e,"Month")+a*n),s&&cl(e,"Date",br(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var xh=Il(1,"add"),yh=Il(-1,"subtract");function Ll(e){return typeof e=="string"||e instanceof String}function bh(e){return it(e)||jn(e)||Ll(e)||kt(e)||kh(e)||vh(e)||e===null||e===void 0}function vh(e){var t=$t(e)&&!rs(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ht(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ph(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function Uh(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function Yh(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Wh(e){return this.from(oe(),e)}function Hh(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function jh(e){return this.to(oe(),e)}function Cl(e){var t;return e===void 0?this._locale._abbr:(t=St(e),t!=null&&(this._locale=t),this)}var Nl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Pl(){return this._locale}var Sr=1e3,un=60*Sr,Er=60*un,Ul=(365*400+97)*24*Er;function hn(e,t){return(e%t+t)%t}function Yl(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Ul:new Date(e,t,n).valueOf()}function Wl(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Ul:Date.UTC(e,t,n)}function Bh(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Wl:Yl,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hn(t+(this._isUTC?0:this.utcOffset()*un),Er);break;case"minute":t=this._d.valueOf(),t-=hn(t,un);break;case"second":t=this._d.valueOf(),t-=hn(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function Vh(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Wl:Yl,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-hn(t+(this._isUTC?0:this.utcOffset()*un),Er)-1;break;case"minute":t=this._d.valueOf(),t+=un-hn(t,un)-1;break;case"second":t=this._d.valueOf(),t+=Sr-hn(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function Gh(){return this._d.valueOf()-(this._offset||0)*6e4}function Zh(){return Math.floor(this.valueOf()/1e3)}function qh(){return new Date(this.valueOf())}function zh(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function $h(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Kh(){return this.isValid()?this.toISOString():null}function Xh(){return is(this)}function Jh(){return Lt({},z(this))}function Qh(){return z(this).overflow}function e1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",ys);C("NN",ys);C("NNN",ys);C("NNNN",f1);C("NNNNN",u1);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",_n);C("yy",_n);C("yyy",_n);C("yyyy",_n);C("yo",h1);ie(["y","yy","yyy","yyyy"],Ae);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ae]=n._locale.eraYearOrdinalParse(e,i):t[Ae]=parseInt(e,10)});function t1(e,t){var n,r,i,s=this._eras||St("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function r1(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function i1(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),y1.call(this,e,t,n,r,i))}function y1(e,t,n,r,i){var s=yl(e,t,n,r,i),a=Nn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Oe("quarter","Q");Re("quarter",7);C("Q",dl);ie("Q",function(e,t){t[gt]=($(e)-1)*3});function b1(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Oe("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var jl=pn("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Oe("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Pr);C("DDDD",fl);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function v1(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Oe("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var k1=pn("Minutes",!1);H("s",["ss",2],0,"second");Oe("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],xt);var S1=pn("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Oe("millisecond","ms");Re("millisecond",16);C("S",Pr,dl);C("SS",Pr,Be);C("SSS",Pr,fl);var Ct,Bl;for(Ct="SSSS";Ct.length<=9;Ct+="S")C(Ct,_n);function E1(e,t){t[zt]=$(("0."+e)*1e3)}for(Ct="S";Ct.length<=9;Ct+="S")ie(Ct,E1);Bl=pn("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function D1(){return this._isUTC?"UTC":""}function T1(){return this._isUTC?"Coordinated Universal Time":""}var M=Bn.prototype;M.add=xh;M.calendar=Dh;M.clone=Th;M.diff=Lh;M.endOf=Vh;M.format=Uh;M.from=Yh;M.fromNow=Wh;M.to=Hh;M.toNow=jh;M.get=Ou;M.invalidAt=Qh;M.isAfter=Ah;M.isBefore=Oh;M.isBetween=Rh;M.isSame=Mh;M.isSameOrAfter=Ih;M.isSameOrBefore=Fh;M.isValid=Xh;M.lang=Nl;M.locale=Cl;M.localeData=Pl;M.max=X0;M.min=K0;M.parsingFlags=Jh;M.set=Ru;M.startOf=Bh;M.subtract=yh;M.toArray=zh;M.toObject=$h;M.toDate=qh;M.toISOString=Nh;M.inspect=Ph;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=Kh;M.toString=Ch;M.unix=Zh;M.valueOf=Gh;M.creationData=e1;M.eraName=i1;M.eraNarrow=s1;M.eraAbbr=a1;M.eraYear=o1;M.year=xl;M.isLeapYear=$u;M.weekYear=m1;M.isoWeekYear=p1;M.quarter=M.quarters=b1;M.month=wl;M.daysInMonth=Zu;M.week=M.weeks=t0;M.isoWeek=M.isoWeeks=n0;M.weeksInYear=g1;M.weeksInWeekYear=x1;M.isoWeeksInYear=_1;M.isoWeeksInISOWeekYear=w1;M.date=jl;M.day=M.days=p0;M.weekday=_0;M.isoWeekday=w0;M.dayOfYear=v1;M.hour=M.hours=S0;M.minute=M.minutes=k1;M.second=M.seconds=S1;M.millisecond=M.milliseconds=Bl;M.utcOffset=ah;M.utc=lh;M.local=ch;M.parseZone=dh;M.hasAlignedHourOffset=fh;M.isDST=uh;M.isLocal=mh;M.isUtcOffset=ph;M.isUtc=Ml;M.isUTC=Ml;M.zoneAbbr=D1;M.zoneName=T1;M.dates=$e("dates accessor is deprecated. Use date instead.",jl);M.months=$e("months accessor is deprecated. Use month instead",wl);M.years=$e("years accessor is deprecated. Use year instead",xl);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",oh);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",hh);function A1(e){return oe(e*1e3)}function O1(){return oe.apply(null,arguments).parseZone()}function Vl(e){return e}var ne=as.prototype;ne.calendar=pu;ne.longDateFormat=xu;ne.invalidDate=bu;ne.ordinal=Su;ne.preparse=Vl;ne.postformat=Vl;ne.relativeTime=Du;ne.pastFuture=Tu;ne.set=hu;ne.eras=t1;ne.erasParse=n1;ne.erasConvertYear=r1;ne.erasAbbrRegex=c1;ne.erasNameRegex=l1;ne.erasNarrowRegex=d1;ne.months=ju;ne.monthsShort=Bu;ne.monthsParse=Gu;ne.monthsRegex=zu;ne.monthsShortRegex=qu;ne.week=Xu;ne.firstDayOfYear=e0;ne.firstDayOfWeek=Qu;ne.weekdays=d0;ne.weekdaysMin=u0;ne.weekdaysShort=f0;ne.weekdaysParse=m0;ne.weekdaysRegex=g0;ne.weekdaysShortRegex=x0;ne.weekdaysMinRegex=y0;ne.isPM=v0;ne.meridiem=E0;function Dr(e,t,n,r){var i=St(),s=ut().set(r,t);return i[n](s,e)}function Gl(e,t,n){if(kt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function vs(e,t,n,r){typeof e=="boolean"?(kt(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,kt(t)&&(n=t,t=void 0),t=t||"");var i=St(),s=e?i._week.dow:0,a,l=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)l[a]=Dr(t,(a+s)%7,r,"day");return l}function R1(e,t){return Gl(e,t,"months")}function M1(e,t){return Gl(e,t,"monthsShort")}function I1(e,t,n){return vs(e,t,n,"weekdays")}function F1(e,t,n){return vs(e,t,n,"weekdaysShort")}function L1(e,t,n){return vs(e,t,n,"weekdaysMin")}Pt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Pt);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",St);var _t=Math.abs;function C1(){var e=this._data;return this._milliseconds=_t(this._milliseconds),this._days=_t(this._days),this._months=_t(this._months),e.milliseconds=_t(e.milliseconds),e.seconds=_t(e.seconds),e.minutes=_t(e.minutes),e.hours=_t(e.hours),e.months=_t(e.months),e.years=_t(e.years),this}function Zl(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function N1(e,t){return Zl(this,e,t,1)}function P1(e,t){return Zl(this,e,t,-1)}function Ua(e){return e<0?Math.floor(e):Math.ceil(e)}function U1(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,l,o;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Ua(Yi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),o=Ze(ql(t)),n+=o,t-=Ua(Yi(o)),l=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=l,this}function ql(e){return e*4800/146097}function Yi(e){return e*146097/4800}function Y1(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+ql(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Yi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function W1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Et(e){return function(){return this.as(e)}}var H1=Et("ms"),j1=Et("s"),B1=Et("m"),V1=Et("h"),G1=Et("d"),Z1=Et("w"),q1=Et("M"),z1=Et("Q"),$1=Et("y");function K1(){return st(this)}function X1(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Xt(e){return function(){return this.isValid()?this._data[e]:NaN}}var J1=Xt("milliseconds"),Q1=Xt("seconds"),em=Xt("minutes"),tm=Xt("hours"),nm=Xt("days"),rm=Xt("months"),im=Xt("years");function sm(){return Ze(this.days()/7)}var wt=Math.round,ln={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function am(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function om(e,t,n,r){var i=st(e).abs(),s=wt(i.as("s")),a=wt(i.as("m")),l=wt(i.as("h")),o=wt(i.as("d")),f=wt(i.as("M")),d=wt(i.as("w")),u=wt(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,am.apply(null,p)}function lm(e){return e===void 0?wt:typeof e=="function"?(wt=e,!0):!1}function cm(e,t){return ln[e]===void 0?!1:t===void 0?ln[e]:(ln[e]=t,e==="s"&&(ln.ss=t-1),!0)}function dm(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ln,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ln,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=om(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var ui=Math.abs;function nn(e){return(e>0)-(e<0)||+e}function Gr(){if(!this.isValid())return this.localeData().invalidDate();var e=ui(this._milliseconds)/1e3,t=ui(this._days),n=ui(this._months),r,i,s,a,l=this.asSeconds(),o,f,d,u;return l?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",o=l<0?"-":"",f=nn(this._months)!==nn(l)?"-":"",d=nn(this._days)!==nn(l)?"-":"",u=nn(this._milliseconds)!==nn(l)?"-":"",o+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Br.prototype;X.isValid=nh;X.abs=C1;X.add=N1;X.subtract=P1;X.as=Y1;X.asMilliseconds=H1;X.asSeconds=j1;X.asMinutes=B1;X.asHours=V1;X.asDays=G1;X.asWeeks=Z1;X.asMonths=q1;X.asQuarters=z1;X.asYears=$1;X.valueOf=W1;X._bubble=U1;X.clone=K1;X.get=X1;X.milliseconds=J1;X.seconds=Q1;X.minutes=em;X.hours=tm;X.days=nm;X.weeks=sm;X.months=rm;X.years=im;X.humanize=dm;X.toISOString=Gr;X.toString=Gr;X.toJSON=Gr;X.locale=Cl;X.localeData=Pl;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gr);X.lang=Nl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Yr);C("X",Iu);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js -L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L.months=R1;L.isDate=jn;L.locale=Pt;L.invalid=Lr;L.duration=st;L.isMoment=it;L.weekdays=I1;L.parseZone=O1;L.localeData=St;L.isDuration=dr;L.monthsShort=M1;L.weekdaysMin=L1;L.defineLocale=ms;L.updateLocale=O0;L.locales=R0;L.weekdaysShort=F1;L.normalizeUnits=Ke;L.relativeTimeRounding=lm;L.relativeTimeThreshold=cm;L.calendarFormat=Eh;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Wi(e,t){const n=L(e,t,!0);if(n.isValid())return n.format("MM-DD-YYYY")}function fm(e){return Ir(e)!==e}class hi{constructor(){Bt(this,"nameWasCalledAsFile",[]);Bt(this,"pathMap",new Map);Bt(this,"nameMap",new Map)}accessAsFile(t,n,r,i){const s=Wi(t,i);s&&(t=s);const a=this.pathMap.get(n);if(a)return this.nameMap.get(t)||this.nameMap.set(t,a),a;const l=this.nameMap.get(t);if(l&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,l),this.nameWasCalledAsFile.push(t),l;const o=r(s);return this.pathMap.set(n,o),this.nameMap.get(t)||this.nameMap.set(t,o),this.nameWasCalledAsFile.push(t),o}accessAsLink(t,n,r){const i=Wi(t,r);i&&(t=i);const s=this.findData(t);if(s)return s;const a=fm(t),l=n(i);return a?this.pathMap.set(t,l):this.nameMap.set(t,l),l}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Zr(e){e.totalNodes++,e.leafNodes++}function zl(e){e.leafNodes--,e.topLevelNodes++}function um(e,t,n=cu,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new hi,headingTracker:new hi,dummyHeadingLinkTracker:new Map,blockLinkTracker:new hi,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function Wt(e){return Zr(e.summary),e.idGenerator()}function hm(e,t){const n=e[0],r=e[1];n==null&&console.log("Parsed undefined file name in block link.");const i=t.blockLinkTracker.accessAsLink(n,()=>new Map,t.dailyNoteFormat);let s=i.get(r);return s||(s={uid:Wt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function mm(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map,n.dailyNoteFormat);let a=s.get(i);return a||(a={uid:Wt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function pm(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function _m(e){let t;return[e.split(` +L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L.months=R1;L.isDate=jn;L.locale=Pt;L.invalid=Lr;L.duration=st;L.isMoment=it;L.weekdays=I1;L.parseZone=O1;L.localeData=St;L.isDuration=dr;L.monthsShort=M1;L.weekdaysMin=L1;L.defineLocale=ms;L.updateLocale=O0;L.locales=R0;L.weekdaysShort=F1;L.normalizeUnits=Ke;L.relativeTimeRounding=lm;L.relativeTimeThreshold=cm;L.calendarFormat=Eh;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Wi(e,t){const n=L(e,t,!0);if(n.isValid())return n.format("MM-DD-YYYY")}function fm(e){return Ir(e)!==e}class hi{constructor(){Bt(this,"nameWasCalledAsFile",[]);Bt(this,"pathMap",new Map);Bt(this,"nameMap",new Map)}accessAsFile(t,n,r,i){const s=Wi(t,i);s&&(t=s);const a=this.pathMap.get(n);if(a)return this.nameMap.get(t)||this.nameMap.set(t,a),a;const l=this.nameMap.get(t);if(l&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,l),this.nameWasCalledAsFile.push(t),l;const o=r(s);return this.pathMap.set(n,o),this.nameMap.get(t)||this.nameMap.set(t,o),this.nameWasCalledAsFile.push(t),o}accessAsLink(t,n,r){const i=Wi(t,r);i&&(t=i);const s=this.findData(t);if(s)return s;const a=fm(t),l=n(i);return a?this.pathMap.set(t,l):this.nameMap.set(t,l),l}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Zr(e){e.totalNodes++,e.leafNodes++}function zl(e){e.leafNodes--,e.topLevelNodes++}function um(e,t,n=cu,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new hi,headingTracker:new hi,dummyHeadingLinkTracker:new Map,blockLinkTracker:new hi,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function Wt(e){return Zr(e.summary),e.idGenerator()}function hm(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map,t.dailyNoteFormat);let s=i.get(r);return s||(s={uid:Wt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function mm(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map,n.dailyNoteFormat);let a=s.get(i);return a||(a={uid:Wt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function pm(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function _m(e){let t;return[e.split(` `).map(r=>{const i=r.split(" "),s=i[i.length-1];return s.startsWith("^")?(t=s,i.slice(0,-1).join(" ")):r}).join(` -`),t]}function $l(e,t,n,r,i,s){const a=[t],l=[e];for(const o of n){const f=i(o);wm(f,o,a,l,r),s==null||s(f,o)}}function wm(e,t,n,r,i){var l;gm(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(l=a.children)!=null?l:[],a.children.push(e)),n.push(t),r.push(e)}function gm(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function Kl(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=Kl(n.children,r);if(i)return i}}return null}function xm(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function ym(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const l=t.findData(s);if(l){const o={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};$l(f,o,l,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=Kl(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function bm(e,t){const[n,r]=ym(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Zr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let l=a;s.forEach(o=>{l=l.replace(o.old,o.new)}),await t.adapter.appendToPostProcessingFile(i,l)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var Xl=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(Xl||{});function vm(e,t){const n=km(e.name,t);if(n.length>0){const r=new Set;e.refs||(e.refs=[]);for(const[i,s,a]of n)r.add(s),e.name=e.name.replaceAll("[["+i+"]]",a);e.refs.push(...Array.from(r.values()))}}function km(e,t){return du(e,!0).map(n=>[n,n.split("|").map(r=>r.trim())]).filter(n=>n[1][0]!=="").map(n=>{const r=n[1],i=r[0],s=r[1],a=Dm(i,t),l=s!==void 0&&s.trim()!==""?"["+s.trim()+"]([["+a+"]])":"[["+a+"]]";return[n[0],a,l]})}function Sm(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function Em(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function Dm(e,t){const n=Sm(e);switch(Em(n)){case 0:return Tm(n[0],t);case 2:return hm(n,t);case 1:return xm(n,t);default:throw"Invalid link type detected: "+n}}function Tm(e,t){return e==null&&console.log("Parsed undefined link in standard link."),t.defaultLinkTracker.accessAsLink(e,r=>(Zr(t.summary),{uid:r!=null?r:t.idGenerator(),obsidianLink:e,type:1}),t.dailyNoteFormat).uid}function Jl(e,t,n,r){const[i,s]=_m(n);return s?[mm([e,s],t,r),i]:[Wt(r),n]}function Am(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,s=>(Zr(n.summary),{uid:s!=null?s:n.idGenerator(),obsidianLink:r,type:0}),n.dailyNoteFormat);return i.type=0,i.uid}function Om(e){const t=[];for(const n of e.getData())n.type===Xl.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function Rm(e){return[...e.invalidLinks,...Om(e.defaultLinkTracker),...pm(e.blockLinkTracker)]}function Mm(e,t,n){const r=Rm(n).sort((a,l)=>a.link.localeCompare(l.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:Wt(n),name:i,createdAt:t,editedAt:t,type:"node"};return zl(n.summary),s.children=r,s}function ks(e){return e===" "||e===" "}function Zn(e,t){let n=0;for(;ks(e[t+n]);)n++;return n}function Im(e,t){let n=t,r=e[t];for(;ks(r);)n--,r=e[n];return n+1}function Ut(e,t){let n=0;for(;!Ss(e[t+n]);)n++;return t+n}function Ql(e,t){const n=e[t-1];return Ss(n)}function Ss(e){return e===void 0||e===` +`),t]}function $l(e,t,n,r,i,s){const a=[t],l=[e];for(const o of n){const f=i(o);wm(f,o,a,l,r),s==null||s(f,o)}}function wm(e,t,n,r,i){var l;gm(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(l=a.children)!=null?l:[],a.children.push(e)),n.push(t),r.push(e)}function gm(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function Kl(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=Kl(n.children,r);if(i)return i}}return null}function xm(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function ym(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const l=t.findData(s);if(l){const o={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};$l(f,o,l,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=Kl(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function bm(e,t){const[n,r]=ym(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Zr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let l=a;s.forEach(o=>{l=l.replace(o.old,o.new)}),await t.adapter.appendToPostProcessingFile(i,l)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var Xl=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(Xl||{});function vm(e,t){const n=km(e.name,t);if(n.length>0){const r=new Set;e.refs||(e.refs=[]);for(const[i,s,a]of n)r.add(s),e.name=e.name.replaceAll("[["+i+"]]",a);e.refs.push(...Array.from(r.values()))}}function km(e,t){return du(e,!0).map(n=>[n,n.split("|").map(r=>r.trim())]).filter(n=>n[1][0]!=="").map(n=>{const r=n[1],i=r[0],s=r[1],a=Dm(i,t),l=s!==void 0&&s.trim()!==""?"["+s.trim()+"]([["+a+"]])":"[["+a+"]]";return[n[0],a,l]})}function Sm(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function Em(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function Dm(e,t){const n=Sm(e),r=Em(n);switch(n[0]===void 0&&console.log("Parsed undefined clean link. Original link: "+e,"Type of link: "+r),r){case 0:return Tm(n,t);case 2:return hm(n,t);case 1:return xm(n,t);default:throw"Invalid link type detected: "+n}}function Tm(e,t){const n=e[0];return t.defaultLinkTracker.accessAsLink(n,i=>(Zr(t.summary),{uid:i!=null?i:t.idGenerator(),obsidianLink:n,type:1}),t.dailyNoteFormat).uid}function Jl(e,t,n,r){const[i,s]=_m(n);return s?[mm([e,s],t,r),i]:[Wt(r),n]}function Am(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,s=>(Zr(n.summary),{uid:s!=null?s:n.idGenerator(),obsidianLink:r,type:0}),n.dailyNoteFormat);return i.type=0,i.uid}function Om(e){const t=[];for(const n of e.getData())n.type===Xl.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function Rm(e){return[...e.invalidLinks,...Om(e.defaultLinkTracker),...pm(e.blockLinkTracker)]}function Mm(e,t,n){const r=Rm(n).sort((a,l)=>a.link.localeCompare(l.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:Wt(n),name:i,createdAt:t,editedAt:t,type:"node"};return zl(n.summary),s.children=r,s}function ks(e){return e===" "||e===" "}function Zn(e,t){let n=0;for(;ks(e[t+n]);)n++;return n}function Im(e,t){let n=t,r=e[t];for(;ks(r);)n--,r=e[n];return n+1}function Ut(e,t){let n=0;for(;!Ss(e[t+n]);)n++;return t+n}function Ql(e,t){const n=e[t-1];return Ss(n)}function Ss(e){return e===void 0||e===` `}function ec(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function Es(e,t){let n=!0;const r=t+Zn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ec(e,r));const a=Im(e,r-1)-1,l=e[a];return Ss(l)&&n?{type:ft.BULLET,level:r-a-1}:null}function Fm(e,t,n){let r=t+n.level;if(ec(e,r))return r;r+=1+1;const i=Zn(e,r);return r+i}function Lm(e,t,n){let r=Ut(e,t+n.level+1+1),i=e[r];for(;;){const s=Zn(e,r+1);if(s>0&&(s==n.level+2||s==n.level)&&!Es(e,r+1+s))r=Ut(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Cm(e,t){return e+t.level}function Nm(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=Zn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function tc(e,t){if(!Ql(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=Ut(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],l=e[i+2];for(;[s,a,l].every(d=>d!==void 0)&&[s,a,l].join("")!=="```";)i++,s=e[i],a=e[i+1],l=e[i+2];if([s,a,l].some(d=>d===void 0))return null;const o=Ut(e,i+3);return e.slice(i+3,o).trim()!==""?null:{type:ft.CODEBLOCK,level:o-t+(e[o]===` `?1:0),codeLanguage:r!==""?r:void 0}}return null}function Pm(e,t){return Ut(e,t)}function nc(e,t){const n=Ut(e,t),r=e.slice(t,n);return rc(r)?{type:ft.DATAVIEWATTRIBUTE,level:0}:null}function rc(e){const t=e.split("::");return t.length===2&&t[0].trim()===t[0]&&t[0]!==""&&t[1]!==""&&t[1]!==" "&&ks(t[1][0])}function ic(e,t){if(!Ql(e,t))return null;const n=Um(e,t);return n>0&&e[t+n]===" "?{type:ft.HEADING,level:n}:null}function Um(e,t){let n=t,r=0;for(;e[n]==="#";)n++,r++;return r}function Ym(e,t,n){const r=t+n.level+1,i=Zn(e,r);return r+i}function Wm(e,t,n){return Ut(e,t+n.level+1)}function Hm(e,t){let n=Ut(e,t),r=e[n],i=r;for(n++,r=e[n];;){if(r===void 0)return[n];if(r===` `&&i===` @@ -46,4 +46,4 @@ L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L Please check the text at the top again.`,document.body.appendChild(l)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack and tag me): `+i,document.body.appendChild(a)}}); -//# sourceMappingURL=index.1c309ba1.js.map +//# sourceMappingURL=index.7c88b9a4.js.map diff --git a/docs/assets/index.1c309ba1.js.map b/docs/assets/index.7c88b9a4.js.map similarity index 63% rename from docs/assets/index.1c309ba1.js.map rename to docs/assets/index.7c88b9a4.js.map index 250860c..6fe465d 100644 --- a/docs/assets/index.1c309ba1.js.map +++ b/docs/assets/index.7c88b9a4.js.map @@ -1 +1 @@ -{"version":3,"file":"index.1c309ba1.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n if (fileName == undefined) {\n console.log('Parsed undefined file name in block link.');\n }\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid if they are used\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink[0], context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(obsidianLink: string, context: VaultContext) {\n if (obsidianLink == undefined) {\n console.log('Parsed undefined link in standard link.');\n }\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n\n //but also if they are just equal to the hierachy-level:\n //e.g.\n //- Text1\n // - Text2\n // Text3\n //Text4\n //\"Text3\" is still part of Text2 because Obsidian allows that!\n //but not \"Text4\" because its on the zero level\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (\n emptySpaces > 0 &&\n (emptySpaces == hierarchy.level + 2 || emptySpaces == hierarchy.level) &&\n !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)\n ) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\nconst nonDigit = new RegExp('\\\\D');\n\n// https://help.obsidian.md/How+to/Working+with+tags\n// only - _ and / are allowed\n// this is a brute force approach, because its not trivial to detect invalid tags in other languages\n// (can not use \\w for example because e.g. korean characters are excluded)\nconst disallowedSymbols = new Set([\n '#',\n '!',\n '{',\n '}',\n '(',\n ')',\n '?',\n '$',\n '%',\n '&',\n '\"',\n \"'\",\n '<',\n '>',\n '\\\\',\n '*',\n '`',\n '[',\n ']',\n ':',\n ',',\n ';',\n '~',\n '=',\n '§',\n '.',\n '°',\n '^',\n]);\n\nexport function validTag(tag: string) {\n //currently whitespace is also detected as part of the tag\n tag = tag.trim();\n let char = tag[0];\n //sanity check\n if (char !== '#') {\n return false;\n }\n\n let foundNonDigit = false;\n\n for (let index = 1; index < tag.length; index++) {\n char = tag[index];\n if (char.match(nonDigit)) {\n foundNonDigit = true;\n }\n\n if (disallowedSymbols.has(char)) {\n return false;\n }\n }\n\n return foundNonDigit;\n}\n\nexport function detectTags(content: string) {\n return content.match(tagRegex)?.filter((tag) => validTag(tag));\n}\n\nexport function removeTagsFromEnd(content: string, tags: string[]) {\n let curContent = content;\n let globalRemovedTag = false;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let removedTag = false;\n for (const tag of tags) {\n if (curContent.endsWith(tag)) {\n curContent = curContent.slice(0, -tag.length);\n removedTag = true;\n globalRemovedTag = true;\n }\n }\n\n if (!removedTag) {\n break;\n }\n }\n\n //removing empty space at the end, because the tag detection only detects leading empty space\n if (globalRemovedTag) {\n curContent = curContent.trimEnd();\n }\n\n return curContent;\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags, removeTagsFromEnd } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tags without losing meaning because they will show up as super tags anyways\n tanaNode.name = removeTagsFromEnd(tanaNode.name, tags);\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack and tag me):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","nonDigit","disallowedSymbols","validTag","tag","foundNonDigit","detectTags","removeTagsFromEnd","tags","curContent","globalRemovedTag","removedTag","cleanUpTag","superTagUidRequests","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EA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AQ,MAAMA,CAAK,EAEf80C,GACO,SAAA,KAAK,YAAYA,CAAQ,EAI9B,MAAAO,EAAoBr1C,EAAc,MAAM,SAAS,EAEvD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAs1C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAgEH,EAChF,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file +{"version":3,"file":"index.7c88b9a4.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid if they are used\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n if (cleanLink[0] === undefined) {\n console.log('Parsed undefined clean link. Original link: ' + obsidianLink, 'Type of link: ' + linkType);\n }\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink, context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(link: string[], context: VaultContext) {\n const obsidianLink = link[0];\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n\n //but also if they are just equal to the hierachy-level:\n //e.g.\n //- Text1\n // - Text2\n // Text3\n //Text4\n //\"Text3\" is still part of Text2 because Obsidian allows that!\n //but not \"Text4\" because its on the zero level\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (\n emptySpaces > 0 &&\n (emptySpaces == hierarchy.level + 2 || emptySpaces == hierarchy.level) &&\n !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)\n ) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\nconst nonDigit = new RegExp('\\\\D');\n\n// https://help.obsidian.md/How+to/Working+with+tags\n// only - _ and / are allowed\n// this is a brute force approach, because its not trivial to detect invalid tags in other languages\n// (can not use \\w for example because e.g. korean characters are excluded)\nconst disallowedSymbols = new Set([\n '#',\n '!',\n '{',\n '}',\n '(',\n ')',\n '?',\n '$',\n '%',\n '&',\n '\"',\n \"'\",\n '<',\n '>',\n '\\\\',\n '*',\n '`',\n '[',\n ']',\n ':',\n ',',\n ';',\n '~',\n '=',\n '§',\n '.',\n '°',\n '^',\n]);\n\nexport function validTag(tag: string) {\n //currently whitespace is also detected as part of the tag\n tag = tag.trim();\n let char = tag[0];\n //sanity check\n if (char !== '#') {\n return false;\n }\n\n let foundNonDigit = false;\n\n for (let index = 1; index < tag.length; index++) {\n char = tag[index];\n if (char.match(nonDigit)) {\n foundNonDigit = true;\n }\n\n if (disallowedSymbols.has(char)) {\n return false;\n }\n }\n\n return foundNonDigit;\n}\n\nexport function detectTags(content: string) {\n return content.match(tagRegex)?.filter((tag) => validTag(tag));\n}\n\nexport function removeTagsFromEnd(content: string, tags: string[]) {\n let curContent = content;\n let globalRemovedTag = false;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let removedTag = false;\n for (const tag of tags) {\n if (curContent.endsWith(tag)) {\n curContent = curContent.slice(0, -tag.length);\n removedTag = true;\n globalRemovedTag = true;\n }\n }\n\n if (!removedTag) {\n break;\n }\n }\n\n //removing empty space at the end, because the tag detection only detects leading empty space\n if (globalRemovedTag) {\n curContent = curContent.trimEnd();\n }\n\n return curContent;\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags, removeTagsFromEnd } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tags without losing meaning because they will show up as super tags anyways\n tanaNode.name = removeTagsFromEnd(tanaNode.name, tags);\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack and tag me):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","linkType","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","nonDigit","disallowedSymbols","validTag","tag","foundNonDigit","detectTags","removeTagsFromEnd","tags","curContent","globalRemovedTag","removedTag","cleanUpTag","superTagUidRequests","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAA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CAAC,EAC3BA,EAAE,MAAM,EACR,IAAI,gBAAgB2nB,CAAG,CAAA,CACxB,EACQ,SAAA,KAAK,YAAYmyC,CAAc,QACjCr1C,GACP,QAAQ,MAAMA,CAAK,EAEf+0C,GACO,SAAA,KAAK,YAAYA,CAAQ,EAI9B,MAAAO,EAAoBt1C,EAAc,MAAM,SAAS,EAEvD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAu1C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAgEH,EAChF,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 7e2d32e..87ba627 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Inofficial Obsidian-2-Tana Converter - +

Inofficial Obsidian-2-Tana Converter

diff --git a/src/converters/obsidian/links/blockLinks.ts b/src/converters/obsidian/links/blockLinks.ts index 647fe54..d10d8a4 100644 --- a/src/converters/obsidian/links/blockLinks.ts +++ b/src/converters/obsidian/links/blockLinks.ts @@ -18,9 +18,6 @@ export interface BlockUidData { export function blockLinkUidRequestForUsing(link: string[], context: VaultContext) { const fileName = link[0]; const blockObsidianUid = link[1]; - if (fileName == undefined) { - console.log('Parsed undefined file name in block link.'); - } const blockUidMap = context.blockLinkTracker.accessAsLink( fileName, () => { diff --git a/src/converters/obsidian/links/internalLinks.ts b/src/converters/obsidian/links/internalLinks.ts index 22fabea..f4d9f6b 100644 --- a/src/converters/obsidian/links/internalLinks.ts +++ b/src/converters/obsidian/links/internalLinks.ts @@ -82,9 +82,12 @@ export function detectLinkType(link: string[]) { export function requestUidForLink(obsidianLink: string, context: VaultContext) { const cleanLink = cleanUpLink(obsidianLink); const linkType = detectLinkType(cleanLink); + if (cleanLink[0] === undefined) { + console.log('Parsed undefined clean link. Original link: ' + obsidianLink, 'Type of link: ' + linkType); + } switch (linkType) { case LinkType.DEFAULT: - return standardLinkUidRequest(cleanLink[0], context); + return standardLinkUidRequest(cleanLink, context); case LinkType.BLOCK: return blockLinkUidRequestForUsing(cleanLink, context); case LinkType.HEADING: @@ -94,10 +97,8 @@ export function requestUidForLink(obsidianLink: string, context: VaultContext) { } } -function standardLinkUidRequest(obsidianLink: string, context: VaultContext) { - if (obsidianLink == undefined) { - console.log('Parsed undefined link in standard link.'); - } +function standardLinkUidRequest(link: string[], context: VaultContext) { + const obsidianLink = link[0]; const uidData = context.defaultLinkTracker.accessAsLink( obsidianLink, (dateUID) => { From d6863433e83c902cc6d57d04c638cd4dffbb36ad Mon Sep 17 00:00:00 2001 From: Lucca Hellriegel Date: Sun, 4 Dec 2022 16:53:35 +0100 Subject: [PATCH 94/94] Obsidian: filter out more invalid links --- .../{index.7c88b9a4.js => index.b5f269bd.js} | 4 ++-- ....7c88b9a4.js.map => index.b5f269bd.js.map} | 2 +- docs/index.html | 2 +- .../obsidian/links/internalLinks.ts | 4 ++-- .../obsidian/tests/fixtures/full.tif.json | 2 +- .../obsidian/tests/fixtures/vault.zip | Bin 3245 -> 3262 bytes .../obsidian/tests/fixtures/vault/01.md | 3 ++- 7 files changed, 9 insertions(+), 8 deletions(-) rename docs/assets/{index.7c88b9a4.js => index.b5f269bd.js} (99%) rename docs/assets/{index.7c88b9a4.js.map => index.b5f269bd.js.map} (63%) diff --git a/docs/assets/index.7c88b9a4.js b/docs/assets/index.b5f269bd.js similarity index 99% rename from docs/assets/index.7c88b9a4.js rename to docs/assets/index.b5f269bd.js index 1f67782..02e3c3c 100644 --- a/docs/assets/index.7c88b9a4.js +++ b/docs/assets/index.b5f269bd.js @@ -10,7 +10,7 @@ Arguments: `+Array.prototype.slice.call(r).join("")+` `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Ca={};function al(e,t){L.deprecationHandler!=null&&L.deprecationHandler(e,t),Ca[e]||(sl(t),Ca[e]=!0)}L.suppressDeprecationWarnings=!1;L.deprecationHandler=null;function ht(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function hu(e){var t,n;for(n in e)te(e,n)&&(t=e[n],ht(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Li(e,t){var n=Lt({},e),r;for(r in t)te(t,r)&&($t(e[r])&&$t(t[r])?(n[r]={},Lt(n[r],e[r]),Lt(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)te(e,r)&&!te(t,r)&&$t(e[r])&&(n[r]=Lt({},n[r]));return n}function as(e){e!=null&&this.set(e)}var Ci;Object.keys?Ci=Object.keys:Ci=function(e){var t,n=[];for(t in e)te(e,t)&&n.push(t);return n};var mu={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function pu(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return ht(r)?r.call(t,n):r}function dt(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var os=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,di={},fn={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(fn[e]=i),t&&(fn[t[0]]=function(){return dt(i.apply(this,arguments),t[1],t[2])}),n&&(fn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function _u(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function wu(e){var t=e.match(os),n,r;for(n=0,r=t.length;n=0&&rr.test(e);)e=e.replace(rr,r),rr.lastIndex=0,n-=1;return e}var gu={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function xu(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(os).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var yu="Invalid date";function bu(){return this._invalidDate}var vu="%d",ku=/\d{1,2}/;function Su(e){return this._ordinal.replace("%d",e)}var Eu={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Du(e,t,n,r){var i=this._relativeTime[n];return ht(i)?i(e,t,n,r):i.replace(/%d/i,e)}function Tu(e,t){var n=this._relativeTime[e>0?"future":"past"];return ht(n)?n(t):n.replace(/%s/i,t)}var Rn={};function Oe(e,t){var n=e.toLowerCase();Rn[n]=Rn[n+"s"]=Rn[t]=e}function Ke(e){return typeof e=="string"?Rn[e]||Rn[e.toLowerCase()]:void 0}function ls(e){var t={},n,r;for(r in e)te(e,r)&&(n=Ke(r),n&&(t[n]=e[r]));return t}var ll={};function Re(e,t){ll[e]=t}function Au(e){var t=[],n;for(n in e)te(e,n)&&t.push({unit:n,priority:ll[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Cr(e){return e%4===0&&e%100!==0||e%400===0}function Ze(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function $(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Ze(t)),n}function pn(e,t){return function(n){return n!=null?(cl(this,e,n),L.updateOffset(this,t),this):br(this,e)}}function br(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function cl(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Cr(e.year())&&e.month()===1&&e.date()===29?(n=$(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Hr(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ou(e){return e=Ke(e),ht(this[e])?this[e]():this}function Ru(e,t){if(typeof e=="object"){e=ls(e);var n=Au(e),r,i=n.length;for(r=0;r68?1900:2e3)};var xl=pn("FullYear",!0);function $u(){return Cr(this.year())}function Ku(e,t,n,r,i,s,a){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,i,s,a),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,i,s,a),l}function Nn(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function kr(e,t,n){var r=7+t-n,i=(7+Nn(e,0,r).getUTCDay()-t)%7;return-i+r-1}function yl(e,t,n,r,i){var s=(7+n-r)%7,a=kr(e,r,i),l=1+7*(t-1)+s+a,o,f;return l<=0?(o=e-1,f=Mn(o)+l):l>Mn(e)?(o=e+1,f=l-Mn(e)):(o=e,f=l),{year:o,dayOfYear:f}}function Pn(e,t,n){var r=kr(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,a;return i<1?(a=e.year()-1,s=i+vt(a,t,n)):i>vt(e.year(),t,n)?(s=i-vt(e.year(),t,n),a=e.year()+1):(a=e.year(),s=i),{week:s,year:a}}function vt(e,t,n){var r=kr(e,t,n),i=kr(e+1,t,n);return(Mn(e)-r+i)/7}H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");Oe("week","w");Oe("isoWeek","W");Re("week",5);Re("isoWeek",5);C("w",le);C("ww",le,Be);C("W",le);C("WW",le,Be);Gn(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=$(e)});function Xu(e){return Pn(e,this._week.dow,this._week.doy).week}var Ju={dow:0,doy:6};function Qu(){return this._week.dow}function e0(){return this._week.doy}function t0(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function n0(e){var t=Pn(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day");H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");Oe("day","d");Oe("weekday","e");Oe("isoWeekday","E");Re("day",11);Re("weekday",11);Re("isoWeekday",11);C("d",le);C("e",le);C("E",le);C("dd",function(e,t){return t.weekdaysMinRegex(e)});C("ddd",function(e,t){return t.weekdaysShortRegex(e)});C("dddd",function(e,t){return t.weekdaysRegex(e)});Gn(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:z(n).invalidWeekday=e});Gn(["d","e","E"],function(e,t,n,r){t[r]=$(e)});function r0(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function i0(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function fs(e,t){return e.slice(t,7).concat(e.slice(0,t))}var s0="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),a0="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),o0=Vn,l0=Vn,c0=Vn;function d0(e,t){var n=rt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?fs(n,this._week.dow):e?n[e.day()]:n}function f0(e){return e===!0?fs(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function u0(e){return e===!0?fs(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function h0(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ut([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=me.call(this._weekdaysParse,a),i!==-1||(i=me.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=me.call(this._shortWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=me.call(this._minWeekdaysParse,a),i!==-1||(i=me.call(this._weekdaysParse,a),i!==-1)?i:(i=me.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function m0(e,t,n){var r,i,s;if(this._weekdaysParseExact)return h0.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ut([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function p0(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=r0(e,this.localeData()),this.add(e-t,"d")):t}function _0(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function w0(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=i0(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function g0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(te(this,"_weekdaysRegex")||(this._weekdaysRegex=o0),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function x0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=l0),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function y0(e){return this._weekdaysParseExact?(te(this,"_weekdaysRegex")||us.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=c0),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function us(){function e(d,u){return u.length-d.length}var t=[],n=[],r=[],i=[],s,a,l,o,f;for(s=0;s<7;s++)a=ut([2e3,1]).day(s),l=je(this.weekdaysMin(a,"")),o=je(this.weekdaysShort(a,"")),f=je(this.weekdays(a,"")),t.push(l),n.push(o),r.push(f),i.push(l),i.push(o),i.push(f);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function hs(){return this.hours()%12||12}function b0(){return this.hours()||24}H("H",["HH",2],0,"hour");H("h",["hh",2],0,hs);H("k",["kk",2],0,b0);H("hmm",0,0,function(){return""+hs.apply(this)+dt(this.minutes(),2)});H("hmmss",0,0,function(){return""+hs.apply(this)+dt(this.minutes(),2)+dt(this.seconds(),2)});H("Hmm",0,0,function(){return""+this.hours()+dt(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+dt(this.minutes(),2)+dt(this.seconds(),2)});function vl(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}vl("a",!0);vl("A",!1);Oe("hour","h");Re("hour",13);function kl(e,t){return t._meridiemParse}C("a",kl);C("A",kl);C("H",le);C("h",le);C("k",le);C("HH",le,Be);C("hh",le,Be);C("kk",le,Be);C("hmm",ul);C("hmmss",hl);C("Hmm",ul);C("Hmmss",hl);ie(["H","HH"],ye);ie(["k","kk"],function(e,t,n){var r=$(e);t[ye]=r===24?0:r});ie(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ie(["h","hh"],function(e,t,n){t[ye]=$(e),z(n).bigHour=!0});ie("hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r)),z(n).bigHour=!0});ie("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i)),z(n).bigHour=!0});ie("Hmm",function(e,t,n){var r=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r))});ie("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ye]=$(e.substr(0,r)),t[nt]=$(e.substr(r,2)),t[xt]=$(e.substr(i))});function v0(e){return(e+"").toLowerCase().charAt(0)==="p"}var k0=/[ap]\.?m?\.?/i,S0=pn("Hours",!0);function E0(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Sl={calendar:mu,longDateFormat:gu,invalidDate:yu,ordinal:vu,dayOfMonthOrdinalParse:ku,relativeTime:Eu,months:Yu,monthsShort:ml,week:Ju,weekdays:s0,weekdaysMin:a0,weekdaysShort:bl,meridiemParse:k0},de={},Dn={},Un;function D0(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=jr(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&D0(s,r)>=n-1)break;n--}t++}return Un}function A0(e){return e.match("^[^/\\\\]*$")!=null}function jr(e){var t=null,n;if(de[e]===void 0&&typeof module<"u"&&module&&module.exports&&A0(e))try{t=Un._abbr,n=require,n("./locale/"+e),Pt(t)}catch{de[e]=null}return de[e]}function Pt(e,t){var n;return e&&(Ce(t)?n=St(e):n=ms(e,t),n?Un=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Un._abbr}function ms(e,t){if(t!==null){var n,r=Sl;if(t.abbr=e,de[e]!=null)al("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=de[e]._config;else if(t.parentLocale!=null)if(de[t.parentLocale]!=null)r=de[t.parentLocale]._config;else if(n=jr(t.parentLocale),n!=null)r=n._config;else return Dn[t.parentLocale]||(Dn[t.parentLocale]=[]),Dn[t.parentLocale].push({name:e,config:t}),null;return de[e]=new as(Li(r,t)),Dn[e]&&Dn[e].forEach(function(i){ms(i.name,i.config)}),Pt(e),de[e]}else return delete de[e],null}function O0(e,t){if(t!=null){var n,r,i=Sl;de[e]!=null&&de[e].parentLocale!=null?de[e].set(Li(de[e]._config,t)):(r=jr(e),r!=null&&(i=r._config),t=Li(i,t),r==null&&(t.abbr=e),n=new as(t),n.parentLocale=de[e],de[e]=n),Pt(e)}else de[e]!=null&&(de[e].parentLocale!=null?(de[e]=de[e].parentLocale,e===Pt()&&Pt(e)):de[e]!=null&&delete de[e]);return de[e]}function St(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Un;if(!rt(e)){if(t=jr(e),t)return t;e=[e]}return T0(e)}function R0(){return Ci(de)}function ps(e){var t,n=e._a;return n&&z(e).overflow===-2&&(t=n[gt]<0||n[gt]>11?gt:n[ot]<1||n[ot]>Hr(n[Ae],n[gt])?ot:n[ye]<0||n[ye]>24||n[ye]===24&&(n[nt]!==0||n[xt]!==0||n[zt]!==0)?ye:n[nt]<0||n[nt]>59?nt:n[xt]<0||n[xt]>59?xt:n[zt]<0||n[zt]>999?zt:-1,z(e)._overflowDayOfYear&&(tot)&&(t=ot),z(e)._overflowWeeks&&t===-1&&(t=Nu),z(e)._overflowWeekday&&t===-1&&(t=Pu),z(e).overflow=t),e}var M0=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,I0=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,F0=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],fi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],L0=/^\/?Date\((-?\d+)/i,C0=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,N0={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function El(e){var t,n,r=e._i,i=M0.exec(r)||I0.exec(r),s,a,l,o,f=ir.length,d=fi.length;if(i){for(z(e).iso=!0,t=0,n=f;tMn(a)||e._dayOfYear===0)&&(z(e)._overflowDayOfYear=!0),n=Nn(a,0,e._dayOfYear),e._a[gt]=n.getUTCMonth(),e._a[ot]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ye]===24&&e._a[nt]===0&&e._a[xt]===0&&e._a[zt]===0&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?Nn:Ku).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(z(e).weekdayMismatch=!0)}}function V0(e){var t,n,r,i,s,a,l,o,f;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,a=4,n=sn(t.GG,e._a[Ae],Pn(oe(),1,4).year),r=sn(t.W,1),i=sn(t.E,1),(i<1||i>7)&&(o=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,f=Pn(oe(),s,a),n=sn(t.gg,e._a[Ae],f.year),r=sn(t.w,f.week),t.d!=null?(i=t.d,(i<0||i>6)&&(o=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(o=!0)):i=s),r<1||r>vt(n,s,a)?z(e)._overflowWeeks=!0:o!=null?z(e)._overflowWeekday=!0:(l=yl(n,r,i,s,a),e._a[Ae]=l.year,e._dayOfYear=l.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function ws(e){if(e._f===L.ISO_8601){El(e);return}if(e._f===L.RFC_2822){Dl(e);return}e._a=[],z(e).empty=!0;var t=""+e._i,n,r,i,s,a,l=t.length,o=0,f,d;for(i=ol(e._f,e._locale).match(os)||[],d=i.length,n=0;n0&&z(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),o+=r.length),fn[s]?(r?z(e).empty=!1:z(e).unusedTokens.push(s),Cu(s,r,e)):e._strict&&!r&&z(e).unusedTokens.push(s);z(e).charsLeftOver=l-o,t.length>0&&z(e).unusedInput.push(t),e._a[ye]<=12&&z(e).bigHour===!0&&e._a[ye]>0&&(z(e).bigHour=void 0),z(e).parsedDateParts=e._a.slice(0),z(e).meridiem=e._meridiem,e._a[ye]=G0(e._locale,e._a[ye],e._meridiem),f=z(e).era,f!==null&&(e._a[Ae]=e._locale.erasConvertYear(f,e._a[Ae])),_s(e),ps(e)}function G0(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Z0(e){var t,n,r,i,s,a,l=!1,o=e._f.length;if(o===0){z(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:Lr()});function Ol(e,t){var n,r;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return oe();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function hh(){if(!Ce(this._isDSTShifted))return this._isDSTShifted;var e={},t;return ss(e,this),e=Tl(e),e._a?(t=e._isUTC?ut(e._a):oe(e._a),this._isDSTShifted=this.isValid()&&ih(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function mh(){return this.isValid()?!this._isUTC:!1}function ph(){return this.isValid()?this._isUTC:!1}function Ml(){return this.isValid()?this._isUTC&&this._offset===0:!1}var _h=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,wh=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function st(e,t){var n=e,r=null,i,s,a;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:kt(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=_h.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:$(r[ot])*i,h:$(r[ye])*i,m:$(r[nt])*i,s:$(r[xt])*i,ms:$(Pi(r[zt]*1e3))*i}):(r=wh.exec(e))?(i=r[1]==="-"?-1:1,n={y:Zt(r[2],i),M:Zt(r[3],i),w:Zt(r[4],i),d:Zt(r[5],i),h:Zt(r[6],i),m:Zt(r[7],i),s:Zt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=gh(oe(n.from),oe(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new Br(n),dr(e)&&te(e,"_locale")&&(s._locale=e._locale),dr(e)&&te(e,"_isValid")&&(s._isValid=e._isValid),s}st.fn=Br.prototype;st.invalid=rh;function Zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Pa(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function gh(e,t){var n;return e.isValid()&&t.isValid()?(t=xs(t,e),e.isBefore(t)?n=Pa(e,t):(n=Pa(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Il(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(al(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=st(n,r),Fl(this,i,e),this}}function Fl(e,t,n,r){var i=t._milliseconds,s=Pi(t._days),a=Pi(t._months);!e.isValid()||(r=r==null?!0:r,a&&_l(e,br(e,"Month")+a*n),s&&cl(e,"Date",br(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&L.updateOffset(e,s||a))}var xh=Il(1,"add"),yh=Il(-1,"subtract");function Ll(e){return typeof e=="string"||e instanceof String}function bh(e){return it(e)||jn(e)||Ll(e)||kt(e)||kh(e)||vh(e)||e===null||e===void 0}function vh(e){var t=$t(e)&&!rs(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,a=r.length;for(i=0;in.valueOf():n.valueOf()9999?cr(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ht(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cr(n,"Z")):cr(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ph(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function Uh(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=cr(this,e);return this.localeData().postformat(t)}function Yh(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Wh(e){return this.from(oe(),e)}function Hh(e,t){return this.isValid()&&(it(e)&&e.isValid()||oe(e).isValid())?st({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function jh(e){return this.to(oe(),e)}function Cl(e){var t;return e===void 0?this._locale._abbr:(t=St(e),t!=null&&(this._locale=t),this)}var Nl=$e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Pl(){return this._locale}var Sr=1e3,un=60*Sr,Er=60*un,Ul=(365*400+97)*24*Er;function hn(e,t){return(e%t+t)%t}function Yl(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Ul:new Date(e,t,n).valueOf()}function Wl(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Ul:Date.UTC(e,t,n)}function Bh(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Wl:Yl,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hn(t+(this._isUTC?0:this.utcOffset()*un),Er);break;case"minute":t=this._d.valueOf(),t-=hn(t,un);break;case"second":t=this._d.valueOf(),t-=hn(t,Sr);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function Vh(e){var t,n;if(e=Ke(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Wl:Yl,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Er-hn(t+(this._isUTC?0:this.utcOffset()*un),Er)-1;break;case"minute":t=this._d.valueOf(),t+=un-hn(t,un)-1;break;case"second":t=this._d.valueOf(),t+=Sr-hn(t,Sr)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function Gh(){return this._d.valueOf()-(this._offset||0)*6e4}function Zh(){return Math.floor(this.valueOf()/1e3)}function qh(){return new Date(this.valueOf())}function zh(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function $h(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Kh(){return this.isValid()?this.toISOString():null}function Xh(){return is(this)}function Jh(){return Lt({},z(this))}function Qh(){return z(this).overflow}function e1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr");H("NN",0,0,"eraAbbr");H("NNN",0,0,"eraAbbr");H("NNNN",0,0,"eraName");H("NNNNN",0,0,"eraNarrow");H("y",["y",1],"yo","eraYear");H("y",["yy",2],0,"eraYear");H("y",["yyy",3],0,"eraYear");H("y",["yyyy",4],0,"eraYear");C("N",ys);C("NN",ys);C("NNN",ys);C("NNNN",f1);C("NNNNN",u1);ie(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?z(n).era=i:z(n).invalidEra=e});C("y",_n);C("yy",_n);C("yyy",_n);C("yyyy",_n);C("yo",h1);ie(["y","yy","yyy","yyyy"],Ae);ie(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ae]=n._locale.eraYearOrdinalParse(e,i):t[Ae]=parseInt(e,10)});function t1(e,t){var n,r,i,s=this._eras||St("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function r1(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function i1(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),y1.call(this,e,t,n,r,i))}function y1(e,t,n,r,i){var s=yl(e,t,n,r,i),a=Nn(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("Q",0,"Qo","quarter");Oe("quarter","Q");Re("quarter",7);C("Q",dl);ie("Q",function(e,t){t[gt]=($(e)-1)*3});function b1(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date");Oe("date","D");Re("date",9);C("D",le);C("DD",le,Be);C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ie(["D","DD"],ot);ie("Do",function(e,t){t[ot]=$(e.match(le)[0])});var jl=pn("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");Oe("dayOfYear","DDD");Re("dayOfYear",4);C("DDD",Pr);C("DDDD",fl);ie(["DDD","DDDD"],function(e,t,n){n._dayOfYear=$(e)});function v1(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute");Oe("minute","m");Re("minute",14);C("m",le);C("mm",le,Be);ie(["m","mm"],nt);var k1=pn("Minutes",!1);H("s",["ss",2],0,"second");Oe("second","s");Re("second",15);C("s",le);C("ss",le,Be);ie(["s","ss"],xt);var S1=pn("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return this.millisecond()*10});H(0,["SSSSS",5],0,function(){return this.millisecond()*100});H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Oe("millisecond","ms");Re("millisecond",16);C("S",Pr,dl);C("SS",Pr,Be);C("SSS",Pr,fl);var Ct,Bl;for(Ct="SSSS";Ct.length<=9;Ct+="S")C(Ct,_n);function E1(e,t){t[zt]=$(("0."+e)*1e3)}for(Ct="S";Ct.length<=9;Ct+="S")ie(Ct,E1);Bl=pn("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");function D1(){return this._isUTC?"UTC":""}function T1(){return this._isUTC?"Coordinated Universal Time":""}var M=Bn.prototype;M.add=xh;M.calendar=Dh;M.clone=Th;M.diff=Lh;M.endOf=Vh;M.format=Uh;M.from=Yh;M.fromNow=Wh;M.to=Hh;M.toNow=jh;M.get=Ou;M.invalidAt=Qh;M.isAfter=Ah;M.isBefore=Oh;M.isBetween=Rh;M.isSame=Mh;M.isSameOrAfter=Ih;M.isSameOrBefore=Fh;M.isValid=Xh;M.lang=Nl;M.locale=Cl;M.localeData=Pl;M.max=X0;M.min=K0;M.parsingFlags=Jh;M.set=Ru;M.startOf=Bh;M.subtract=yh;M.toArray=zh;M.toObject=$h;M.toDate=qh;M.toISOString=Nh;M.inspect=Ph;typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});M.toJSON=Kh;M.toString=Ch;M.unix=Zh;M.valueOf=Gh;M.creationData=e1;M.eraName=i1;M.eraNarrow=s1;M.eraAbbr=a1;M.eraYear=o1;M.year=xl;M.isLeapYear=$u;M.weekYear=m1;M.isoWeekYear=p1;M.quarter=M.quarters=b1;M.month=wl;M.daysInMonth=Zu;M.week=M.weeks=t0;M.isoWeek=M.isoWeeks=n0;M.weeksInYear=g1;M.weeksInWeekYear=x1;M.isoWeeksInYear=_1;M.isoWeeksInISOWeekYear=w1;M.date=jl;M.day=M.days=p0;M.weekday=_0;M.isoWeekday=w0;M.dayOfYear=v1;M.hour=M.hours=S0;M.minute=M.minutes=k1;M.second=M.seconds=S1;M.millisecond=M.milliseconds=Bl;M.utcOffset=ah;M.utc=lh;M.local=ch;M.parseZone=dh;M.hasAlignedHourOffset=fh;M.isDST=uh;M.isLocal=mh;M.isUtcOffset=ph;M.isUtc=Ml;M.isUTC=Ml;M.zoneAbbr=D1;M.zoneName=T1;M.dates=$e("dates accessor is deprecated. Use date instead.",jl);M.months=$e("months accessor is deprecated. Use month instead",wl);M.years=$e("years accessor is deprecated. Use year instead",xl);M.zone=$e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",oh);M.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",hh);function A1(e){return oe(e*1e3)}function O1(){return oe.apply(null,arguments).parseZone()}function Vl(e){return e}var ne=as.prototype;ne.calendar=pu;ne.longDateFormat=xu;ne.invalidDate=bu;ne.ordinal=Su;ne.preparse=Vl;ne.postformat=Vl;ne.relativeTime=Du;ne.pastFuture=Tu;ne.set=hu;ne.eras=t1;ne.erasParse=n1;ne.erasConvertYear=r1;ne.erasAbbrRegex=c1;ne.erasNameRegex=l1;ne.erasNarrowRegex=d1;ne.months=ju;ne.monthsShort=Bu;ne.monthsParse=Gu;ne.monthsRegex=zu;ne.monthsShortRegex=qu;ne.week=Xu;ne.firstDayOfYear=e0;ne.firstDayOfWeek=Qu;ne.weekdays=d0;ne.weekdaysMin=u0;ne.weekdaysShort=f0;ne.weekdaysParse=m0;ne.weekdaysRegex=g0;ne.weekdaysShortRegex=x0;ne.weekdaysMinRegex=y0;ne.isPM=v0;ne.meridiem=E0;function Dr(e,t,n,r){var i=St(),s=ut().set(r,t);return i[n](s,e)}function Gl(e,t,n){if(kt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dr(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Dr(e,r,n,"month");return i}function vs(e,t,n,r){typeof e=="boolean"?(kt(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,kt(t)&&(n=t,t=void 0),t=t||"");var i=St(),s=e?i._week.dow:0,a,l=[];if(n!=null)return Dr(t,(n+s)%7,r,"day");for(a=0;a<7;a++)l[a]=Dr(t,(a+s)%7,r,"day");return l}function R1(e,t){return Gl(e,t,"months")}function M1(e,t){return Gl(e,t,"monthsShort")}function I1(e,t,n){return vs(e,t,n,"weekdays")}function F1(e,t,n){return vs(e,t,n,"weekdaysShort")}function L1(e,t,n){return vs(e,t,n,"weekdaysMin")}Pt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=$(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Pt);L.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",St);var _t=Math.abs;function C1(){var e=this._data;return this._milliseconds=_t(this._milliseconds),this._days=_t(this._days),this._months=_t(this._months),e.milliseconds=_t(e.milliseconds),e.seconds=_t(e.seconds),e.minutes=_t(e.minutes),e.hours=_t(e.hours),e.months=_t(e.months),e.years=_t(e.years),this}function Zl(e,t,n,r){var i=st(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function N1(e,t){return Zl(this,e,t,1)}function P1(e,t){return Zl(this,e,t,-1)}function Ua(e){return e<0?Math.floor(e):Math.ceil(e)}function U1(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,a,l,o;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Ua(Yi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Ze(e/1e3),r.seconds=i%60,s=Ze(i/60),r.minutes=s%60,a=Ze(s/60),r.hours=a%24,t+=Ze(a/24),o=Ze(ql(t)),n+=o,t-=Ua(Yi(o)),l=Ze(n/12),n%=12,r.days=t,r.months=n,r.years=l,this}function ql(e){return e*4800/146097}function Yi(e){return e*146097/4800}function Y1(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ke(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+ql(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Yi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function W1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+$(this._months/12)*31536e6:NaN}function Et(e){return function(){return this.as(e)}}var H1=Et("ms"),j1=Et("s"),B1=Et("m"),V1=Et("h"),G1=Et("d"),Z1=Et("w"),q1=Et("M"),z1=Et("Q"),$1=Et("y");function K1(){return st(this)}function X1(e){return e=Ke(e),this.isValid()?this[e+"s"]():NaN}function Xt(e){return function(){return this.isValid()?this._data[e]:NaN}}var J1=Xt("milliseconds"),Q1=Xt("seconds"),em=Xt("minutes"),tm=Xt("hours"),nm=Xt("days"),rm=Xt("months"),im=Xt("years");function sm(){return Ze(this.days()/7)}var wt=Math.round,ln={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function am(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function om(e,t,n,r){var i=st(e).abs(),s=wt(i.as("s")),a=wt(i.as("m")),l=wt(i.as("h")),o=wt(i.as("d")),f=wt(i.as("M")),d=wt(i.as("w")),u=wt(i.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,am.apply(null,p)}function lm(e){return e===void 0?wt:typeof e=="function"?(wt=e,!0):!1}function cm(e,t){return ln[e]===void 0?!1:t===void 0?ln[e]:(ln[e]=t,e==="s"&&(ln.ss=t-1),!0)}function dm(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ln,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ln,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=om(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var ui=Math.abs;function nn(e){return(e>0)-(e<0)||+e}function Gr(){if(!this.isValid())return this.localeData().invalidDate();var e=ui(this._milliseconds)/1e3,t=ui(this._days),n=ui(this._months),r,i,s,a,l=this.asSeconds(),o,f,d,u;return l?(r=Ze(e/60),i=Ze(r/60),e%=60,r%=60,s=Ze(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",o=l<0?"-":"",f=nn(this._months)!==nn(l)?"-":"",d=nn(this._days)!==nn(l)?"-":"",u=nn(this._milliseconds)!==nn(l)?"-":"",o+"P"+(s?f+s+"Y":"")+(n?f+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?u+i+"H":"")+(r?u+r+"M":"")+(e?u+a+"S":"")):"P0D"}var X=Br.prototype;X.isValid=nh;X.abs=C1;X.add=N1;X.subtract=P1;X.as=Y1;X.asMilliseconds=H1;X.asSeconds=j1;X.asMinutes=B1;X.asHours=V1;X.asDays=G1;X.asWeeks=Z1;X.asMonths=q1;X.asQuarters=z1;X.asYears=$1;X.valueOf=W1;X._bubble=U1;X.clone=K1;X.get=X1;X.milliseconds=J1;X.seconds=Q1;X.minutes=em;X.hours=tm;X.days=nm;X.weeks=sm;X.months=rm;X.years=im;X.humanize=dm;X.toISOString=Gr;X.toString=Gr;X.toJSON=Gr;X.locale=Cl;X.localeData=Pl;X.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gr);X.lang=Nl;H("X",0,0,"unix");H("x",0,0,"valueOf");C("x",Yr);C("X",Iu);ie("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ie("x",function(e,t,n){n._d=new Date($(e))});//! moment.js L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L.months=R1;L.isDate=jn;L.locale=Pt;L.invalid=Lr;L.duration=st;L.isMoment=it;L.weekdays=I1;L.parseZone=O1;L.localeData=St;L.isDuration=dr;L.monthsShort=M1;L.weekdaysMin=L1;L.defineLocale=ms;L.updateLocale=O0;L.locales=R0;L.weekdaysShort=F1;L.normalizeUnits=Ke;L.relativeTimeRounding=lm;L.relativeTimeThreshold=cm;L.calendarFormat=Eh;L.prototype=M;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Wi(e,t){const n=L(e,t,!0);if(n.isValid())return n.format("MM-DD-YYYY")}function fm(e){return Ir(e)!==e}class hi{constructor(){Bt(this,"nameWasCalledAsFile",[]);Bt(this,"pathMap",new Map);Bt(this,"nameMap",new Map)}accessAsFile(t,n,r,i){const s=Wi(t,i);s&&(t=s);const a=this.pathMap.get(n);if(a)return this.nameMap.get(t)||this.nameMap.set(t,a),a;const l=this.nameMap.get(t);if(l&&!this.nameWasCalledAsFile.includes(t))return this.pathMap.set(n,l),this.nameWasCalledAsFile.push(t),l;const o=r(s);return this.pathMap.set(n,o),this.nameMap.get(t)||this.nameMap.set(t,o),this.nameWasCalledAsFile.push(t),o}accessAsLink(t,n,r){const i=Wi(t,r);i&&(t=i);const s=this.findData(t);if(s)return s;const a=fm(t),l=n(i);return a?this.pathMap.set(t,l):this.nameMap.set(t,l),l}findData(t){var n;return(n=this.pathMap.get(t))!=null?n:this.nameMap.get(t)}getData(){return new Set([...this.pathMap.values(),...this.nameMap.values()])}}function Zr(e){e.totalNodes++,e.leafNodes++}function zl(e){e.leafNodes--,e.topLevelNodes++}function um(e,t,n=cu,r="YYYY-MM-DD"){return e.endsWith(Fr)&&(e=e.slice(0,-1)),e=t.resolve(e),{summary:{leafNodes:0,topLevelNodes:0,totalNodes:0,calendarNodes:0,fields:0,brokenRefs:0},adapter:t,idGenerator:n,vaultPath:e,defaultLinkTracker:new hi,headingTracker:new hi,dummyHeadingLinkTracker:new Map,blockLinkTracker:new hi,invalidLinks:[],superTagTracker:new Map,attributes:[],dailyNoteFormat:r}}function Wt(e){return Zr(e.summary),e.idGenerator()}function hm(e,t){const n=e[0],r=e[1],i=t.blockLinkTracker.accessAsLink(n,()=>new Map,t.dailyNoteFormat);let s=i.get(r);return s||(s={uid:Wt(t),obsidianLink:e.join("#"),type:0}),i.set(r,s),s.uid}function mm(e,t,n){const r=e[0],i=e[1],s=n.blockLinkTracker.accessAsFile(r,t,()=>new Map,n.dailyNoteFormat);let a=s.get(i);return a||(a={uid:Wt(n),obsidianLink:e.join("#"),type:1}),a.type=1,s.set(i,a),a.uid}function pm(e){const t=[];for(const n of e.getData())for(const r of n.values())r.type===0&&t.push({uid:r.uid,link:r.obsidianLink});return t}function _m(e){let t;return[e.split(` `).map(r=>{const i=r.split(" "),s=i[i.length-1];return s.startsWith("^")?(t=s,i.slice(0,-1).join(" ")):r}).join(` -`),t]}function $l(e,t,n,r,i,s){const a=[t],l=[e];for(const o of n){const f=i(o);wm(f,o,a,l,r),s==null||s(f,o)}}function wm(e,t,n,r,i){var l;gm(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(l=a.children)!=null?l:[],a.children.push(e)),n.push(t),r.push(e)}function gm(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function Kl(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=Kl(n.children,r);if(i)return i}}return null}function xm(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function ym(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const l=t.findData(s);if(l){const o={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};$l(f,o,l,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=Kl(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function bm(e,t){const[n,r]=ym(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Zr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let l=a;s.forEach(o=>{l=l.replace(o.old,o.new)}),await t.adapter.appendToPostProcessingFile(i,l)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var Xl=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(Xl||{});function vm(e,t){const n=km(e.name,t);if(n.length>0){const r=new Set;e.refs||(e.refs=[]);for(const[i,s,a]of n)r.add(s),e.name=e.name.replaceAll("[["+i+"]]",a);e.refs.push(...Array.from(r.values()))}}function km(e,t){return du(e,!0).map(n=>[n,n.split("|").map(r=>r.trim())]).filter(n=>n[1][0]!=="").map(n=>{const r=n[1],i=r[0],s=r[1],a=Dm(i,t),l=s!==void 0&&s.trim()!==""?"["+s.trim()+"]([["+a+"]])":"[["+a+"]]";return[n[0],a,l]})}function Sm(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function Em(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function Dm(e,t){const n=Sm(e),r=Em(n);switch(n[0]===void 0&&console.log("Parsed undefined clean link. Original link: "+e,"Type of link: "+r),r){case 0:return Tm(n,t);case 2:return hm(n,t);case 1:return xm(n,t);default:throw"Invalid link type detected: "+n}}function Tm(e,t){const n=e[0];return t.defaultLinkTracker.accessAsLink(n,i=>(Zr(t.summary),{uid:i!=null?i:t.idGenerator(),obsidianLink:n,type:1}),t.dailyNoteFormat).uid}function Jl(e,t,n,r){const[i,s]=_m(n);return s?[mm([e,s],t,r),i]:[Wt(r),n]}function Am(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,s=>(Zr(n.summary),{uid:s!=null?s:n.idGenerator(),obsidianLink:r,type:0}),n.dailyNoteFormat);return i.type=0,i.uid}function Om(e){const t=[];for(const n of e.getData())n.type===Xl.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function Rm(e){return[...e.invalidLinks,...Om(e.defaultLinkTracker),...pm(e.blockLinkTracker)]}function Mm(e,t,n){const r=Rm(n).sort((a,l)=>a.link.localeCompare(l.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:Wt(n),name:i,createdAt:t,editedAt:t,type:"node"};return zl(n.summary),s.children=r,s}function ks(e){return e===" "||e===" "}function Zn(e,t){let n=0;for(;ks(e[t+n]);)n++;return n}function Im(e,t){let n=t,r=e[t];for(;ks(r);)n--,r=e[n];return n+1}function Ut(e,t){let n=0;for(;!Ss(e[t+n]);)n++;return t+n}function Ql(e,t){const n=e[t-1];return Ss(n)}function Ss(e){return e===void 0||e===` +`),t]}function $l(e,t,n,r,i,s){const a=[t],l=[e];for(const o of n){const f=i(o);wm(f,o,a,l,r),s==null||s(f,o)}}function wm(e,t,n,r,i){var l;gm(t,n,r,i);const s=n[n.length-1],a=r[r.length-1];s&&a&&(a.children=(l=a.children)!=null?l:[],a.children.push(e)),n.push(t),r.push(e)}function gm(e,t,n,r){let i=t[t.length-1],s=n[n.length-1];for(;i&&s&&!r(i,e);)t.pop(),n.pop(),i=t[t.length-1],s=n[n.length-1]}function Kl(e,t){for(const n of e){let r=t.slice();if(n.content===t[0]&&(r=t.slice(1)),r.length===0)return n;if(n.children){const i=Kl(n.children,r);if(i)return i}}return null}function xm(e,t){var s;const n=e[0],r=(s=t.dummyHeadingLinkTracker.get(n))!=null?s:[];t.dummyHeadingLinkTracker.set(n,r);const i="!"+t.idGenerator()+"!";return r.push({uid:i,link:e.slice(1)}),i}function ym(e,t){var i;const n=[],r=[];for(const[s,a]of e.entries()){const l=t.findData(s);if(l){const o={uid:"DUMMY",content:"",level:-1},f={uid:"DUMMY",content:""};$l(f,o,l,(u,p)=>u.level({uid:u.uid,content:u.content,children:void 0}));const d=(i=f.children)!=null?i:[];for(const u of a){const p=Kl(d,u.link);p?r.push({old:u.uid,new:p.uid}):n.push(u)}}else n.push(...a)}return[r,n]}async function bm(e,t){const[n,r]=ym(t.dummyHeadingLinkTracker,t.headingTracker);r.forEach(a=>{t.invalidLinks.push({uid:a.uid,link:a.link.join("#")}),Zr(t.summary)});const i=e+"_TEMP";t.adapter.initPostProcessingResultFile(e);const s=n.map(a=>({old:new RegExp(a.old,"g"),new:a.new}));for await(const a of t.adapter.chunkIter()){let l=a;s.forEach(o=>{l=l.replace(o.old,o.new)}),await t.adapter.appendToPostProcessingFile(i,l)}t.adapter.endPostProcessingFile(i),t.adapter.removeFile(e),t.adapter.renameFile(i,e)}var Xl=(e=>(e[e.FILE=0]="FILE",e[e.CONTENT=1]="CONTENT",e))(Xl||{});function vm(e,t){const n=km(e.name,t);if(n.length>0){const r=new Set;e.refs||(e.refs=[]);for(const[i,s,a]of n)r.add(s),e.name=e.name.replaceAll("[["+i+"]]",a);e.refs.push(...Array.from(r.values()))}}function km(e,t){return du(e,!0).map(n=>[n,n.split("|").map(r=>r.trim())]).filter(n=>n[1][0]!==""&&n[1][0]!=="#").map(n=>{const r=n[1],i=r[0],s=r[1],a=Dm(i,t),l=s!==void 0&&s.trim()!==""?"["+s.trim()+"]([["+a+"]])":"[["+a+"]]";return[n[0],a,l]})}function Sm(e){return e.split("#").map(t=>t.trim()).filter(t=>t!=="")}function Em(e){return e.length===2&&e[1].startsWith("^")?2:e.length>1?1:0}function Dm(e,t){const n=Sm(e),r=Em(n);switch(n[0]===void 0&&console.log("Parsed undefined clean link. Original link: "+e+".","Type of link: "+r),r){case 0:return Tm(n,t);case 2:return hm(n,t);case 1:return xm(n,t);default:throw"Invalid link type detected: "+n}}function Tm(e,t){const n=e[0];return t.defaultLinkTracker.accessAsLink(n,i=>(Zr(t.summary),{uid:i!=null?i:t.idGenerator(),obsidianLink:n,type:1}),t.dailyNoteFormat).uid}function Jl(e,t,n,r){const[i,s]=_m(n);return s?[mm([e,s],t,r),i]:[Wt(r),n]}function Am(e,t,n){const r=e.trim(),i=n.defaultLinkTracker.accessAsFile(r,t,s=>(Zr(n.summary),{uid:s!=null?s:n.idGenerator(),obsidianLink:r,type:0}),n.dailyNoteFormat);return i.type=0,i.uid}function Om(e){const t=[];for(const n of e.getData())n.type===Xl.CONTENT&&t.push({uid:n.uid,link:n.obsidianLink});return t}function Rm(e){return[...e.invalidLinks,...Om(e.defaultLinkTracker),...pm(e.blockLinkTracker)]}function Mm(e,t,n){const r=Rm(n).sort((a,l)=>a.link.localeCompare(l.link)).map(a=>({uid:a.uid,name:a.link,createdAt:t,editedAt:t,type:"node"}));if(r.length===0)return null;const i="Missing Nodes for "+e,s={uid:Wt(n),name:i,createdAt:t,editedAt:t,type:"node"};return zl(n.summary),s.children=r,s}function ks(e){return e===" "||e===" "}function Zn(e,t){let n=0;for(;ks(e[t+n]);)n++;return n}function Im(e,t){let n=t,r=e[t];for(;ks(r);)n--,r=e[n];return n+1}function Ut(e,t){let n=0;for(;!Ss(e[t+n]);)n++;return t+n}function Ql(e,t){const n=e[t-1];return Ss(n)}function Ss(e){return e===void 0||e===` `}function ec(e,t){const n=e[t],r=e[t+1];return!isNaN(parseInt(n))&&(r==="."||r===")")&&e[t+2]===" "}function Es(e,t){let n=!0;const r=t+Zn(e,t),i=e[r],s=e[r+1];(i==="*"||i==="-")&&s===" "||(n=ec(e,r));const a=Im(e,r-1)-1,l=e[a];return Ss(l)&&n?{type:ft.BULLET,level:r-a-1}:null}function Fm(e,t,n){let r=t+n.level;if(ec(e,r))return r;r+=1+1;const i=Zn(e,r);return r+i}function Lm(e,t,n){let r=Ut(e,t+n.level+1+1),i=e[r];for(;;){const s=Zn(e,r+1);if(s>0&&(s==n.level+2||s==n.level)&&!Es(e,r+1+s))r=Ut(e,r+1),i=e[r];else return r;if(i===void 0)return r}}function Cm(e,t){return e+t.level}function Nm(e){var r;const t=3+((r=e.codeLanguage)!=null?r:"").length,n=Zn(e.content,t);return e.content.trimEnd().slice(t+n+1,-3).trimEnd()}function tc(e,t){if(!Ql(e,t))return null;if([e[t],e[t+1],e[t+2]].every(n=>n==="`")){const n=Ut(e,t+3),r=e.slice(t+3,n).trimEnd();if(r.includes(" "))return null;let i=n+1,s=e[i],a=e[i+1],l=e[i+2];for(;[s,a,l].every(d=>d!==void 0)&&[s,a,l].join("")!=="```";)i++,s=e[i],a=e[i+1],l=e[i+2];if([s,a,l].some(d=>d===void 0))return null;const o=Ut(e,i+3);return e.slice(i+3,o).trim()!==""?null:{type:ft.CODEBLOCK,level:o-t+(e[o]===` `?1:0),codeLanguage:r!==""?r:void 0}}return null}function Pm(e,t){return Ut(e,t)}function nc(e,t){const n=Ut(e,t),r=e.slice(t,n);return rc(r)?{type:ft.DATAVIEWATTRIBUTE,level:0}:null}function rc(e){const t=e.split("::");return t.length===2&&t[0].trim()===t[0]&&t[0]!==""&&t[1]!==""&&t[1]!==" "&&ks(t[1][0])}function ic(e,t){if(!Ql(e,t))return null;const n=Um(e,t);return n>0&&e[t+n]===" "?{type:ft.HEADING,level:n}:null}function Um(e,t){let n=t,r=0;for(;e[n]==="#";)n++,r++;return r}function Ym(e,t,n){const r=t+n.level+1,i=Zn(e,r);return r+i}function Wm(e,t,n){return Ut(e,t+n.level+1)}function Hm(e,t){let n=Ut(e,t),r=e[n],i=r;for(n++,r=e[n];;){if(r===void 0)return[n];if(r===` `&&i===` @@ -46,4 +46,4 @@ L.version="2.29.4";fu(oe);L.fn=M;L.min=J0;L.max=Q0;L.now=eh;L.utc=ut;L.unix=A1;L Please check the text at the top again.`,document.body.appendChild(l)}document.body.appendChild(document.createElement("br")),document.body.appendChild(document.createElement("br"));const a=document.createElement("b");a.innerText=`Content of Error (please post in the Slack and tag me): `+i,document.body.appendChild(a)}}); -//# sourceMappingURL=index.7c88b9a4.js.map +//# sourceMappingURL=index.b5f269bd.js.map diff --git a/docs/assets/index.7c88b9a4.js.map b/docs/assets/index.b5f269bd.js.map similarity index 63% rename from docs/assets/index.7c88b9a4.js.map rename to docs/assets/index.b5f269bd.js.map index 6fe465d..3ec34fa 100644 --- a/docs/assets/index.7c88b9a4.js.map +++ b/docs/assets/index.b5f269bd.js.map @@ -1 +1 @@ -{"version":3,"file":"index.7c88b9a4.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid if they are used\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n if (cleanLink[0] === undefined) {\n console.log('Parsed undefined clean link. Original link: ' + obsidianLink, 'Type of link: ' + linkType);\n }\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink, context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(link: string[], context: VaultContext) {\n const obsidianLink = link[0];\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n\n //but also if they are just equal to the hierachy-level:\n //e.g.\n //- Text1\n // - Text2\n // Text3\n //Text4\n //\"Text3\" is still part of Text2 because Obsidian allows that!\n //but not \"Text4\" because its on the zero level\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (\n emptySpaces > 0 &&\n (emptySpaces == hierarchy.level + 2 || emptySpaces == hierarchy.level) &&\n !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)\n ) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\nconst nonDigit = new RegExp('\\\\D');\n\n// https://help.obsidian.md/How+to/Working+with+tags\n// only - _ and / are allowed\n// this is a brute force approach, because its not trivial to detect invalid tags in other languages\n// (can not use \\w for example because e.g. korean characters are excluded)\nconst disallowedSymbols = new Set([\n '#',\n '!',\n '{',\n '}',\n '(',\n ')',\n '?',\n '$',\n '%',\n '&',\n '\"',\n \"'\",\n '<',\n '>',\n '\\\\',\n '*',\n '`',\n '[',\n ']',\n ':',\n ',',\n ';',\n '~',\n '=',\n '§',\n '.',\n '°',\n '^',\n]);\n\nexport function validTag(tag: string) {\n //currently whitespace is also detected as part of the tag\n tag = tag.trim();\n let char = tag[0];\n //sanity check\n if (char !== '#') {\n return false;\n }\n\n let foundNonDigit = false;\n\n for (let index = 1; index < tag.length; index++) {\n char = tag[index];\n if (char.match(nonDigit)) {\n foundNonDigit = true;\n }\n\n if (disallowedSymbols.has(char)) {\n return false;\n }\n }\n\n return foundNonDigit;\n}\n\nexport function detectTags(content: string) {\n return content.match(tagRegex)?.filter((tag) => validTag(tag));\n}\n\nexport function removeTagsFromEnd(content: string, tags: string[]) {\n let curContent = content;\n let globalRemovedTag = false;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let removedTag = false;\n for (const tag of tags) {\n if (curContent.endsWith(tag)) {\n curContent = curContent.slice(0, -tag.length);\n removedTag = true;\n globalRemovedTag = true;\n }\n }\n\n if (!removedTag) {\n break;\n }\n }\n\n //removing empty space at the end, because the tag detection only detects leading empty space\n if (globalRemovedTag) {\n curContent = curContent.trimEnd();\n }\n\n return curContent;\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags, removeTagsFromEnd } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tags without losing meaning because they will show up as super tags anyways\n tanaNode.name = removeTagsFromEnd(tanaNode.name, tags);\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack and tag me):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","linkType","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","nonDigit","disallowedSymbols","validTag","tag","foundNonDigit","detectTags","removeTagsFromEnd","tags","curContent","globalRemovedTag","removedTag","cleanUpTag","superTagUidRequests","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EA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AiB,QAAS,IAAM,CACvC,MAAAnyC,EAAM,IAAI,gBAAgB,IAAI,KAAK,CAAC9X,CAAM,CAAC,CAAC,EAC5C7P,EAAI,SAAS,cAAc,GAAG,EACpCA,EAAE,MAAM,QAAU,OAClBA,EAAE,KAAO2nB,EACT3nB,EAAE,SAAWq5D,EAAY,YAChB,SAAA,KAAK,YAAYr5D,CAAC,EAC3BA,EAAE,MAAM,EACR,IAAI,gBAAgB2nB,CAAG,CAAA,CACxB,EACQ,SAAA,KAAK,YAAYmyC,CAAc,QACjCr1C,GACP,QAAQ,MAAMA,CAAK,EAEf+0C,GACO,SAAA,KAAK,YAAYA,CAAQ,EAI9B,MAAAO,EAAoBt1C,EAAc,MAAM,SAAS,EAEvD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAu1C,EAAiB,SAAS,cAAc,GAAG,EAGjD,GAFAA,EAAe,UAAY,oBAClB,SAAA,KAAK,YAAYA,CAAc,EACpCD,EAAS,YAAA,EAAc,SAAS,eAAe,EAAG,CACpD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAE,EAAiB,SAAS,cAAc,GAAG,EACjDA,EAAe,UACb;AAAA,yCACO,SAAA,KAAK,YAAYA,CAAc,CAC1C,CAEA,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EACtD,SAAS,KAAK,YAAY,SAAS,cAAc,IAAI,CAAC,EAChD,MAAAC,EAAe,SAAS,cAAc,GAAG,EAC/CA,EAAa,UAAY;AAAA;AAAA,EAAgEH,EAChF,SAAA,KAAK,YAAYG,CAAY,CACxC,CACF,CAAC"} \ No newline at end of file +{"version":3,"file":"index.b5f269bd.js","sources":["../../vite/modulepreload-polyfill","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../../node_modules/@zip.js/zip.js/lib/core/constants.js","../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../../node_modules/@zip.js/zip.js/lib/core/configuration.js","../../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../../node_modules/@zip.js/zip.js/lib/core/io.js","../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../node_modules/@zip.js/zip.js/lib/core/zip-fs-core.js","../../node_modules/@zip.js/zip.js/lib/zip-fs.js","../../node_modules/@zip.js/zip.js/index.js","../../src/converters/obsidian/filesystem/CustomFileSystemAdapter.ts","../../src/converters/obsidian/filesystem/WebFileSystemAdapter.ts","../../src/utils/utils.ts","../../node_modules/moment/dist/moment.js","../../src/converters/obsidian/links/dateLinks.ts","../../src/converters/obsidian/links/FileDescMap.ts","../../src/converters/obsidian/VaultContext.ts","../../src/converters/obsidian/links/genericLinks.ts","../../src/converters/obsidian/links/blockLinks.ts","../../src/converters/obsidian/markdown/blockIds.ts","../../src/converters/obsidian/utils/createTree.ts","../../src/converters/obsidian/utils/traverseTreeDepthFirst.ts","../../src/converters/obsidian/links/headingLinks.ts","../../src/converters/obsidian/links/internalLinks.ts","../../src/converters/obsidian/links/invalidLinks.ts","../../src/converters/obsidian/markdown/emptySpace.ts","../../src/converters/obsidian/markdown/newline.ts","../../src/converters/obsidian/hierarchy/bullets.ts","../../src/converters/obsidian/hierarchy/codeblocks.ts","../../src/converters/obsidian/hierarchy/dataviewattributes.ts","../../src/converters/obsidian/hierarchy/headings.ts","../../src/converters/obsidian/hierarchy/paragraphs.ts","../../src/converters/obsidian/hierarchy/markdownNodes.ts","../../src/converters/obsidian/markdown/tags.ts","../../src/converters/obsidian/tanafeatures/supertags.ts","../../src/converters/obsidian/markdown/todo.ts","../../src/converters/obsidian/markdown/imageLinks.ts","../../src/converters/obsidian/tanafeatures/imageNodes.ts","../../src/converters/obsidian/tanafeatures/postprocessing.ts","../../src/converters/obsidian/tanafeatures/fields.ts","../../src/converters/obsidian/tanaconversion/nodeConversion.ts","../../src/converters/obsidian/markdown/frontmatter.ts","../../src/converters/obsidian/tanaconversion/fileConversion.ts","../../src/converters/obsidian/tanaconversion/vaultConversion.ts","../../src/converters/obsidian/ObsidianVaultConverter.ts","../../src/converters/obsidian/WebObsidianVaultConverter.ts","../../src/script.ts"],"sourcesContent":["__VITE_IS_MODERN__&&(function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n}());","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\n\nTree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\n// extra bits for each distance code\nTree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,\n\t0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,\n\t0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,\n\t0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,\n\t0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,\n\t35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,\n\t26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,\n\t7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,\n\t8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,\n\t8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,\n\t0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,\n\t81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,\n\t0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,\n\t84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,\n\t0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,\n\t80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,\n\t0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,\n\t0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,\n\t0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,\n\t193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,\n\t120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,\n\t227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,\n\t92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,\n\t249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,\n\t130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,\n\t181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,\n\t102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,\n\t221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,\n\t8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,\n\t147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,\n\t85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,\n\t235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,\n\t141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,\n\t167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,\n\t107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,\n\t207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,\n\t127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255];\nconst fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,\n\t8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = function (hash) {\n\tif (hash) {\n\t\tthis._h = hash._h.slice(0);\n\t\tthis._buffer = hash._buffer.slice(0);\n\t\tthis._length = hash._length;\n\t} else {\n\t\tthis.reset();\n\t}\n};\n\nhash.sha1.prototype = {\n\t/**\n\t * The hash's block size, in bits.\n\t * @constant\n\t */\n\tblockSize: 512,\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = this._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t},\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t},\n\n\t/**\n\t * The SHA-1 initialization vector.\n\t * @private\n\t */\n\t_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0],\n\n\t/**\n\t * The SHA-1 hash key.\n\t * @private\n\t */\n\t_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6],\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t},\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t},\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\tconst bs = Hash.prototype.blockSize / 32;\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\n\t\tif (key.length > bs) {\n\t\t\tkey = Hash.hash(key);\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nconst DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nfunction importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\treturn subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},C={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.A(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t},D(){const e=this;let t=e.S;const n=e.v;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.A(t.splice(0,16));return e.reset(),n},C:[1732584193,4023233417,2562383102,271733878,3285377520],V:[1518500249,1859775393,2400959708,3395469782],R:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,B:(e,t)=>t<>>32-e,A(t){const n=this,s=n.v,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.B(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.B(5,o)+n.R(e,c,f,a)+l+i[e]+n.V[r.floor(e/20)]|0;l=a,a=f,f=n.B(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}};const x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew A.M(C.p.g(e)),K(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=C.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.N=new n(t.U[0])}reset(){const e=this;e.N=new e.P(e.U[0]),e.T=!1}update(e){this.T=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.P(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.T)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues;function V(e){return D?h.getRandomValues(e):x.getRandomValues(e)}const R={name:\"PBKDF2\"},B=t.assign({hash:{name:\"HMAC\"}},R),E=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},R),M=[\"deriveBits\"],K=[8,12,16],P=[16,24,32],U=[0,0,0,0],N=void 0!==h,T=N&&h.subtle,W=N&&void 0!==T,H=N&&W&&\"function\"==typeof T.importKey,L=N&&W&&\"function\"==typeof T.deriveBits,j=C.p,F=class{constructor(e){const t=this;t.W=[[[],[],[],[],[]],[[],[],[],[],[]]],t.W[0][0][0]||t.H();const n=t.W[0][4],r=t.W[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.V=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.L(e,0)}decrypt(e){return this.L(e,1)}H(){const e=this.W[0],t=this.W[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}L(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.V[t],r=n.length/4-2,i=[0,0,0,0],o=this.W[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},O=class{constructor(e,t){this.j=e,this.F=t,this.O=t}reset(){this.O=this.F}update(e){return this.q(this.j,e,this.O)}G(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},q=A.M;class G extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,signed:n,Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await X(e,t,n,Z(r,0,K[t])),o=Z(r,K[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(\"Invalid password\")})(n,o,r,Z(e,0,K[o]+2)),e=Z(e,K[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(Q(n,e,a,0,10,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;await c;const f=Z(o,0,o.length-10),a=Z(o,o.length-10);let l=new i;if(f.length){const e=ee(j,f);r.update(e);const t=n.update(e);l=$(j,t)}if(t){const e=Z($(j,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s(\"Invalid signature\")}e.enqueue(l)}})}}class J extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:e,Y:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=V(new i(K[t]));return Y(r,await X(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(Q(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ee(j,s));n.update(e),c=$(j,e)}r.signature=$(j,n.digest()).slice(0,10),e.enqueue(Y(c,r.signature))}}),r=this}}function Q(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=Y(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=ee(j,Z(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set($(j,s),u+r)}return e.pending=Z(t,u),n}async function X(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;nH?T.importKey(\"raw\",t,n,!1,s):A.importKey(t))(0,c,B,0,M),a=await(async(e,t,n)=>L?await T.deriveBits(e,t,n):A.K(t,e.salt,E.iterations,n))(t.assign({salt:o},E),f,8*(2*P[r]+2)),l=new i(a),u=ee(j,Z(l,0,P[r])),h=ee(j,Z(l,P[r],2*P[r])),d=Z(l,2*P[r]);return t.assign(n,{keys:{key:u,ee:h,passwordVerification:d},Z:new O(new F(u),e.from(U)),$:new q(h)}),d}function Y(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Z(e,t,n){return e.subarray(t,n)}function $(e,t){return e.m(t)}function ee(e,t){return e.g(t)}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(\"Invalid password\");e=e.subarray(12)}t.enqueue(re(n,e))}})}}class ne extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=V(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(se(n,t),0),s=12}else r=new i(e.length),s=0;r.set(se(n,e),s),t.enqueue(r)}})}}function re(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ce(e){const t=2|e.keys[2];return fe(r.imul(t,1^t)>>>8)}function fe(e){return 255&e}function ae(e){return 4294967295&e}class le extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=we(super.readable);i&&!c||!f||([d,w]=d.tee(),w=pe(w,new z)),s&&(d=de(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=pe(d,new ne(e)):(h=new J(e),d=pe(d,h))),he(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ue extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=we(super.readable);o&&(i?d=pe(d,new te(e)):(h=new G(e),d=pe(d,h))),a&&(d=de(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=pe(w,new z)),he(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(\"Invalid signature\")}}))}}function we(e){return pe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function he(e,n,r){n=pe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function de(e,t,n,r,s){try{e=pe(e,new(t&&r?r:s)(\"deflate-raw\",n))}catch(r){if(!t)throw r;e=pe(e,new s(\"deflate-raw\",n))}return e}function pe(e,t){return e.pipeThrough(t)}class ye extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=le:s.startsWith(\"inflate\")&&(i=ue);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const me=new a,be=new a;let ge=0;async function ke(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>me.set(ge,e)));ve({type:\"pull\",messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));be.set(ge,t),ve({type:\"data\",value:e,messageId:ge}),ge=(ge+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new ye(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Se(e)}}function ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Se(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function ze(t){return _e(t.map((([t,n])=>new e(t).fill(n,0,t))))}function _e(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?_e(n):n)),[])}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&ke(e),\"data\"==t){const e=me.get(n);me.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=be.get(n);be.delete(n),e()}}catch(e){Se(e)}}));const Ce=[0,1,2,3].concat(...ze([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function xe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Ie.ke=[0,1,2,3,4,5,6,7].concat(...ze([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.ze=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie._e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ae=ze([[144,8],[112,9],[24,7],[8,8]]);xe.Ae=_e([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ae[t]])));const De=ze([[30,5]]);function Ve(e,t,n,r,s){const i=this;i.De=e,i.Ve=t,i.Re=n,i.Be=r,i.Ee=s}xe.Me=_e([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,De[t]]))),xe.Ke=new xe(xe.Ae,Ie._e,257,286,15),xe.Pe=new xe(xe.Me,Ie.Ce,0,30,15),xe.Ue=new xe(null,Ie.Ie,0,19,7);const Re=[new Ve(0,0,0,0,0),new Ve(4,4,8,4,1),new Ve(4,5,16,8,1),new Ve(4,6,32,32,1),new Ve(4,4,16,16,2),new Ve(8,16,32,32,2),new Ve(8,16,128,128,2),new Ve(8,32,128,256,2),new Ve(32,128,258,1024,2),new Ve(32,258,258,4096,2)],Be=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"];function Ee(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Me(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,_,C,I,x,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.we=e.he=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<>>16-O,O+=r-16):(F|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Te[H]=t,e.We[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ke[n]+256+1)]++,K[2*Ie.ze(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=_-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,Lc);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.re(e),N.re(e),o=(()=>{let t;for(G(M,U.de),G(K,N.de),T.re(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe.Ae,xe.Me)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.de+1,N.de+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,_-k,n),k=_,t.He()}function ie(){let e,n,r,s;do{if(s=w-I-_,0===s&&0===_&&0===I)s=f;else if(-1==s)s--;else if(_>=f+f-262){u.set(u.subarray(f,f+f),0),C-=f,_-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.Le)return;e=t.je(u,_+I,s),I+=e,3>I||(p=255&u[_],p=(p<I&&0!==t.Le)}function oe(e){let t,n,r=A,s=_,i=x;const o=_>f-262?_-(f-262):0;let c=E;const a=l,w=_+258;let d=u[s+i-1],p=u[s+i];B>x||(r>>=2),c>I&&(c=I);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(C=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>I?I:i}e.ue=[],e.ge=[],e.le=[],M=[],K=[],P=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(H||(H=8),L||(L=8),G||(G=0),t.Oe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>C||C>15||0>S||S>9||0>G||G>2?-2:(t.qe=e,a=C,f=1<(t.Ge=t.Je=0,t.Oe=null,e.pending=0,e.Qe=0,n=113,c=0,U.se=M,U.oe=xe.Ke,N.se=K,N.oe=xe.Pe,T.se=P,T.oe=xe.Ue,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be,_=0,k=0,I=0,v=x=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&113!=n&&666!=n?-2:(e.We=null,e.Te=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,113==n?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Re[V].Ee!=Re[t].Ee&&0!==e.Ge&&(r=e.Ze(1)),V!=t&&(V=t,D=Re[V].Ve,B=Re[V].De,E=Re[V].Re,A=Re[V].Be),R=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),_=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.et||!r.tt&&0!==r.Le||666==n&&4!=i)return r.Oe=Be[4],-2;if(0===r.nt)return r.Oe=Be[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==_&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.He(),0===t.nt)return c=-1,0}else if(0===t.Le&&A>=i&&4!=i)return t.Oe=Be[7],-5;if(666==n&&0!==t.Le)return r.Oe=Be[7],-5;if(0!==t.Le||0!==I||0!=i&&666!=n){switch(B=-1,Re[V].Ee){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=I){if(ie(),0===I&&0==e)return 0;if(0===I)break}if(_+=I,I=0,n=k+r,(0===_||_>=n)&&(I=_-n,_=n,se(!1),0===t.nt))return 0;if(_-k>=f-262&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[_]),I--,_++;else if(n=ee(_-C,v-3),I-=v,v>D||3>I)_+=v,v=0,p=255&u[_],p=(p<{let n,r,s=0;for(;;){if(262>I){if(ie(),262>I&&0==e)return 0;if(0===I)break}if(3>I||(p=(p<x&&f-262>=(_-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&_-C>4096)&&(v=2)),3>x||v>x)if(0!==z){if(n=ee(0,255&u[_-1]),n&&se(!1),_++,I--,0===t.nt)return 0}else z=1,_++,I--;else{r=_+I-3,n=ee(_-1-S,x-3),I-=x-1,x-=2;do{++_>r||(p=(p<1+j+10-O&&(X(2,3),Y(256,xe.Ae),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.He(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function Ke(){const e=this;e.rt=0,e.st=0,e.Le=0,e.Ge=0,e.nt=0,e.Je=0}function Pe(e){const t=new Ke,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Fe(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Oe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.slice(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.Le>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Oe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.Le>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Ke.prototype={Fe(e,t){const n=this;return n.qe=new Me,t||(t=15),n.qe.Fe(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):-2},Xe(){const e=this;if(!e.qe)return-2;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):-2},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):-2},je(e,t,n){const r=this;let s=r.Le;return s>n&&(s=n),0===s?0:(r.Le-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},He(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const Ue=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ne=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Te=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],We=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],He=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],je=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Fe(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,_,C,I,x,A,D;_=0,g=o;do{n[e[t+_]]++,_++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,_=1,x=2;0!=--g;)i[x]=k+=n[_],x++,_++;g=0,_=0;do{0!==(k=e[t+_])&&(d[i[k]++]=g),_++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>I+S;){if(b++,I+=S,D=m-I,D=D>S?S:D,(y=1<<(k=v-I))>p+1&&(y-=p+1,x=v,D>k))for(;++kn[++x];)y-=n[x];if(D=1<1440)return-3;s[b]=C=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>I-S,r[2]=C-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=C}for(r[1]=v-I,o>_?d[_]d[_]?0:96,r[2]=d[_++]):(r[0]=a[d[_]-c]+16+64,r[2]=f[d[_++]-c]):r[0]=192,y=1<>>I;D>k;k+=y)w.set(r,3*(C+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Oe=\"oversubscribed dynamic bit lengths tree\":-5!=a&&0!==r[0]||(f.Oe=\"incomplete dynamic bit lengths tree\",a=-3),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,We,He,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Oe=\"oversubscribed literal/length tree\":-4!=h&&(w.Oe=\"incomplete literal/length tree\",h=-3),h):(c(288),h=o(s,n,r,0,Le,je,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Oe=\"oversubscribed distance tree\":-5==h?(w.Oe=\"incomplete distance tree\",h=-3):-4!=h&&(w.Oe=\"empty distance tree with lengths\",h=-3),h):0)}}function Oe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.Le,w=o.ct,h=o.ft,y=o.write,m=yh;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Ue[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Oe=\"invalid distance code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3;f+=a[z+2],f+=w&Ue[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Oe=\"invalid literal/length code\",k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Ue[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.Le-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.Le=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,_,C=0,I=0,x=0;for(x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=S=258&&v>=10&&(e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,m=p(u,w,r,h,s,d,e,y),x=y.rt,v=y.Le,C=e.ct,I=e.ft,S=e.write,z=SI;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>>=n[g+1],I-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Oe=\"invalid literal/length code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 2:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=n[g+1],I-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Oe=\"invalid distance code\",m=-3,e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);case 4:for(b=a;b>I;){if(0===v)return e.ct=C,e.ft=I,y.Le=v,y.Ge+=x-y.rt,y.rt=x,e.write=S,e.ht(y,m);m=0,v--,C|=(255&y.lt(x++))<>=b,I-=b,t=5;case 5:for(_=S-l;0>_;)_+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(I-=8,v++,x--),e.write=S,m=e.ht(y,m),S=e.write,z=S{}}Fe.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ne,r[0]=Te,0);const qe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ge(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Oe;let h=0,d=new f(4320);const p=new Fe;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&-5==t&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=gy;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],_=[[]],C=[[]],Fe.yt(S,z,_,C),w.init(S[0],z[0],_[0],0,C[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Oe=\"invalid block type\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>16&65535)!=(65535&f))return s=9,e.Oe=\"invalid stored block lengths\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.ut.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<29||(i>>5&31)>29)return s=9,e.Oe=\"too many length or distance symbols\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=3,y-=3}for(;19>a;)r[qe[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<>>=i,y-=i,o+=f&Ue[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Oe=\"invalid bit length repeat\",t=-3,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,I=[],x=[],A=[],D=[],I[0]=9,x[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,I,x,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(I[0],x[0],d,A[0],d,D[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.Le=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.Le,f=n.ct,y=n.ft,g=n.write,k=g{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const Je=[0,0,255,255];function Qe(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Oe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):-2}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e._t=0,e.Ct=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.It=(n,r)=>(n.Oe=null,e.vt=null,8>r||r>15?(e.Ct(n),-2):(e._t=r,n.kt.vt=new Ge(n,1<{let n,r;if(!e||!e.kt||!e.tt)return-2;const s=e.kt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=13,e.Oe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s._t){s.mode=13,e.Oe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.Le)return n;if(n=t,e.Le--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Oe=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.Le)return n;n=t,e.Le--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.Le?n:(n=t,e.Le--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=13,e.Oe=\"need dictionary\",s.marker=0,-2;case 7:if(n=s.vt.wt(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.Le=0,1;case 13:return-3;default:return-2}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return-2;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return-2;const c=e.kt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.Le))return-5;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==Je[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.Le=n,c.marker=s,4!=s?-3:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Vt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():-2}function Xe(){}function Ye(e){const t=new Xe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.Le=e.length;do{if(t.st=0,t.nt=n,0!==t.Le||c||(t.rt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.Le)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Oe);if((c||1===a)&&t.Le===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.slice(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.Le>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Xe.prototype={It(e){const t=this;return t.kt=new Qe,e||(e=15),t.kt.It(t,e)},xt(e){const t=this;return t.kt?t.kt.xt(t,e):-2},Ct(){const e=this;if(!e.kt)return-2;const t=e.kt.Ct(e);return e.kt=null,t},Dt(){const e=this;return e.kt?e.kt.Dt(e):-2},At(e,t){const n=this;return n.kt?n.kt.At(n,e,t):-2},lt(e){return this.tt[e]},je(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Pe,self.Inflate=Ye};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\treturn new Uint8Array(await reader.blob.slice(offset, offset + length).arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tdata,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tawait this.reader.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tsuper.init();\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitZipReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitZipWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967296) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (diskSourceWriter.size + chunk.length >= maxSize) {\n\t\t\t\t\tconst chunkLength = maxSize - diskSourceWriter.size;\n\t\t\t\t\tawait writeChunk(chunk.slice(0, chunkLength));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(chunkLength));\n\t\t\t\t} else {\n\t\t\t\t\tif (chunk.length) {\n\t\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t\t}\n\t\t\t\t\tzipWriter.availableSize = maxSize - diskSourceWriter.size;\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tawait diskWriter.ready;\n\t\t\tawait diskWriter.write(chunk);\n\t\t\tdiskSourceWriter.size += chunk.length;\n\t\t\tzipWriter.size += chunk.length;\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nexport {\n\tinitStream,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tSplitZipReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\tif (Array.isArray(reader)) {\n\t\t\t\treader = new SplitZipReader(reader);\n\t\t\t} else {\n\t\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\t}\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tconst lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tconst size = readable.size = compressedSize;\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = {\n\t\t\t\twritable: writer\n\t\t\t};\n\t\t}\n\t\tconst { writable } = writer;\n\t\tif (writable.size === UNDEFINED_VALUE) {\n\t\t\twritable.size = 0;\n\t\t}\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\")\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\twritable.size += (await runWorker({ readable, writable }, workerOptions)).size;\n\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, ReadableStream, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tBlobWriter,\n\tSplitZipWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_LENGTH_ZIP64 = 28;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitZipWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream) {\n\t\t\twriter = { writable: writer };\n\t\t}\n\t\tif (writer.writable.size === UNDEFINED_VALUE) {\n\t\t\twriter.writable.size = 0;\n\t\t}\n\t\tconst splitZipFile = writer instanceof SplitZipWriter;\n\t\tif (!splitZipFile) {\n\t\t\tObject.assign(writer, {\n\t\t\t\tdiskNumber: 0,\n\t\t\t\tdiskOffset: 0,\n\t\t\t\tavailableSize: Infinity\n\t\t\t});\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature: splitZipFile,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set()\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.all(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tif (!writer.preventClose && !options.preventClose) {\n\t\t\tawait writable.close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\n\t}\n}\n\nexport {\n\tZipWriter,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst rawFilename = encodeText(name);\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options.comment || \"\";\n\tconst rawComment = encodeText(comment);\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = zipWriter.options.version || options.version || 0;\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = zipWriter.options.versionMadeBy || options.versionMadeBy || 20;\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE) || new Date();\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\") || 3;\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\");\n\tif (extendedTimestamp === UNDEFINED_VALUE) {\n\t\textendedTimestamp = true;\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet keepOrder = getOptionValue(zipWriter, options, \"keepOrder\");\n\tif (keepOrder === UNDEFINED_VALUE) {\n\t\tkeepOrder = true;\n\t}\n\tlet uncompressedSize = 0;\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tif (msDosCompatible === UNDEFINED_VALUE) {\n\t\tmsDosCompatible = true;\n\t}\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE) || 0;\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE) || 0;\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (reader) {\n\t\tif (reader instanceof ReadableStream) {\n\t\t\treader = {\n\t\t\t\treadable: reader\n\t\t\t};\n\t\t}\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\toptions.dataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tmaximumCompressedSize = MAX_32_BITS;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset } = zipWriter.writer;\n\tif (zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS ||\n\t\tuncompressedSize >= MAX_32_BITS ||\n\t\tmaximumCompressedSize >= MAX_32_BITS) {\n\t\tif (zip64 === false || !keepOrder) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\");\n\tlet dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\");\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tif (dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = true;\n\t}\n\tif (dataDescriptor && dataDescriptorSignature === UNDEFINED_VALUE) {\n\t\tdataDescriptorSignature = false;\n\t}\n\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tpassword,\n\t\tlevel,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tmaximumEntrySize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray) + maximumCompressedSize;\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif (options.bufferedWrite || zipWriter.lockWriter || !dataDescriptor) {\n\t\t\tfileWriter = new BlobWriter();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tzipWriter.lockWriter = Promise.resolve();\n\t\t\treleaseLockWriter = () => delete zipWriter.lockWriter;\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable, diskNumber } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t}\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.close();\n\t\t\tlet blob = await fileWriter.getData();\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await setMissingInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64Info(fileEntry);\n\t\t} else if (fileEntry.offset >= MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.length;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\n\t}\n\n\tasync function requestLockWriter() {\n\t\tconst { lockWriter } = zipWriter;\n\t\tif (lockWriter) {\n\t\t\tawait lockWriter.then(() => delete zipWriter.lockWriter);\n\t\t\treturn requestLockWriter();\n\t\t} else {\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = resolve);\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tlevel,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\twritable.size += result.size;\n\t\tsignature = result.signature;\n\t\tuncompressedSize = reader.size = readable.size;\n\t\tcompressedSize = result.size;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tconst rawExtraFieldZip64 = zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array();\n\tif (reader) {\n\t\tsetEntryInfo({\n\t\t\tsignature,\n\t\t\trawExtraFieldZip64,\n\t\t\tcompressedSize,\n\t\t\tuncompressedSize,\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo\n\t\t}, options);\n\t}\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted,\n\t\tlength: getLength(localHeaderArray, dataDescriptorArray) + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean(password && getLength(password));\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\tconst extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 9, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 13, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tlet version = options.version || VERSION_DEFLATE;\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES\n\t};\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64);\n\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize));\n\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\tsetBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize));\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, 14, compressedSize);\n\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nasync function setMissingInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tconst arrayBuffer = await sliceAsArrayBuffer(entryData, 0, 26);\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64Info(fileEntry) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tsetBigUint64(rawExtraFieldZip64View, 20, BigInt(offset));\n\tsetUint32(rawExtraFieldZip64View, 28, diskNumberStart);\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, {\n\t\trawFilename,\n\t\trawExtraFieldZip64,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS\n\t}] of files) {\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraField);\n\t}\n\tlet zip64 = options.zip64 || zipWriter.options.zip64 || false;\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS) {\n\t\tif (options.zip64 === false || zipWriter.options.zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\textendedTimestamp,\n\t\t\tlastModDate,\n\t\t\tdiskNumberStart\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldExtendedTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, 0x1);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = new Uint8Array();\n\t\t}\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\toffset += 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait initStream(writer);\n\tawait writeData(writable, directoryArray);\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < getLength(endOfdirectoryArray)) {\n\t\tlastDiskNumber++;\n\t}\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tdiskNumber = MAX_16_BITS;\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nfunction sliceAsArrayBuffer(blob, start, end) {\n\tif (start || end) {\n\t\treturn blob.slice(start, end).arrayBuffer();\n\t} else {\n\t\treturn blob.arrayBuffer();\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\tawait streamWriter.ready;\n\twritable.size += getLength(array);\n\tawait streamWriter.write(array);\n\tstreamWriter.releaseLock();\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\n}\n\nfunction getOptionValue(zipWriter, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader\n} from \"./io.js\";\nimport {\n\tZipReader\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter\n} from \"./zip-writer.js\";\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\tid: fs.entries.length,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: 0\n\t\t});\n\t\tfs.entries.push(zipEntry);\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tmoveTo(target) {\n\t\t// deprecated\n\t\tconst zipEntry = this;\n\t\tzipEntry.fs.move(zipEntry, target);\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);\n\t\t\tconst readable = reader.readable;\n\t\t\treadable.size = zipEntry.uncompressedSize = reader.size;\n\t\t\tawait readable.pipeTo(writer.writable);\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\treplaceBlob(blob) {\n\t\tObject.assign(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\tObject.assign(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\tObject.assign(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\tObject.assign(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\treader: null\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\tObject.assign(this, {\n\t\t\tdata: null,\n\t\t\tReader: function () { return { readable }; },\n\t\t\tWriter: null,\n\t\t\treader: null\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\taddDirectory(name) {\n\t\treturn addChild(this, name, null, true);\n\t}\n\n\taddText(name, text) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter\n\t\t});\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter\n\t\t});\n\t}\n\n\taddUint8Array(name, array) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: function () { return { readable }; }\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn addFileSystemEntry(this, fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn addChild(this, name, params);\n\t}\n\n\tasync importBlob(blob, options = {}) {\n\t\tawait this.importZip(new BlobReader(blob), options);\n\t}\n\n\tasync importData64URI(dataURI, options = {}) {\n\t\tawait this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\tasync importUint8Array(array, options = {}) {\n\t\tawait this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\tasync importHttpContent(url, options = {}) {\n\t\tawait this.importZip(new HttpReader(url, options), options);\n\t}\n\n\tasync importReadable(readable, options = {}) {\n\t\tawait this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(\"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(\"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\tasync importZip(reader, options) {\n\t\tawait initStream(reader);\n\t\tconst zipReader = new ZipReader(reader, options);\n\t\tconst entries = await zipReader.getEntries();\n\t\tentries.forEach((entry) => {\n\t\t\tlet parent = this;\n\t\t\tconst path = entry.filename.split(\"/\");\n\t\t\tconst name = path.pop();\n\t\t\tpath.forEach(pathPart => parent = parent.getChildByName(pathPart) || new ZipDirectoryEntry(this.fs, pathPart, null, parent));\n\t\t\tif (!entry.directory) {\n\t\t\t\taddChild(parent, name, {\n\t\t\t\t\tdata: entry,\n\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tasync exportZip(writer, options) {\n\t\tconst zipEntry = this;\n\t\tawait Promise.all([initReaders(zipEntry), initStream(writer)]);\n\t\tconst zipWriter = new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], \"uncompressedSize\"), options);\n\t\tawait zipWriter.close();\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nclass FS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tthis.entries[entry.id] = null;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(\"Root directory cannot be moved\");\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tif (destination.getChildByName(entry.name)) {\n\t\t\t\t\t\t\tthrow new Error(\"Entry filename already exists\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Entry is a ancestor of target entry\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Target entry is not a directory\");\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.getChildByName(path[index]);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\taddDirectory(name) {\n\t\treturn this.root.addDirectory(name);\n\t}\n\n\taddText(name, text) {\n\t\treturn this.root.addText(name, text);\n\t}\n\n\taddBlob(name, blob) {\n\t\treturn this.root.addBlob(name, blob);\n\t}\n\n\taddData64URI(name, dataURI) {\n\t\treturn this.root.addData64URI(name, dataURI);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable) {\n\t\treturn this.root.addReadable(name, readable);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry);\n\t}\n\n\taddData(name, params) {\n\t\treturn this.root.addData(name, params);\n\t}\n\n\tasync importBlob(blob, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importBlob(blob, options);\n\t}\n\n\tasync importData64URI(dataURI, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importData64URI(dataURI, options);\n\t}\n\n\tasync importUint8Array(array, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importUint8Array(array, options);\n\t}\n\n\tasync importHttpContent(url, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importHttpContent(url, options);\n\t}\n\n\tasync importReadable(readable, options) {\n\t\tresetFS(this);\n\t\tawait this.root.importReadable(readable, options);\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n}\n\nconst fs = { FS, ZipDirectoryEntry, ZipFileEntry };\nexport { fs };\n\nfunction getTotalSize(entries, propertyName) {\n\tlet size = 0;\n\tentries.forEach(process);\n\treturn size;\n\n\tfunction process(entry) {\n\t\tsize += entry[propertyName];\n\t\tif (entry.children) {\n\t\t\tentry.children.forEach(process);\n\t\t}\n\t}\n}\n\nfunction getZipBlobReader(options) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tsuper.init();\n\t\t\tconst zipBlobReader = this;\n\t\t\tzipBlobReader.size = zipBlobReader.entry.uncompressedSize;\n\t\t\tconst data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options));\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nasync function initReaders(entry) {\n\tif (entry.children.length) {\n\t\tfor (const child of entry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tawait initReaders(child);\n\t\t\t} else {\n\t\t\t\tconst reader = child.reader = new child.Reader(child.data);\n\t\t\t\tawait initStream(reader);\n\t\t\t\tchild.uncompressedSize = reader.size;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction detach(entry) {\n\tconst children = entry.parent.children;\n\tchildren.forEach((child, index) => {\n\t\tif (child.id == entry.id) {\n\t\t\tchildren.splice(index, 1);\n\t\t}\n\t});\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options) {\n\tconst selectedEntry = entry;\n\tconst entryOffsets = new Map();\n\tawait process(zipWriter, entry);\n\n\tasync function process(zipWriter, entry) {\n\t\tawait exportChild();\n\n\t\tasync function exportChild() {\n\t\t\tif (options.bufferedWrite) {\n\t\t\t\tawait Promise.all(entry.children.map(processChild));\n\t\t\t} else {\n\t\t\t\tfor (const child of entry.children) {\n\t\t\t\t\tawait processChild(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync function processChild(child) {\n\t\t\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\t\t\tawait zipWriter.add(name, child.reader, Object.assign({\n\t\t\t\tdirectory: child.directory\n\t\t\t}, Object.assign({}, options, {\n\t\t\t\tonprogress: async indexProgress => {\n\t\t\t\t\tif (options.onprogress) {\n\t\t\t\t\t\tentryOffsets.set(name, indexProgress);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait options.onprogress(Array.from(entryOffsets.values()).reduce((previousValue, currentValue) => previousValue + currentValue), totalSize);\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t// ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})));\n\t\t\tawait process(zipWriter, child);\n\t\t}\n\t}\n}\n\nasync function addFileSystemEntry(zipEntry, fileSystemEntry) {\n\tif (fileSystemEntry.isDirectory) {\n\t\tconst entry = zipEntry.addDirectory(fileSystemEntry.name);\n\t\tawait addDirectory(entry, fileSystemEntry);\n\t\treturn entry;\n\t} else {\n\t\treturn new Promise((resolve, reject) => fileSystemEntry.file(file => resolve(zipEntry.addBlob(fileSystemEntry.name, file)), reject));\n\t}\n\n\tasync function addDirectory(zipEntry, fileEntry) {\n\t\tconst children = await getChildren(fileEntry);\n\t\tfor (const child of children) {\n\t\t\tif (child.isDirectory) {\n\t\t\t\tawait addDirectory(zipEntry.addDirectory(child.name), child);\n\t\t\t} else {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tchild.file(file => {\n\t\t\t\t\t\tconst childZipEntry = zipEntry.addBlob(child.name, file);\n\t\t\t\t\t\tchildZipEntry.uncompressedSize = file.size;\n\t\t\t\t\t\tresolve(childZipEntry);\n\t\t\t\t\t}, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getChildren(fileEntry) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet entries = [];\n\t\t\tif (fileEntry.isDirectory) {\n\t\t\t\treadEntries(fileEntry.createReader());\n\t\t\t}\n\t\t\tif (fileEntry.isFile) {\n\t\t\t\tresolve(entries);\n\t\t\t}\n\n\t\t\tfunction readEntries(directoryReader) {\n\t\t\t\tdirectoryReader.readEntries(temporaryEntries => {\n\t\t\t\t\tif (!temporaryEntries.length) {\n\t\t\t\t\t\tresolve(entries);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries = entries.concat(temporaryEntries);\n\t\t\t\t\t\treadEntries(directoryReader);\n\t\t\t\t\t}\n\t\t\t\t}, reject);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(\"Parent entry is not a directory\");\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { VaultContext } from '../VaultContext';\n\nexport interface CustomFileSystemAdapter {\n initReadingVault: () => Promise;\n\n readDirectory: (dir: string) => CustomFileSystemEntry[];\n readFile: (file: string) => Promise;\n exists: (path: string) => boolean;\n\n resolve: (path: string) => string;\n resolveInDir: (dir: string, name: string) => string;\n\n removeFile: (targetPath: string) => void;\n renameFile: (oldPath: string, newPath: string) => void;\n appendToResultFile: (targetPath: string, chunk: string) => void;\n flushResultsFromInitialProcessing: (targetPath: string) => void;\n\n initPostProcessingResultFile: (resultFilePath: string) => void;\n appendToPostProcessingFile: (targetPath: string, chunk: string) => void;\n /**\n * Return an iterable to read chunks from the already written file.\n *\n * Local the chunks are lines. Online the chunks are the same chunks that where written.\n */\n chunkIter: () => AsyncIterable;\n endPostProcessingFile: (targetPath: string) => void;\n}\n\nexport interface CustomFileSystemEntry {\n isDirectory: () => boolean;\n getName: () => string;\n}\n\n//TODO: add to adapter\nexport function basename(str: string) {\n return str.slice(str.lastIndexOf(SEPARATOR) + 1);\n}\n\n//TODO: add \"join\" method to adapter\n//in the browser I think its normalized to / but not on every os\nexport const SEPARATOR = '/';\n\nexport async function readConfig(\n context: VaultContext,\n configSubPath: string,\n checkResult: (res?: Result) => Result,\n): Promise {\n const configPath = context.vaultPath + '/.obsidian/' + configSubPath + '.json';\n let res;\n if (context.adapter.exists(configPath)) {\n res = JSON.parse(await context.adapter.readFile(configPath)) as Result;\n }\n return checkResult(res);\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { fs } from '@zip.js/zip.js';\nimport type { FS, ZipFileEntry, ZipEntry, ZipDirectoryEntry } from '@zip.js/zip.js';\n\nimport { CustomFileSystemAdapter, SEPARATOR } from './CustomFileSystemAdapter';\n\nexport class WebFileSystemAdapter implements CustomFileSystemAdapter {\n private zipFS: FS | undefined;\n private chunks: string[] = [];\n private chunkIndex = 0;\n\n constructor(private zipBlob: Blob) {}\n\n async initReadingVault() {\n this.zipFS = new fs.FS() as FS;\n await this.zipFS.importBlob(this.zipBlob);\n }\n\n readDirectory(dir: string) {\n const result = ((this.zipFS as FS).find(dir) as ZipEntry).children;\n return result.map((entry) => ({\n isDirectory: () => !!(entry as ZipDirectoryEntry).directory,\n getName: () => entry.getFullname(),\n }));\n }\n\n readFile(file: string) {\n return ((this.zipFS as FS).find(file) as ZipFileEntry).getText('utf-8');\n }\n\n exists(path: string) {\n return !!(this.zipFS as FS).find(path);\n }\n\n resolve(path: string) {\n return path;\n }\n\n resolveInDir(dir: string, name: string) {\n return dir + SEPARATOR + name;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n removeFile(_targetPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n renameFile(_oldPath: string, _newPath: string) {}\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushResultsFromInitialProcessing(_targetPath: string) {}\n\n appendToResultFile(_targetPath: string, chunk: string) {\n this.chunks.push(chunk);\n }\n\n appendToPostProcessingFile(_targetPath: string, chunk: string) {\n //on local we write into a different file, here we just overwrite the chunks\n this.chunks[this.chunkIndex] = chunk;\n this.chunkIndex++;\n }\n\n //not necessary for browser\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initPostProcessingResultFile(_path: string) {}\n\n chunkIter() {\n const chunks = this.chunks;\n let index = 0;\n const iterator = {\n [Symbol.asyncIterator]() {\n return {\n async next(): Promise<{ done: boolean; value?: string }> {\n if (index < chunks.length) {\n const chunk = chunks[index];\n index++;\n return { done: false, value: chunk };\n } else {\n return { done: true };\n }\n },\n };\n },\n };\n\n return iterator as AsyncIterable;\n }\n\n endPostProcessingFile(_targetPath: string) {\n (this.zipFS as FS).remove((this.zipFS as FS).children[0]);\n }\n\n getResult() {\n return this.chunks.join('');\n }\n}\n","export function idgenerator() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n}\n\nexport function getCodeIfCodeblock(name: string): string | undefined {\n if (name?.trim().startsWith('```') && name.endsWith('```')) {\n return name.substring(3, name.length - 3).substring(0, 100);\n }\n\n // Starts and ends with backticks, and no more backticks present. ie `hello world`\n if (name?.trim().startsWith('`') && name.endsWith('`') && name.trim().split('`').length === 3) {\n return name.substring(1, name.length - 1).substring(0, 100);\n }\n\n if (name.startsWith('<%J:```') && name.endsWith('```%>')) {\n return name.substring('<%J:```'.length, name.length - '```%>'.length).substring(0, 100);\n }\n return undefined;\n}\n\n// Checks if the supplied index is within a pair of single or triple backticks, like ```foo``` and `bar`\nexport function isIndexWithinBackticks(index: number, string?: string) {\n if (string && index !== undefined && index !== -1) {\n if ((string?.substring(0, index).split('```').length - 1) % 2 === 1) {\n return true;\n } else if ((string?.substring(0, index).split('`').length - 1) % 2 === 1) {\n return true;\n }\n }\n return false;\n}\n\n// Finds content between start and end tokens, like ((xxxxx))\nexport function findGroups(\n stringToLookIn: string,\n startToken: string,\n endToken: string,\n): { start: number; end: number; content: string }[] {\n const matches: { start: number; end: number; content: string }[] = [];\n\n for (let i = 0; i < stringToLookIn.length; i++) {\n if (stringToLookIn.substring(i, i + startToken.length) === startToken) {\n const start = i;\n i += startToken.length;\n\n while (stringToLookIn.substring(i, i + endToken.length) !== endToken && i < stringToLookIn.length) {\n i += 1;\n }\n\n const end = i;\n const content = stringToLookIn.substring(start + startToken.length, end);\n matches.push({\n start,\n end,\n content,\n });\n }\n }\n return matches;\n}\n\n/**\n *\n * //Finds links in a string '[[hello world]] [[Let's say [[hello world]]]].\n * @param text\n * @param skipIfNotDirect Skip links that are only included since they are inside other links\n */\nexport function getBracketLinks(text: string, skipIfNotDirect: boolean): string[] {\n const links: string[] = [];\n let state: 'normal' | 'seenOne' | 'seenOneOut' = 'normal';\n let counter = 0;\n const currentLinks: string[] = [];\n text.split('').forEach((char) => {\n currentLinks.forEach((x, i) => (currentLinks[i] += char));\n if (state === 'seenOne' && char !== '[') {\n state = 'normal';\n }\n if (state === 'seenOneOut' && char !== ']') {\n state = 'normal';\n }\n if (char === '[') {\n counter += 1;\n if (state === 'seenOne') {\n currentLinks.push('');\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOne';\n }\n }\n if (char === ']' && counter > 0) {\n counter -= 1;\n if (state === 'seenOneOut') {\n const l = currentLinks.pop();\n if (l) {\n if (!skipIfNotDirect || currentLinks.length === 0) {\n links.push(l.slice(0, -2));\n }\n }\n state = 'normal';\n } else if (state === 'normal') {\n state = 'seenOneOut';\n }\n\n if (counter === 0) {\n state = 'normal';\n }\n }\n });\n\n return links;\n}\n\n// Note: This is a very rudimentary enrichment. We should move to markdown at some point\nexport function enrichRoam(nodeContent: string) {\n if (!nodeContent) {\n return nodeContent;\n }\n\n while (nodeContent.endsWith('\\n') || nodeContent.endsWith('\\r') || nodeContent.endsWith('\\t')) {\n nodeContent = nodeContent.substring(0, nodeContent.length - 1);\n }\n\n if (nodeContent.includes('://')) {\n let parsedUpToIndex = 0;\n let restOfString = nodeContent;\n\n while (parsedUpToIndex !== -1 && parsedUpToIndex < nodeContent.length) {\n // look for link further down the string\n restOfString = nodeContent.substring(parsedUpToIndex);\n\n const nextLinkSplitPoint = restOfString.indexOf('://');\n if (nextLinkSplitPoint === -1) {\n break;\n }\n\n const tmp = restOfString.split('://');\n const protocol = tmp[0].split(' ').pop() || '';\n const restOfLink = tmp[1].split(' ').shift();\n const url = `${protocol}://${restOfLink}`;\n const anchor = `${url}`;\n\n const wasMarkLink = nodeContent[parsedUpToIndex + nextLinkSplitPoint - protocol.length] === '[';\n\n if (!protocol?.includes('href') && !protocol.includes(']') && !wasMarkLink) {\n try {\n nodeContent = nodeContent.replace(url, anchor);\n } catch (error) {\n console.error(error, nodeContent, url);\n }\n }\n\n parsedUpToIndex = parsedUpToIndex + nextLinkSplitPoint - (protocol?.length || 0) + anchor.length;\n }\n }\n\n nodeContent = replaceTokenWithHtml(nodeContent, '**', 'b');\n nodeContent = replaceTokenWithHtml(nodeContent, '__', 'i');\n nodeContent = replaceTokenWithHtml(nodeContent, '^^', 'mark');\n nodeContent = replaceTokenWithHtml(nodeContent, '~~', 'del');\n\n // quicker than regex\n if (nodeContent.includes('](')) {\n return nodeContent.replace(\n /\\[([^[\\]]*)\\]\\((.*?)\\)/g,\n (fullMatch: string | undefined, alias: string | undefined, link: string) => {\n if (link?.includes('://')) {\n return `${alias}`;\n }\n return fullMatch || '';\n },\n );\n }\n return nodeContent;\n}\n\n// Replaces a token like **foo** with foo\nexport function replaceTokenWithHtml(nodecontent: string, token: string, tagName: string): string {\n for (let i = 0; i < nodecontent.length; i++) {\n if (nodecontent.substring(i, i + token.length) === token) {\n const start = i;\n i += token.length;\n\n while (nodecontent.substring(i, i + token.length) !== token && i < nodecontent.length) {\n i += 1;\n }\n\n const end = i;\n const content = nodecontent.substring(start + 2, end);\n nodecontent = nodecontent.replace(`${token}${content}${token}`, `<${tagName}>${content}`);\n }\n }\n return nodecontent;\n}\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","import moment from 'moment';\n\nexport function dateStringToDateUID(displayName: string, dateFormat: string) {\n const date = moment(displayName, dateFormat, true);\n if (date.isValid()) {\n return date.format('MM-DD-YYYY');\n }\n return;\n}\n","import { basename } from '../filesystem/CustomFileSystemAdapter';\nimport { dateStringToDateUID } from './dateLinks';\n\nfunction isPath(searchStr: string) {\n return basename(searchStr) !== searchStr;\n}\n\n//using a mix of fileName and filePath in the links might lead to random results\n//usually obsidian changes the links properly\nexport class FileDescMap {\n nameWasCalledAsFile: string[] = [];\n pathMap = new Map();\n nameMap = new Map();\n\n //TODO: make a proper hook approach to catching dateUIDs\n /**\n * Should only be called once per file for this instance. Top level files need to be called first to disambiguate. A top level file will have path === name.\n */\n accessAsFile(fileName: string, filePath: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n //if this is a daly note, we need to track the re-formatted date as its filename because that is how it will be saved\n const dateUID = dateStringToDateUID(fileName, dailyNoteFormat);\n if (dateUID) {\n fileName = dateUID;\n }\n\n const pathMatch = this.pathMap.get(filePath);\n if (pathMatch) {\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, pathMatch);\n }\n return pathMatch;\n }\n const nameMatch = this.nameMap.get(fileName);\n //in this case this name-data comes from accessing it as a link first\n if (nameMatch && !this.nameWasCalledAsFile.includes(fileName)) {\n this.pathMap.set(filePath, nameMatch);\n this.nameWasCalledAsFile.push(fileName);\n return nameMatch;\n }\n\n const data = defaultData(dateUID);\n this.pathMap.set(filePath, data);\n if (!this.nameMap.get(fileName)) {\n this.nameMap.set(fileName, data);\n }\n this.nameWasCalledAsFile.push(fileName);\n return data;\n }\n\n accessAsLink(searchStr: string, defaultData: (dateUID?: string) => Data, dailyNoteFormat: string) {\n const dateUID = dateStringToDateUID(searchStr, dailyNoteFormat);\n if (dateUID) {\n searchStr = dateUID;\n }\n\n const match = this.findData(searchStr);\n if (match) {\n return match;\n }\n const isPathBool = isPath(searchStr);\n const data = defaultData(dateUID);\n if (isPathBool) {\n this.pathMap.set(searchStr, data);\n } else {\n this.nameMap.set(searchStr, data);\n }\n return data;\n }\n\n findData(searchStr: string) {\n return this.pathMap.get(searchStr) ?? this.nameMap.get(searchStr);\n }\n\n /**\n * Includes all data, even if it was only accessed via link.\n */\n getData() {\n return new Set([...this.pathMap.values(), ...this.nameMap.values()]);\n }\n}\n\nexport type FileDesc = { name?: string; path?: string };\n","import { TanaIntermediateSummary, TanaIntermediateAttribute } from '../../types/types';\nimport { idgenerator as randomGenerator } from '../../utils/utils';\nimport { FileDescMap } from './links/FileDescMap';\nimport { BlockLinkTracker } from './links/blockLinks';\nimport { SuperTagTracker } from './tanafeatures/supertags';\nimport { UidRequestType } from './links/internalLinks';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { HeadingTracker, HeadingDummyUidTracker } from './links/headingLinks';\nimport { CustomFileSystemAdapter, SEPARATOR } from './filesystem/CustomFileSystemAdapter';\n\nexport type UidTracker = FileDescMap;\n\ninterface UidData {\n type: UidRequestType;\n uid: string;\n obsidianLink: string;\n}\n\n/**\n * Contains all information that is used across the whole vault, like which UIDs have already been used.\n */\nexport interface VaultContext {\n summary: TanaIntermediateSummary;\n defaultLinkTracker: UidTracker;\n headingTracker: HeadingTracker;\n dummyHeadingLinkTracker: HeadingDummyUidTracker;\n blockLinkTracker: BlockLinkTracker;\n invalidLinks: { uid: string; link: string }[];\n superTagTracker: SuperTagTracker;\n attributes: TanaIntermediateAttribute[];\n vaultPath: string;\n idGenerator: IdGenerator;\n adapter: CustomFileSystemAdapter;\n dailyNoteFormat: string;\n}\n\nexport function incrementSummary(summary: TanaIntermediateSummary) {\n summary.totalNodes++;\n summary.leafNodes++;\n}\n\nexport function shiftFromLeafToTop(summary: TanaIntermediateSummary) {\n summary.leafNodes--;\n summary.topLevelNodes++;\n}\n\nexport function createVaultContext(\n vaultPath: string,\n fileSystemAdapter: CustomFileSystemAdapter,\n idGenerator: () => string = randomGenerator,\n dailyNoteFormat = 'YYYY-MM-DD',\n): VaultContext {\n if (vaultPath.endsWith(SEPARATOR)) {\n vaultPath = vaultPath.slice(0, -1);\n }\n vaultPath = fileSystemAdapter.resolve(vaultPath);\n\n return {\n summary: {\n leafNodes: 0,\n topLevelNodes: 0,\n totalNodes: 0,\n calendarNodes: 0,\n fields: 0,\n brokenRefs: 0,\n },\n adapter: fileSystemAdapter,\n idGenerator,\n vaultPath,\n defaultLinkTracker: new FileDescMap(),\n headingTracker: new FileDescMap(),\n dummyHeadingLinkTracker: new Map(),\n blockLinkTracker: new FileDescMap(),\n invalidLinks: [],\n superTagTracker: new Map(),\n attributes: [],\n dailyNoteFormat,\n };\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\n\nexport function untrackedUidRequest(context: VaultContext) {\n incrementSummary(context.summary);\n //folders / \"summary unlinked nodes\" / content-nodes get new UIDs always\n //because these UIDs either are not in the source or need to be connected later\n return context.idGenerator();\n}\n","import { VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\nimport { untrackedUidRequest } from './genericLinks';\n\nexport type BlockLinkTracker = FileDescMap>;\n\nexport enum BlockUidRequestType {\n LINK, //the request came from using the block ref\n BLOCK, //the request came from finding the block ref\n}\n\nexport interface BlockUidData {\n uid: string;\n obsidianLink: string;\n type: BlockUidRequestType;\n}\n\nexport function blockLinkUidRequestForUsing(link: string[], context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsLink(\n fileName,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.LINK,\n };\n }\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function blockLinkUidRequestForDefining(link: string[], filePath: string, context: VaultContext) {\n const fileName = link[0];\n const blockObsidianUid = link[1];\n const blockUidMap = context.blockLinkTracker.accessAsFile(\n fileName,\n filePath,\n () => {\n return new Map();\n },\n context.dailyNoteFormat,\n );\n let blockUidData = blockUidMap.get(blockObsidianUid);\n if (!blockUidData) {\n blockUidData = {\n uid: untrackedUidRequest(context),\n obsidianLink: link.join('#'),\n type: BlockUidRequestType.BLOCK,\n };\n }\n blockUidData.type = BlockUidRequestType.BLOCK;\n blockUidMap.set(blockObsidianUid, blockUidData);\n\n return blockUidData.uid;\n}\n\nexport function filterInvalidBlockLinks(tracker: BlockLinkTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n\n for (const fileBlockLinks of tracker.getData()) {\n for (const blockLink of fileBlockLinks.values()) {\n //if it has only been accessed via a link (e.g. [[file#^UID]]), it is not valid\n //because that means we didn't find it in \"file\"\n if (blockLink.type === BlockUidRequestType.LINK) {\n unlinkedNodes.push({ uid: blockLink.uid, link: blockLink.obsidianLink });\n }\n }\n }\n\n return unlinkedNodes;\n}\n","export function removeBlockId(content: string): [string, string | undefined] {\n let id;\n\n const cleanedContent = content\n .split('\\n')\n .map((line) => {\n const splitLine = line.split(' ');\n const lastEle = splitLine[splitLine.length - 1];\n if (lastEle.startsWith('^')) {\n //we take the last id, rest will be detected as invalid if they are used\n id = lastEle;\n return splitLine.slice(0, -1).join(' ');\n } else {\n return line;\n }\n })\n .join('\\n');\n\n return [cleanedContent, id];\n}\n","/**\n * Create a tree by converting source-nodes into a target format and inserting them into the hierarchy.\n */\nexport function createTree(\n targetRoot: Target,\n sourceRoot: Source,\n sources: Source[],\n isChildCheck: (a: Source, b: Source) => boolean,\n conversion: (a: Source) => Target,\n postInsertionHook?: (target: Target, source: Source) => void,\n) {\n const lastSourceNodes: Source[] = [sourceRoot];\n const lastTargetNodes = [targetRoot];\n for (const node of sources) {\n const childNode = conversion(node);\n insertNodeIntoHierarchy(childNode, node, lastSourceNodes, lastTargetNodes, isChildCheck);\n postInsertionHook?.(childNode, node);\n }\n}\n\nfunction insertNodeIntoHierarchy(\n targetNode: Target,\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n //once the non-parent nodes are removed, the next one is the parent\n removeNonParentNodes(sourceNode, lastSourceNodes, lastTargetNodes, isChildCheck);\n const lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n const lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n if (lastSourceNode && lastTargetNode) {\n lastTargetNode.children = lastTargetNode.children ?? [];\n lastTargetNode.children.push(targetNode);\n }\n lastSourceNodes.push(sourceNode);\n lastTargetNodes.push(targetNode);\n}\n\nfunction removeNonParentNodes(\n sourceNode: Source,\n lastSourceNodes: Source[],\n lastTargetNodes: Target[],\n isChildCheck: (a: Source, b: Source) => boolean,\n) {\n let lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n let lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n while (lastSourceNode && lastTargetNode && !isChildCheck(lastSourceNode, sourceNode)) {\n lastSourceNodes.pop();\n lastTargetNodes.pop();\n lastSourceNode = lastSourceNodes[lastSourceNodes.length - 1];\n lastTargetNode = lastTargetNodes[lastTargetNodes.length - 1];\n }\n}\n","/**\n * Traverses the given tree by following the content-path. Supports skipping levels in the path.\n *\n * The approach is depth first. In Obsidian higher nodes come always first - if the path is correct.\n * So if we have:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test4\n * ## test3\n *\n * And if we link [[...#test3]] the first test3 will be taken.\n * This is even true if the heading is lower than a later one:\n *\n * # test\n * ## test2\n * ### test3\n *\n * # test2\n *\n * [[...#test2]] links to the first test2.\n *\n */\nexport function traverseTreeDepthFirst(\n nodes: Node[], //this is primarily used for the Heading Tree and that does not necessarily have one root node, so we support multiples\n contentPath: string[],\n): Node | null {\n for (const node of nodes) {\n let pathLeft = contentPath.slice();\n if (node.content === contentPath[0]) {\n pathLeft = contentPath.slice(1);\n }\n if (pathLeft.length === 0) {\n return node;\n }\n if (node.children) {\n const res = traverseTreeDepthFirst(node.children, pathLeft);\n if (res) {\n return res;\n }\n }\n }\n return null;\n}\n","import { createTree } from '../utils/createTree';\nimport { traverseTreeDepthFirst } from '../utils/traverseTreeDepthFirst';\nimport { incrementSummary, VaultContext } from '../VaultContext';\nimport { FileDescMap } from './FileDescMap';\n\n//children are sorted like in file, important to detect valid heading links\nexport type HeadingNode = { uid: string; content: string; children?: HeadingNode[] };\n\nexport type HeadingData = { uid: string; content: string; level: number };\n\nexport interface HeadingUidData {\n uid: string;\n link: string[]; //without the fileName\n}\n\nexport type HeadingTracker = FileDescMap;\n/**\n * \n */\nexport type HeadingDummyUidTracker = Map;\n\n/**\n * A heading link is [[fileName#heading...]]\n *\n * File name might be file path.\n */\nexport function headingLinkUidRequestForUsing(cleanLink: string[], context: VaultContext) {\n const unchangedLink = cleanLink[0];\n const fileHeadingData = context.dummyHeadingLinkTracker.get(unchangedLink) ?? [];\n context.dummyHeadingLinkTracker.set(unchangedLink, fileHeadingData);\n //these \"UIDs\" are replaced and counted later\n //but for the tests it needs to be understood that the id generator is called more times than are valid ids in the end\n const uid = '!' + context.idGenerator() + '!';\n // const uid = context.idGenerator();\n fileHeadingData.push({ uid, link: cleanLink.slice(1) });\n return uid;\n}\n\n/**\n * Matches the dummy heading UIDs to the ones detected after we finished parsing the vault.\n * Returns the mapping and the dummy UIDs that could not be mapped.\n */\nexport function matchHeadingLinks(\n dummyHeadingLinks: HeadingDummyUidTracker,\n tracker: HeadingTracker,\n): [{ old: string; new: string }[], HeadingUidData[]] {\n const missingHeadingLinks = [];\n const validHeadingLinks = [];\n for (const [unchangedInlineLink, dummyHeadingUidData] of dummyHeadingLinks.entries()) {\n // const matchingFileDesc = tracker.findMatchingFile(unchangedInlineLink);\n const potentiallyMatchingNodes = tracker.findData(unchangedInlineLink);\n if (potentiallyMatchingNodes) {\n //we use a dummy because the tree function needs one root node\n const dummySourceRoot: HeadingData = { uid: 'DUMMY', content: '', level: -1 };\n const dummyTargetRoot: HeadingNode = { uid: 'DUMMY', content: '' };\n createTree(\n dummyTargetRoot,\n dummySourceRoot,\n potentiallyMatchingNodes,\n (potentialParent, potentialChild) => potentialParent.level < potentialChild.level,\n (data) => ({ uid: data.uid, content: data.content, children: undefined }),\n );\n const headingTree = dummyTargetRoot.children ?? [];\n\n for (const dummyData of dummyHeadingUidData) {\n const matchingHeadingNode = traverseTreeDepthFirst(headingTree, dummyData.link);\n if (matchingHeadingNode) {\n validHeadingLinks.push({ old: dummyData.uid, new: matchingHeadingNode.uid });\n } else {\n missingHeadingLinks.push(dummyData);\n }\n }\n } else {\n missingHeadingLinks.push(...dummyHeadingUidData);\n }\n }\n return [validHeadingLinks, missingHeadingLinks];\n}\n\n/**\n * Post-processes the created TIF File. This is necessary to support heading links, because heading links have a ton of edge cases.\n * E.g. heading#heading2#heading5 is valid.\n *\n * We replace the dummy heading link UIDs with the actual ones from where we found the heading.\n */\nexport async function postProcessTIFFIle(filePath: string, context: VaultContext) {\n const [validHeadingLinks, missingHeadingLinks] = matchHeadingLinks(\n context.dummyHeadingLinkTracker,\n context.headingTracker,\n );\n missingHeadingLinks.forEach((headingLink) => {\n context.invalidLinks.push({ uid: headingLink.uid, link: headingLink.link.join('#') });\n incrementSummary(context.summary);\n });\n\n const tempPath = filePath + '_TEMP';\n context.adapter.initPostProcessingResultFile(filePath);\n const regExes = validHeadingLinks.map((link) => ({\n old: new RegExp(link.old, 'g'),\n new: link.new,\n }));\n for await (const line of context.adapter.chunkIter()) {\n let updatedLine = line;\n regExes.forEach((regEx) => {\n updatedLine = updatedLine.replace(regEx.old, regEx.new);\n });\n await context.adapter.appendToPostProcessingFile(tempPath, updatedLine);\n }\n context.adapter.endPostProcessingFile(tempPath);\n context.adapter.removeFile(filePath);\n context.adapter.renameFile(tempPath, filePath);\n}\n","import { incrementSummary, VaultContext } from '../VaultContext';\nimport { removeBlockId } from '../markdown/blockIds';\nimport { blockLinkUidRequestForUsing, blockLinkUidRequestForDefining } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { headingLinkUidRequestForUsing } from './headingLinks';\nimport { getBracketLinks } from '../../../utils/utils';\nimport { TanaIntermediateNode } from '../../../types/types';\n\nexport enum UidRequestType {\n FILE,\n CONTENT,\n}\n\nexport enum LinkType {\n DEFAULT,\n HEADING,\n BLOCK,\n}\n\nexport function setUidsInNodeContent(tanaNode: TanaIntermediateNode, context: VaultContext) {\n const foundUIDs = requestUidsForAllLinks(tanaNode.name, context);\n\n if (foundUIDs.length > 0) {\n //using Set to filter out links that appear multiple times\n const refSet = new Set();\n if (!tanaNode.refs) {\n tanaNode.refs = [];\n }\n for (const [link, foundUid, result] of foundUIDs) {\n refSet.add(foundUid);\n tanaNode.name = tanaNode.name.replaceAll('[[' + link + ']]', result);\n }\n tanaNode.refs.push(...Array.from(refSet.values()));\n }\n}\n\nexport function requestUidsForAllLinks(content: string, context: VaultContext): [string, string, string][] {\n return getBracketLinks(content, true)\n .map((bracketLink): [string, string[]] => {\n return [bracketLink, bracketLink.split('|').map((s) => s.trim())];\n })\n .filter((arr) => arr[1][0] !== '' && arr[1][0] !== '#')\n .map((arr) => {\n const aliasArr = arr[1];\n //handling aliases\n const link = aliasArr[0];\n const alias = aliasArr[1];\n const foundUid = requestUidForLink(link, context);\n const result =\n alias !== undefined && alias.trim() !== ''\n ? '[' + alias.trim() + ']([[' + foundUid + ']])'\n : '[[' + foundUid + ']]';\n\n return [arr[0], foundUid, result];\n });\n}\n\nexport function cleanUpLink(link: string) {\n //Obsidian ignores whitespace in many places, too many other edge cases to handle but this is the least we can do\n return link\n .split('#')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n}\n\n/**\n *\n * @param link the link split by \"#\" and cleaned.\n */\nexport function detectLinkType(link: string[]) {\n if (link.length === 2 && link[1].startsWith('^')) {\n return LinkType.BLOCK;\n }\n\n if (link.length > 1) {\n return LinkType.HEADING;\n }\n\n return LinkType.DEFAULT;\n}\n\nexport function requestUidForLink(obsidianLink: string, context: VaultContext) {\n const cleanLink = cleanUpLink(obsidianLink);\n const linkType = detectLinkType(cleanLink);\n if (cleanLink[0] === undefined) {\n console.log('Parsed undefined clean link. Original link: ' + obsidianLink + '.', 'Type of link: ' + linkType);\n }\n switch (linkType) {\n case LinkType.DEFAULT:\n return standardLinkUidRequest(cleanLink, context);\n case LinkType.BLOCK:\n return blockLinkUidRequestForUsing(cleanLink, context);\n case LinkType.HEADING:\n return headingLinkUidRequestForUsing(cleanLink, context);\n default:\n throw 'Invalid link type detected: ' + cleanLink;\n }\n}\n\nfunction standardLinkUidRequest(link: string[], context: VaultContext) {\n const obsidianLink = link[0];\n const uidData = context.defaultLinkTracker.accessAsLink(\n obsidianLink,\n (dateUID) => {\n incrementSummary(context.summary);\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.CONTENT };\n },\n context.dailyNoteFormat,\n );\n return uidData.uid;\n}\n\n/**\n * Removes Obsidian-generated block-UIDs if they exists, returns the valid uid and the cleaned content.\n * @returns [uid, cleanedContent]\n */\nexport function requestUidForContentNode(fileName: string, filePath: string, content: string, context: VaultContext) {\n const [cleanedContent, id] = removeBlockId(content);\n if (id) {\n //found the id, now define the UID\n return [blockLinkUidRequestForDefining([fileName, id], filePath, context), cleanedContent];\n } else {\n return [untrackedUidRequest(context), content];\n }\n}\n\nexport function requestUidForFile(fileName: string, filePath: string, context: VaultContext) {\n const obsidianLink = fileName.trim();\n const uidData = context.defaultLinkTracker.accessAsFile(\n obsidianLink,\n filePath,\n (dateUID) => {\n incrementSummary(context.summary);\n //if this is a daily note, we need to use its new name as the UID\n //TODO: we only need the UID here?\n const uid = dateUID ?? context.idGenerator();\n return { uid, obsidianLink, type: UidRequestType.FILE };\n },\n context.dailyNoteFormat,\n );\n uidData.type = UidRequestType.FILE;\n\n return uidData.uid;\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { filterInvalidBlockLinks } from './blockLinks';\nimport { untrackedUidRequest } from './genericLinks';\nimport { shiftFromLeafToTop, UidTracker, VaultContext } from '../VaultContext';\nimport { UidRequestType } from './internalLinks';\n\nexport function filterInvalidContentLinks(tracker: UidTracker) {\n const unlinkedNodes: { uid: string; link: string }[] = [];\n for (const node of tracker.getData()) {\n //at the end every uidData that has been only accessed from content (so inside the markdown file)\n //has no matching file node and is therefore unlinked\n //otherwise during the creation of the file node, it would have accessed the same Uid\n if (node.type === UidRequestType.CONTENT) {\n unlinkedNodes.push({ uid: node.uid, link: node.obsidianLink });\n }\n }\n return unlinkedNodes;\n}\n\nexport function getAllInvalidLinks(context: VaultContext) {\n return [\n ...context.invalidLinks,\n ...filterInvalidContentLinks(context.defaultLinkTracker),\n ...filterInvalidBlockLinks(context.blockLinkTracker),\n ];\n}\n\nexport function createUnlinkedTanaNodes(\n importName: string,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode | null {\n const unlinkedNodes = getAllInvalidLinks(context)\n .sort((a, b) => a.link.localeCompare(b.link))\n .map((node) => ({\n uid: node.uid,\n name: node.link,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n }));\n\n if (unlinkedNodes.length === 0) {\n return null;\n }\n\n const rootNodeName = 'Missing Nodes for ' + importName;\n const rootNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: rootNodeName,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n };\n shiftFromLeafToTop(context.summary);\n\n rootNode.children = unlinkedNodes;\n\n return rootNode;\n}\n","export function isEmptySpace(char: string) {\n //we count tab as one empty space\n return char === ' ' || char === '\\t';\n}\n\nexport function countEmptySpace(content: string, curPosition: number): number {\n let count = 0;\n while (isEmptySpace(content[curPosition + count])) {\n count++;\n }\n return count;\n}\n\n/**\n * Backtracks starting from the current position and finds the first position that is not empty space.\n * Returns the position of the last empty space.\n */\nexport function findFirstEmptySpacePosBackwards(content: string, curPosition: number) {\n let res = curPosition;\n let curChar = content[curPosition];\n while (isEmptySpace(curChar)) {\n res--;\n curChar = content[res];\n }\n\n return res + 1;\n}\n","export function nextNewLine(content: string, curPosition: number): number {\n let count = 0;\n while (!isNewLine(content[curPosition + count])) {\n count++;\n }\n return curPosition + count;\n}\n\nexport function lastPositionIsNewline(content: string, curPosition: number) {\n const lastPosChar = content[curPosition - 1];\n return isNewLine(lastPosChar);\n}\n\nexport function isNewLine(char: string | undefined) {\n //end of file is also counted as newline for simplicity\n return char === undefined || char === '\\n';\n}\n","import { countEmptySpace, findFirstEmptySpacePosBackwards } from '../markdown/emptySpace';\nimport { HierarchyType } from './markdownNodes';\nimport { Hierarchy } from './markdownNodes';\nimport { isNewLine, nextNewLine } from '../markdown/newline';\n\nfunction isNumberedBullet(content: string, pos: number) {\n const char = content[pos];\n const secondChar = content[pos + 1];\n return !isNaN(parseInt(char)) && (secondChar === '.' || secondChar === ')') && content[pos + 2] === ' ';\n}\n\nexport function detectBulletHierarchy(content: string, currentPos: number): null | Hierarchy {\n let isBulletStart = true;\n //skip possible empty space at the start of nodes\n const pos = currentPos + countEmptySpace(content, currentPos);\n\n const char = content[pos];\n const secondChar = content[pos + 1];\n //only real empty string is valid for bullet\n if (!((char === '*' || char === '-') && secondChar === ' ')) {\n isBulletStart = isNumberedBullet(content, pos);\n }\n\n //bullet nodes always have \\n( *) in front of them or are at the start of the file\n //so need to backtrack empty space to verify\n const nonEmptyPos = findFirstEmptySpacePosBackwards(content, pos - 1) - 1;\n const nonEmptyChar = content[nonEmptyPos];\n if (!isNewLine(nonEmptyChar)) {\n return null;\n }\n //for nodes we need a precise level === empty space, so we can detect multi line node content\n return isBulletStart ? { type: HierarchyType.BULLET, level: pos - nonEmptyPos - 1 } : null;\n}\n\nexport function findBulletSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n let posOfBulletText = curPosition + hierarchy.level;\n if (isNumberedBullet(content, posOfBulletText)) {\n //in case of numbered bullet, we keep the symbol\n return posOfBulletText;\n }\n posOfBulletText += 1 + 1; //bullet symbol and empty space after that\n\n const emptySpaceInBulletText = countEmptySpace(content, posOfBulletText);\n\n return posOfBulletText + emptySpaceInBulletText;\n}\n\nexport function findBulletSliceEndPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n //we can skip the empty space before the bullet, the bullet symbol and the empty space after the bullet symbol\n let endPosition = nextNewLine(content, curPosition + hierarchy.level + 1 + 1);\n let char = content[endPosition];\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n //new lines that start with the number of empty spaces of the level+1 are considered part of the node\n\n //but also if they are just equal to the hierachy-level:\n //e.g.\n //- Text1\n // - Text2\n // Text3\n //Text4\n //\"Text3\" is still part of Text2 because Obsidian allows that!\n //but not \"Text4\" because its on the zero level\n const emptySpaces = countEmptySpace(content, endPosition + 1);\n if (\n emptySpaces > 0 &&\n (emptySpaces == hierarchy.level + 2 || emptySpaces == hierarchy.level) &&\n !detectBulletHierarchy(content, endPosition + 1 + emptySpaces)\n ) {\n endPosition = nextNewLine(content, endPosition + 1);\n char = content[endPosition];\n } else {\n return endPosition;\n }\n if (char === undefined) {\n return endPosition;\n }\n }\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType, MarkdownNode } from './markdownNodes';\n\nexport function findCodeBlockSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findCodeBlockSliceEndPosition(curPosition: number, hierarchy: Hierarchy) {\n return curPosition + hierarchy.level;\n}\n\n/**\n * Codeblocks are a special case because they are fenced. So we need a special post processing approach.\n */\nexport function postProcessCodeBlock(obsidianNode: MarkdownNode) {\n //cutting off ``` + codeLanguage\n //might have empty space after codeLanguage\n const startingPos = 3 + (obsidianNode.codeLanguage ?? '').length;\n const emptySpace = countEmptySpace(obsidianNode.content, startingPos);\n //cutting newline at the start, cutting ``` + possibly newline at the end\n return obsidianNode.content\n .trimEnd()\n .slice(startingPos + emptySpace + 1, -3)\n .trimEnd();\n}\n\nexport function detectCodeBlockHierarchy(content: string, curPosition: number): Hierarchy | null {\n if (!lastPositionIsNewline(content, curPosition)) {\n return null;\n }\n if ([content[curPosition], content[curPosition + 1], content[curPosition + 2]].every((val) => val === '`')) {\n const newLinePos = nextNewLine(content, curPosition + 3);\n const codeLanguage = content.slice(curPosition + 3, newLinePos).trimEnd();\n //check that only one word after the `s\n if (codeLanguage.includes(' ')) {\n return null;\n }\n\n let pos = newLinePos + 1;\n let char1 = content[pos];\n let char2 = content[pos + 1];\n let char3 = content[pos + 2];\n while ([char1, char2, char3].every((val) => val !== undefined) && [char1, char2, char3].join('') !== '```') {\n pos++;\n char1 = content[pos];\n char2 = content[pos + 1];\n char3 = content[pos + 2];\n }\n if ([char1, char2, char3].some((val) => val === undefined)) {\n return null;\n }\n const secondNewLinePos = nextNewLine(content, pos + 3);\n const secondLine = content.slice(pos + 3, secondNewLinePos).trim();\n //no text after the closing code block fence allowed\n if (secondLine !== '') {\n return null;\n }\n return {\n type: HierarchyType.CODEBLOCK,\n //might end at the end of file or at a newline\n level: secondNewLinePos - curPosition + (content[secondNewLinePos] === '\\n' ? 1 : 0),\n codeLanguage: codeLanguage !== '' ? codeLanguage : undefined,\n };\n }\n return null;\n}\n","import { isEmptySpace } from '../markdown/emptySpace';\nimport { nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function findDataViewAttributeSliceStartPosition(curPosition: number) {\n return curPosition;\n}\n\nexport function findDataViewSliceEndPosition(content: string, curPosition: number) {\n return nextNewLine(content, curPosition);\n}\n\nexport function detectDataViewAttributeHierarchy(content: string, curPosition: number): Hierarchy | null {\n //TODO: dont need to search newline again later\n //TODO: think through if this approach makes sense in general, now for codeblocks and for dataviewattributes - inline attributes might need something else\n const newline = nextNewLine(content, curPosition);\n const line = content.slice(curPosition, newline);\n if (isSoloDataViewAttribute(line)) {\n return { type: HierarchyType.DATAVIEWATTRIBUTE, level: 0 };\n }\n return null;\n}\n\nexport function isSoloDataViewAttribute(line: string) {\n const splitName = line.split('::');\n return (\n splitName.length === 2 &&\n splitName[0].trim() === splitName[0] &&\n splitName[0] !== '' &&\n splitName[1] !== '' &&\n splitName[1] !== ' ' &&\n isEmptySpace(splitName[1][0])\n );\n}\n","import { countEmptySpace } from '../markdown/emptySpace';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { Hierarchy, HierarchyType } from './markdownNodes';\n\nexport function detectHeadingHierarchy(content: string, pos: number): null | Hierarchy {\n if (!lastPositionIsNewline(content, pos)) {\n return null;\n }\n const count = countHeadingSymbols(content, pos);\n if (!(count > 0 && content[pos + count] === ' ')) {\n return null;\n }\n\n return { type: HierarchyType.HEADING, level: count };\n}\n\nfunction countHeadingSymbols(content: string, pos: number) {\n let curPos = pos;\n let count = 0;\n while (content[curPos] === '#') {\n curPos++;\n count++;\n }\n\n return count;\n}\n\nexport function findHeadingSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy) {\n const posOfHeadingText = curPosition + hierarchy.level + 1; //skip heading symbols and \" \" between heading symbols and text\n const emptySpaceInHeadingText = countEmptySpace(content, posOfHeadingText);\n\n return posOfHeadingText + emptySpaceInHeadingText;\n}\n\nexport function findHeadingSliceEndPosition(content: string, headingTextPos: number, hierarchy: Hierarchy) {\n //for the search we can skip the heading symbols and the empty space between heading symbols and heading text\n return nextNewLine(content, headingTextPos + hierarchy.level + 1);\n}\n","import { detectBulletHierarchy } from './bullets';\nimport { HierarchyType } from './markdownNodes';\nimport { detectHeadingHierarchy } from './headings';\nimport { Hierarchy } from './markdownNodes';\nimport { lastPositionIsNewline, nextNewLine } from '../markdown/newline';\nimport { detectCodeBlockHierarchy } from './codeblocks';\nimport { detectDataViewAttributeHierarchy } from './dataviewattributes';\n\nexport function findParagraphSliceStartPosition(curPosition: number) {\n //we don't trim the start\n return curPosition;\n}\n\nexport function findParagraphSliceEndPosition(content: string, curPosition: number): [number] | [number, Hierarchy] {\n let endPosition = nextNewLine(content, curPosition);\n let char = content[endPosition];\n let lastChar = char;\n endPosition++;\n char = content[endPosition];\n //paragraphs end with double newlines or a new hierarchy\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (char === undefined) {\n return [endPosition];\n } else if (char === '\\n' && lastChar === '\\n') {\n return [endPosition - 1];\n } else {\n const hierarchy = newTypeOfHierarchyStarts(content, endPosition);\n if (hierarchy) {\n return [endPosition - 1, hierarchy];\n }\n }\n //TODO: jump to newline?\n lastChar = char;\n endPosition++;\n char = content[endPosition];\n }\n}\n\n//special case, where we want an extra bullet for block quotes\n//TODO: same for code blocks + code block endings\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction detectBlockQuoteHierarchy(content: string, pos: number): Hierarchy | null {\n if (lastPositionIsNewline(content, pos) && content[pos] === '>' && content[pos + 1] === ' ') {\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n }\n return null;\n}\n\nfunction newTypeOfHierarchyStarts(content: string, pos: number): Hierarchy | null {\n let hierarchy: Hierarchy | null = detectHeadingHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectDataViewAttributeHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n hierarchy = detectBulletHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: its not enough to just cut here, we actually need to cut the whole block quote just like the code block\n // hierarchy = detectBlockQuoteHierarchy(content, pos);\n // if (hierarchy) {\n // return hierarchy;\n // }\n hierarchy = detectCodeBlockHierarchy(content, pos);\n if (hierarchy) {\n return hierarchy;\n }\n\n return null;\n}\n","import { detectBulletHierarchy, findBulletSliceEndPosition, findBulletSliceStartPosition } from './bullets';\nimport { detectCodeBlockHierarchy, findCodeBlockSliceEndPosition, findCodeBlockSliceStartPosition } from './codeblocks';\nimport {\n detectDataViewAttributeHierarchy,\n findDataViewAttributeSliceStartPosition,\n findDataViewSliceEndPosition,\n} from './dataviewattributes';\nimport { detectHeadingHierarchy, findHeadingSliceEndPosition, findHeadingSliceStartPosition } from './headings';\nimport { findParagraphSliceEndPosition, findParagraphSliceStartPosition } from './paragraphs';\n\n//these types are just needed for splitting and for creating the correct hierarchy\nexport enum HierarchyType {\n ROOT = 'Root',\n HEADING = 'Heading',\n BULLET = 'Bullet Node',\n PARAGRAPH = 'Paragraph',\n CODEBLOCK = 'Code Block',\n //we add them as extra hierarchy type to distinguish them from the PARAGRAPH, however, they might also show up in the bullet\n DATAVIEWATTRIBUTE = 'Data View Attribute', //TODO: add some proper tests\n}\n\nexport interface MarkdownNode {\n content: string;\n type: HierarchyType;\n //lower = higher in the hierarchy\n //for bullet nodes also used as a measure of empty space\n //for heading nodes this is the number of #'s\n //for code blocks this is the length of the block in chars\n level: number;\n codeLanguage?: string;\n}\n\nexport type Hierarchy = Omit;\n\nexport function extractMarkdownNodes(content: string, startPosition = 0): MarkdownNode[] {\n const nodeDescs: MarkdownNode[] = [];\n\n for (let index = startPosition; index < content.length; index++) {\n const element = content[index];\n if (element == '\\n') {\n continue;\n }\n\n let [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, index);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n //sometimes a nextHierarchy is already detected, so we need to take that into account for speeds sake\n while (nextHierarchy) {\n while (content[slicePosition] === '\\n') {\n slicePosition++;\n }\n [node, slicePosition, nextHierarchy] = extractMarkdownNode(content, slicePosition);\n if (node.content.trim() !== '') {\n nodeDescs.push(node);\n }\n }\n\n //-1 because we dont want to assume that the char at the slice position is irrelevant\n index = slicePosition - 1;\n }\n\n return nodeDescs;\n}\n/**\n * @returns [MarkdownNode, slicePosition, possibly nextHierarchy]\n */\nfunction extractMarkdownNode(\n content: string,\n curPosition: number,\n): [MarkdownNode, number, undefined] | [MarkdownNode, number, Hierarchy] {\n const hierarchy: Hierarchy = detectNextHierarchy(content, curPosition);\n const startPos = findSliceStartPosition(content, curPosition, hierarchy);\n const [slicePos, nextHierarchy] = findSliceEndPosition(content, curPosition, hierarchy);\n\n return [\n {\n ...hierarchy,\n //we only trim the end because the beginning might hold meaning\n content: content.slice(startPos, slicePos).trimEnd(),\n },\n slicePos,\n nextHierarchy,\n ];\n}\n\n/**\n * If we know that a hierarchy ends, here we can detect the next one.\n */\nexport function detectNextHierarchy(content: string, curPosition: number): Hierarchy {\n let hierarchy = detectHeadingHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n } else {\n hierarchy = detectBulletHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n hierarchy = detectCodeBlockHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n //TODO: I need to paste this code to many times\n hierarchy = detectDataViewAttributeHierarchy(content, curPosition);\n if (hierarchy) {\n return hierarchy;\n }\n }\n return { type: HierarchyType.PARAGRAPH, level: 0 };\n}\n\n/**\n * Finds the position where to start slicing the current hierarchy. Might apply trimming.\n */\nfunction findSliceStartPosition(content: string, curPosition: number, hierarchy: Hierarchy): number {\n //the current position is never \\n because we skip that\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return findHeadingSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.BULLET:\n return findBulletSliceStartPosition(content, curPosition, hierarchy);\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceStartPosition(curPosition);\n case HierarchyType.CODEBLOCK:\n return findCodeBlockSliceStartPosition(curPosition);\n case HierarchyType.DATAVIEWATTRIBUTE:\n return findDataViewAttributeSliceStartPosition(curPosition);\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\n/**\n * Finds the position where to end slicing the current hierarchy. Does not apply trimming, so that we can skip the search to this position.\n */\nfunction findSliceEndPosition(\n content: string,\n curPosition: number,\n hierarchy: Hierarchy,\n): [number] | [number, Hierarchy] {\n switch (hierarchy.type) {\n case HierarchyType.HEADING:\n return [findHeadingSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.BULLET:\n return [findBulletSliceEndPosition(content, curPosition, hierarchy)];\n case HierarchyType.PARAGRAPH:\n return findParagraphSliceEndPosition(content, curPosition);\n case HierarchyType.CODEBLOCK:\n return [findCodeBlockSliceEndPosition(curPosition, hierarchy)];\n case HierarchyType.DATAVIEWATTRIBUTE:\n return [findDataViewSliceEndPosition(content, curPosition)];\n default:\n throw 'Unsupported HierarchyType detected: ' + hierarchy;\n }\n}\n\nexport function isMarkdownNodeChild(potentialParent: MarkdownNode, potentialChild: MarkdownNode) {\n if (potentialParent.type === HierarchyType.ROOT) {\n return true;\n }\n\n //HEADING is always a parent of non-headings\n if (potentialParent.type === HierarchyType.HEADING && potentialChild.type !== HierarchyType.HEADING) {\n return true;\n }\n\n //PARAGRAPH can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.PARAGRAPH || potentialChild.type === HierarchyType.PARAGRAPH) {\n return false;\n }\n\n //CODEBLOCK can only be child of HEADING and can not be a parent\n if (potentialParent.type === HierarchyType.CODEBLOCK || potentialChild.type === HierarchyType.CODEBLOCK) {\n return false;\n }\n\n //DATAVIEWATTRIBUTE can only be child of DATAVIEWATTRIBUTE and can not be a parent\n if (\n potentialParent.type === HierarchyType.DATAVIEWATTRIBUTE ||\n potentialChild.type === HierarchyType.DATAVIEWATTRIBUTE\n ) {\n return false;\n }\n\n if (potentialParent.type === potentialChild.type) {\n return potentialParent.level < potentialChild.level;\n }\n\n return false;\n}\n","// eslint is just wrong here\n// eslint-disable-next-line no-useless-escape\nconst tagRegex = /(?:\\s|^)(#([^\\[\\]]+?))(?:(?=\\s)|$)/g;\n\nconst nonDigit = new RegExp('\\\\D');\n\n// https://help.obsidian.md/How+to/Working+with+tags\n// only - _ and / are allowed\n// this is a brute force approach, because its not trivial to detect invalid tags in other languages\n// (can not use \\w for example because e.g. korean characters are excluded)\nconst disallowedSymbols = new Set([\n '#',\n '!',\n '{',\n '}',\n '(',\n ')',\n '?',\n '$',\n '%',\n '&',\n '\"',\n \"'\",\n '<',\n '>',\n '\\\\',\n '*',\n '`',\n '[',\n ']',\n ':',\n ',',\n ';',\n '~',\n '=',\n '§',\n '.',\n '°',\n '^',\n]);\n\nexport function validTag(tag: string) {\n //currently whitespace is also detected as part of the tag\n tag = tag.trim();\n let char = tag[0];\n //sanity check\n if (char !== '#') {\n return false;\n }\n\n let foundNonDigit = false;\n\n for (let index = 1; index < tag.length; index++) {\n char = tag[index];\n if (char.match(nonDigit)) {\n foundNonDigit = true;\n }\n\n if (disallowedSymbols.has(char)) {\n return false;\n }\n }\n\n return foundNonDigit;\n}\n\nexport function detectTags(content: string) {\n return content.match(tagRegex)?.filter((tag) => validTag(tag));\n}\n\nexport function removeTagsFromEnd(content: string, tags: string[]) {\n let curContent = content;\n let globalRemovedTag = false;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let removedTag = false;\n for (const tag of tags) {\n if (curContent.endsWith(tag)) {\n curContent = curContent.slice(0, -tag.length);\n removedTag = true;\n globalRemovedTag = true;\n }\n }\n\n if (!removedTag) {\n break;\n }\n }\n\n //removing empty space at the end, because the tag detection only detects leading empty space\n if (globalRemovedTag) {\n curContent = curContent.trimEnd();\n }\n\n return curContent;\n}\n\nexport function cleanUpTag(tag: string) {\n return tag.trim().slice(1); //remove the #\n}\n","import { TanaIntermediateSupertag } from '../../../types/types';\nimport { cleanUpTag } from '../markdown/tags';\nimport { IdGenerator } from '../utils/IdGenerator';\n\nexport type SuperTagTracker = Map;\n\n/**\n * Returns distinct matching super tag UIDs.\n */\nexport function superTagUidRequests(\n tags: string[],\n tracker: SuperTagTracker,\n idGenerator: IdGenerator,\n clean?: boolean,\n) {\n return Array.from(new Set(tags.map((tag) => superTagUidRequest(tag, tracker, idGenerator, clean))));\n}\n\nfunction superTagUidRequest(tag: string, tracker: SuperTagTracker, idGenerator: IdGenerator, clean?: boolean) {\n let cleanTag = tag;\n if (clean) {\n cleanTag = cleanUpTag(tag);\n }\n\n let uid = tracker.get(cleanTag);\n if (uid === undefined) {\n uid = idGenerator();\n tracker.set(cleanTag, uid);\n }\n return uid;\n}\n\nexport function createSuperTagObjects(tracker: SuperTagTracker): TanaIntermediateSupertag[] {\n return Array.from(tracker.entries()).map((entry) => ({ name: entry[0], uid: entry[1] }));\n}\n","import { HierarchyType } from '../hierarchy/markdownNodes';\n\nfunction detectTodoType(content: string) {\n if (content.startsWith('[ ] ')) {\n return 'todo';\n }\n if (content.startsWith('[x] ') || content.startsWith('[X] ')) {\n return 'done';\n }\n\n return undefined;\n}\n\nexport function removeTodo(content: string, hierarchyType?: HierarchyType): [string, 'todo' | 'done'] | null {\n if (hierarchyType === HierarchyType.BULLET) {\n const type = detectTodoType(content);\n if (type) {\n return [content.slice('[ ] '.length), type];\n }\n }\n return null;\n}\n","/**\n *\n * Extracts an image-link alt text and link by checking for the \\!\\[...\\]\\(http://...|https://...\\) pattern manually.\n *\n * Supports also linked images \\[\\!\\[...\\]\\(https://...)\\]\\(https:://...\\). But takes the last URL as the final URL.\n *\n * @returns array of [alt text, url, next position, old string to replace]\n */\nexport function extractImageLinks(content: string) {\n const imageData: [string, string, number, string][] = [];\n let foundData = extractImageLink(content, 0);\n while (foundData !== null) {\n let nextIndex;\n if (Array.isArray(foundData)) {\n imageData.push(foundData);\n nextIndex = foundData[2];\n } else {\n nextIndex = foundData;\n }\n foundData = extractImageLink(content, nextIndex);\n }\n\n return imageData;\n}\n\nfunction extractImageLink(content: string, startPosition: number): [string, string, number, string] | number | null {\n let lastFoundImageSignifier;\n let altText = '';\n let url = '';\n\n //I will atone for my sins, but you are not making me try to do this with RegEx\n for (let index = startPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n return index + 1;\n }\n if (\n !lastFoundImageSignifier &&\n char === '[' &&\n //here we skip obvious false positives - e.g. \"[[\" links, which had tanked the performance earlier\n content[index + 1] !== undefined &&\n content[index + 1] === '!'\n ) {\n const res = tryToExtractLinkedImageLink(content, index);\n if (res !== null) {\n return res;\n }\n continue;\n }\n\n if (!lastFoundImageSignifier && char === '!') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '!' && char === '[') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char !== ']') {\n altText += char;\n continue;\n }\n if (lastFoundImageSignifier === '[' && char === ']') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === ']' && char !== '(') {\n return index + 1;\n }\n if (lastFoundImageSignifier === ']' && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char !== ')') {\n url += char;\n continue;\n }\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (url.startsWith('http://') || url.startsWith('https://')) {\n return [altText, removeTitle(url), index + 1, '![' + altText + '](' + url + ')'];\n } else {\n return index + 1;\n }\n }\n }\n\n return null;\n}\n\n/**\n * If we detect the possible start of a linked image \"[\", we try to extract it.\n */\nfunction tryToExtractLinkedImageLink(\n content: string,\n startPosition: number,\n): [string, string, number, string] | number | null {\n //in Markdown this is called a linked image (so an image with a URL that you can click on)\n //a linked image has a normal image link embedded\n const embeddedImage = extractImageLink(content, startPosition + 1);\n if (Array.isArray(embeddedImage)) {\n const endPosition = embeddedImage[2];\n const expectedEndPositon = startPosition + 1 + embeddedImage[3].length;\n if (endPosition !== expectedEndPositon) {\n //in this case we found another image, but not an embedded one\n //dont need to do work twice, so can use this\n //will clean this up when the Muse visits me again\n return embeddedImage;\n }\n\n let lastFoundImageSignifier;\n let endUrl = ''; //the URL at the end of linked image, so the second one\n for (let index = endPosition; index < content.length; index++) {\n const char = content[index];\n if (char === '\\n') {\n //not optimal, because the algo will traverse until this newline again\n //but otherwise would need to extract the image again\n return embeddedImage;\n }\n if (!lastFoundImageSignifier && char === '(') {\n lastFoundImageSignifier = char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char !== ')') {\n endUrl += char;\n continue;\n }\n\n if (lastFoundImageSignifier === '(' && char === ')') {\n if (endUrl.startsWith('http://') || endUrl.startsWith('https://')) {\n return [\n embeddedImage[0],\n removeTitle(endUrl),\n index + 1,\n '[![' + embeddedImage[0] + '](' + embeddedImage[1] + ')](' + endUrl + ')',\n ];\n } else {\n return embeddedImage;\n }\n }\n }\n }\n return embeddedImage;\n}\n\nfunction removeTitle(url: string) {\n return url.split(' ')[0].split('\\t')[0];\n}\n","import { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { extractImageLinks } from '../markdown/imageLinks';\nimport { untrackedUidRequest } from '../links/genericLinks';\n\nexport function handleImages(tanaNode: TanaIntermediateNode, today: number, context: VaultContext) {\n const imageData = extractImageLinks(tanaNode.name);\n if (imageData.length === 0) {\n return;\n }\n if (imageData.length === 1) {\n const image = imageData[0];\n tanaNode.type = 'image';\n tanaNode.mediaUrl = image[1].trim();\n tanaNode.name = tanaNode.name.replace(image[3], image[0].trim());\n return;\n }\n\n //more than one image means we add them as child nodes\n const childImageNodes: TanaIntermediateNode[] = [];\n\n const refs = new Set();\n\n imageData.forEach((image) => {\n const altText = image[0];\n const url = image[1];\n //filter out duplicate image uses\n if (childImageNodes.every((node) => altText.trim() !== node.name || url.trim() !== node.mediaUrl)) {\n const oldLink = image[3];\n const uid = untrackedUidRequest(context);\n refs.add(uid);\n tanaNode.name = tanaNode.name.replaceAll(oldLink, '[[' + uid + ']]');\n childImageNodes.push({\n uid,\n name: altText.trim(),\n createdAt: today,\n editedAt: today,\n type: 'image' as NodeType,\n mediaUrl: url.trim(),\n });\n }\n });\n\n if (refs.size > 0) {\n tanaNode.refs = [...(tanaNode.refs ?? []), ...Array.from(refs.values())];\n }\n\n tanaNode.children = [...(tanaNode.children ?? []), ...childImageNodes];\n}\n","import { TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { superTagUidRequests } from './supertags';\nimport { removeTodo } from '../markdown/todo';\nimport { detectTags, removeTagsFromEnd } from '../markdown/tags';\nimport { handleImages } from './imageNodes';\nimport { requestUidForContentNode, setUidsInNodeContent } from '../links/internalLinks';\n\nexport function postProcessContentNode(\n fileName: string,\n filePath: string,\n today: number,\n tanaNode: Omit & { uid?: string },\n context: VaultContext,\n hierarchyType?: HierarchyType,\n) {\n const [updatedContent, todoState] = removeTodo(tanaNode.name, hierarchyType) ?? [tanaNode.name, undefined];\n tanaNode.name = updatedContent;\n tanaNode.todoState = todoState;\n\n const [uid, content] = requestUidForContentNode(fileName, filePath, tanaNode.name, context);\n tanaNode.uid = uid;\n tanaNode.name = content;\n\n //LogSeq specific\n tanaNode.name = tanaNode.name.replace('collapsed:: true', '').replace(/^#+ /, '').trim();\n\n // tags are kept inline but added as separate supertags too\n // in obsidian tags are really tags so should be kept that way, but might be used inline, so should'nt be removed\n const tags = detectTags(tanaNode.name);\n if (tags) {\n //we can remove the last tags without losing meaning because they will show up as super tags anyways\n tanaNode.name = removeTagsFromEnd(tanaNode.name, tags);\n tanaNode.supertags = superTagUidRequests(tags, context.superTagTracker, context.idGenerator, true);\n }\n\n setUidsInNodeContent(tanaNode as TanaIntermediateNode, context);\n\n handleImages(tanaNode as TanaIntermediateNode, today, context);\n\n return tanaNode as TanaIntermediateNode;\n}\n","import { NodeType, TanaIntermediateAttribute, TanaIntermediateNode } from '../../../types/types';\nimport { VaultContext } from '../VaultContext';\nimport { FrontmatterData } from '../markdown/frontmatter';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessContentNode } from './postprocessing';\n\n//TODO: separate contexts cleanly again\nexport function keyValToFieldNode(\n fileName: string,\n filePath: string,\n key: string,\n values: string[],\n today: number,\n context: VaultContext,\n uid?: string,\n children?: TanaIntermediateNode[],\n): TanaIntermediateNode {\n let childNodes = children;\n\n if (values && values.length > 0) {\n childNodes = children ?? [];\n childNodes?.push(\n ...values.map((value) =>\n postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: value,\n type: 'node' as NodeType,\n createdAt: today,\n editedAt: today,\n },\n context,\n ),\n ),\n );\n }\n addAttribute(key, context.attributes);\n context.summary.fields++;\n\n return {\n uid: uid ?? untrackedUidRequest(context),\n name: key,\n type: 'field',\n createdAt: today,\n editedAt: today,\n children: childNodes,\n };\n}\n\nexport function frontMatterToFieldNode(\n fileName: string,\n filePath: string,\n data: FrontmatterData,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n return keyValToFieldNode(fileName, filePath, data.key, data.values, today, context);\n}\n\nfunction addAttribute(name: string, attributes: TanaIntermediateAttribute[]) {\n const foundAttr = attributes.filter((attr) => attr.name === name)[0];\n if (foundAttr) {\n foundAttr.count++;\n } else {\n attributes.push({ name, values: [], count: 1 });\n }\n}\n","import { NodeType, TanaIntermediateNode } from '../../../types/types';\nimport { HierarchyType, MarkdownNode } from '../hierarchy/markdownNodes';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { postProcessCodeBlock } from '../hierarchy/codeblocks';\nimport { requestUidForContentNode } from '../links/internalLinks';\nimport { keyValToFieldNode } from '../tanafeatures/fields';\nimport { isSoloDataViewAttribute } from '../hierarchy/dataviewattributes';\nimport { postProcessContentNode } from '../tanafeatures/postprocessing';\n\nfunction convertCodeBlock(obsidianNode: MarkdownNode, today: number, context: VaultContext) {\n const tanaNode: TanaIntermediateNode = {\n uid: untrackedUidRequest(context),\n name: postProcessCodeBlock(obsidianNode),\n createdAt: today,\n editedAt: today,\n codeLanguage: obsidianNode.codeLanguage,\n type: 'codeblock' as NodeType,\n };\n return tanaNode;\n}\n\nfunction convertDataViewAttribute(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n) {\n //we are checking again here, because the other detection only detects free-flowing attributes (so not in bullets)\n if (obsidianNode.type === HierarchyType.DATAVIEWATTRIBUTE || isSoloDataViewAttribute(obsidianNode.content)) {\n const [uid, content] = requestUidForContentNode(fileName, filePath, obsidianNode.content, context);\n const splitName = content.split('::');\n //empty data view nodes\n //TODO: not sure how that happens?\n if (splitName[1] === undefined) {\n console.log(obsidianNode.content, content, splitName);\n }\n return keyValToFieldNode(fileName, filePath, splitName[0], [splitName[1].trim()], today, context, uid);\n }\n}\n\nexport function convertMarkdownNode(\n fileName: string,\n filePath: string,\n obsidianNode: MarkdownNode,\n today: number,\n context: VaultContext,\n): TanaIntermediateNode {\n if (obsidianNode.type === HierarchyType.CODEBLOCK) {\n return convertCodeBlock(obsidianNode, today, context);\n }\n\n const dataviewNode = convertDataViewAttribute(fileName, filePath, obsidianNode, today, context);\n if (dataviewNode) {\n return dataviewNode;\n }\n\n return postProcessContentNode(\n fileName,\n filePath,\n today,\n {\n name: obsidianNode.content,\n createdAt: today,\n editedAt: today,\n type: 'node' as NodeType,\n },\n context,\n obsidianNode.type,\n );\n}\n","export type FrontmatterData = {\n key: string;\n values: string[];\n};\n\n/**\n * @returns [frontMatterData, position after end of frontmatter relevant chars]\n */\nexport function extractFrontmatter(content: string): [FrontmatterData[], number] | null {\n if (content.startsWith('---\\n')) {\n const frontMatterEndIndex = content.indexOf('\\n---\\n');\n if (frontMatterEndIndex !== -1) {\n return [\n parseFrontmatter(content.slice('---\\n'.length, frontMatterEndIndex)),\n frontMatterEndIndex + '\\n---\\n'.length,\n ];\n }\n }\n return null;\n}\n\n/**\n *\n * @param frontmatter without the starting \"---\" or ending \"---\"\n */\nexport function parseFrontmatter(frontmatter: string) {\n const lines = frontmatter\n .split('\\n')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n const data: FrontmatterData[] = [];\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n\n const splitLine = line\n .split(':')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n\n //skipping obsidian specific frontmatter\n if (splitLine[0] === 'publish' || splitLine[0] === 'cssclass' || splitLine[0] === 'aliases') {\n continue;\n }\n\n //one of\n //key2: value2\n //key3: [one, two, three]\n if (splitLine.length === 2) {\n if (splitLine[1].startsWith('[') && splitLine[1].endsWith(']')) {\n const arr: string[] = splitLine[1]\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n data.push({ key: splitLine[0], values: arr });\n } else {\n data.push({ key: splitLine[0], values: [splitLine[1]] });\n }\n } else {\n //one of\n //key4:\n //key5:\n // - value1\n // - value2\n const curData: FrontmatterData = { key: splitLine[0], values: [] };\n let counter = 1;\n let nextLine = lines[index + counter];\n while (nextLine !== undefined && nextLine.startsWith('- ')) {\n curData.values.push(nextLine.slice('- '.length));\n counter++;\n nextLine = lines[index + counter];\n }\n index += counter - 1;\n data.push(curData);\n }\n }\n return data;\n}\n","import { convertMarkdownNode } from './nodeConversion';\nimport { createTree } from '../utils/createTree';\nimport { HierarchyType, MarkdownNode, extractMarkdownNodes, isMarkdownNodeChild } from '../hierarchy/markdownNodes';\nimport { extractFrontmatter, FrontmatterData } from '../markdown/frontmatter';\nimport { VaultContext } from '../VaultContext';\nimport { TanaIntermediateNode, NodeType } from '../../../types/types';\nimport { superTagUidRequests } from '../tanafeatures/supertags';\nimport { requestUidForFile } from '../links/internalLinks';\nimport { HeadingData } from '../links/headingLinks';\nimport { frontMatterToFieldNode } from '../tanafeatures/fields';\nimport { dateStringToDateUID } from '../links/dateLinks';\n\nexport function convertObsidianFile(\n fileName: string, //without ending\n filePath: string,\n fileContent: string,\n context: VaultContext,\n today: number = Date.now(),\n) {\n const [frontmatterData, startIndex] = extractFrontmatter(fileContent) ?? [[], 0];\n\n let obsidianNodes = extractMarkdownNodes(fileContent, startIndex);\n let displayName = fileName;\n\n //LogSeq specific\n const name = obsidianNodes[0] && obsidianNodes[0].content.match(/^title::(.+)$/);\n if (name) {\n displayName = name[1];\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n // common in Obsidian to repeat the filename in the first line, remove first line if so\n if (obsidianNodes[0] && obsidianNodes[0].content.replace(/^#+/, '').trim() === displayName.trim()) {\n obsidianNodes = obsidianNodes.slice(1);\n }\n\n const headingData: HeadingData[] = [];\n\n const fileNode = createFileNode(displayName, filePath, today, context, frontmatterData);\n\n createTree(\n fileNode,\n { type: HierarchyType.ROOT, level: -1 } as MarkdownNode,\n obsidianNodes,\n isMarkdownNodeChild,\n (markdownNode) => {\n return convertMarkdownNode(fileName, filePath, markdownNode, today, context);\n },\n (tanaNode, markdownNode) => {\n if (markdownNode.type === HierarchyType.HEADING) {\n headingData.push({ ...markdownNode, uid: tanaNode.uid });\n }\n },\n );\n\n //making GC a little easier\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obsidianNodes = null as any;\n\n context.headingTracker.pathMap.set(filePath, headingData);\n if (!context.headingTracker.nameMap.get(fileName)) {\n context.headingTracker.nameMap.set(fileName, headingData);\n }\n\n return fileNode;\n}\n\nfunction createFileNode(\n displayName: string,\n filePath: string,\n today: number,\n context: VaultContext,\n frontmatter: FrontmatterData[],\n): TanaIntermediateNode {\n let supertags: string[] | undefined;\n const fieldNodes: TanaIntermediateNode[] = [];\n\n frontmatter.forEach((data) => {\n if (data.key === 'tags') {\n supertags = superTagUidRequests(data.values, context.superTagTracker, context.idGenerator);\n } else {\n fieldNodes.push(frontMatterToFieldNode(displayName, filePath, data, today, context));\n }\n });\n\n //we need this uid request even if its a date node, only this way will other links to it work\n //TODO: evaluate if it might not need to set dateDisplayName as uid?\n const nodeUid = requestUidForFile(displayName, filePath, context);\n let nodeType: NodeType = 'node';\n //TODO: replace duplication of this call - its also used inside the FileDescMap\n const dateDisplayName = dateStringToDateUID(displayName, context.dailyNoteFormat);\n\n if (dateDisplayName) {\n nodeType = 'date';\n displayName = dateDisplayName;\n context.summary.calendarNodes++;\n }\n\n return {\n uid: nodeUid,\n name: displayName,\n createdAt: today,\n editedAt: today,\n type: nodeType,\n supertags,\n children: fieldNodes.length > 0 ? fieldNodes : undefined,\n };\n}\n","import { convertObsidianFile } from './fileConversion';\nimport { VaultContext } from '../VaultContext';\nimport { untrackedUidRequest } from '../links/genericLinks';\nimport { basename, CustomFileSystemEntry, SEPARATOR } from '../filesystem/CustomFileSystemAdapter';\n\nexport enum ChildrenPosition {\n NOT_LAST = 'NOT_LAST',\n LAST = 'LAST',\n}\n\nfunction getChildrenPosition(index: number, dirents: CustomFileSystemEntry[]) {\n if (index === dirents.length - 1) {\n return ChildrenPosition.LAST;\n }\n\n return ChildrenPosition.NOT_LAST;\n}\n\nfunction readFilteredAndSortedDir(context: VaultContext, dir: string) {\n return (\n context.adapter\n .readDirectory(dir)\n .filter((dirent) => {\n const name = dir + SEPARATOR + dirent.getName();\n return (\n (dirent.isDirectory() && !name.endsWith('.github') && !name.endsWith('.obsidian')) ||\n (!dirent.isDirectory() && name.endsWith('.md'))\n );\n })\n //TODO: this is a hack to prevent the files in the zip to have a different order, so that we can have similar tests\n .sort((a, b) => a.getName().localeCompare(b.getName()))\n //folders at the end\n //this is critically important so that the top level of files are read before any other files with the same names can be read\n //E.g.\n // vault/test is read before vault/folder/test\n //if \"test\" is used as a link, we now we can safely use the first pathName that appeared\n .sort((a, b) => Number(a.isDirectory()) - Number(b.isDirectory()))\n );\n}\n\nexport async function handleVault(\n context: VaultContext,\n dir: string,\n handleDirStart: ReturnType,\n handleDirEnd: ReturnType,\n handleFile: ReturnType,\n childrenPosition: ChildrenPosition = ChildrenPosition.LAST,\n) {\n handleDirStart(dir);\n const dirents = readFilteredAndSortedDir(context, dir);\n for (let index = 0; index < dirents.length; index++) {\n const dirent = dirents[index];\n const res = dirent.getName();\n if (dirent.isDirectory()) {\n await handleVault(context, res, handleDirStart, handleDirEnd, handleFile, getChildrenPosition(index, dirents));\n } else {\n await handleFile(res, getChildrenPosition(index, dirents));\n }\n }\n handleDirEnd(childrenPosition);\n}\n\nexport function addParentNodeStart(targetPath: string, today: number, context: VaultContext) {\n return (dir: string) => {\n const name = basename(dir);\n const uid = untrackedUidRequest(context);\n context.adapter.appendToResultFile(\n targetPath,\n `{\n \"uid\": \"${uid}\", \n \"name\": \"${name}\", \n \"createdAt\": ${today}, \n \"editedAt\": ${today}, \n \"type\": \"node\", \n \"children\": [\n `,\n );\n };\n}\n\nexport function addParentNodeEnd(context: VaultContext, targetPath: string) {\n return (childrenPosition: ChildrenPosition) => {\n context.adapter.appendToResultFile(\n targetPath,\n `]\n }`,\n );\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n\nexport function addFileNode(targetPath: string, today: number, context: VaultContext) {\n return async (file: string, childrenPosition: ChildrenPosition) => {\n //remove the vault root path and the \".md\" ending to get the absolute path\n const absoluteFilePath = file.slice(context.vaultPath.length + 1, -3);\n\n const fileNode = convertObsidianFile(\n basename(file).replace('.md', ''),\n absoluteFilePath,\n await context.adapter.readFile(file),\n context,\n today,\n );\n context.adapter.appendToResultFile(targetPath, JSON.stringify(fileNode, null, 2));\n if (childrenPosition !== ChildrenPosition.LAST) {\n context.adapter.appendToResultFile(targetPath, ',');\n }\n };\n}\n","import { createUnlinkedTanaNodes } from './links/invalidLinks';\nimport { addFileNode, addParentNodeEnd, addParentNodeStart, handleVault } from './tanaconversion/vaultConversion';\nimport { shiftFromLeafToTop, VaultContext } from './VaultContext';\nimport { createSuperTagObjects } from './tanafeatures/supertags';\nimport { postProcessTIFFIle } from './links/headingLinks';\nimport { basename, readConfig } from './filesystem/CustomFileSystemAdapter';\n\n/**\n * Converts the vault to the Tana format and incrementally saves it, otherwise it would be to memory intensive on big vaults.\n * Due to the incremental approach the output-file will be valid JSON but not be formatted perfectly.\n */\nexport async function ObsidianVaultConverter(context: VaultContext, today: number = Date.now()) {\n await context.adapter.initReadingVault();\n\n await loadDailyNotesConfig(context);\n\n const targetPath = `${context.vaultPath}.tif.json`;\n try {\n context.adapter.removeFile(targetPath);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n\n context.adapter.appendToResultFile(targetPath, '{\\n \"version\": \"TanaIntermediateFile V0.1\",\\n \"nodes\": [\\n');\n\n await handleVault(\n context,\n context.vaultPath,\n addParentNodeStart(targetPath, today, context),\n addParentNodeEnd(context, targetPath),\n addFileNode(targetPath, today, context),\n );\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n\n //the vault-node needs to be counted as a top level node\n shiftFromLeafToTop(context.summary);\n\n //post processing can be done before unlinked (it will add unlinked headings)\n //because the unlinked summary nodes are just created by the converter and have no connection to the rest\n //20 secs\n await postProcessTIFFIle(targetPath, context);\n\n const collectedUnlinkedNodes = createUnlinkedTanaNodes(basename(context.vaultPath), today, context);\n if (collectedUnlinkedNodes) {\n //TODO: summary?\n context.adapter.appendToResultFile(targetPath, ', ' + JSON.stringify(collectedUnlinkedNodes, null, 2));\n }\n\n //close vault-node children\n context.adapter.appendToResultFile(targetPath, '\\n ]');\n\n const superTags = createSuperTagObjects(context.superTagTracker);\n if (superTags.length > 0) {\n context.adapter.appendToResultFile(targetPath, ',\\n \"supertags\": \\n' + JSON.stringify(superTags, null, 2));\n }\n\n if (context.attributes.length > 0) {\n context.adapter.appendToResultFile(\n targetPath,\n ',\\n \"attributes\": \\n' + JSON.stringify(context.attributes, null, 2),\n );\n }\n\n context.adapter.appendToResultFile(targetPath, ',\\n \"summary\": \\n' + JSON.stringify(context.summary, null, 2));\n\n //close target object\n context.adapter.appendToResultFile(targetPath, '\\n}');\n context.adapter.flushResultsFromInitialProcessing(targetPath);\n return context.summary;\n}\n\nasync function loadDailyNotesConfig(context: VaultContext) {\n const config = await readConfig<{ format: string }>(context, 'daily-notes', (res) => {\n return res ? res : { format: 'YYYY-MM-DD' };\n });\n context.dailyNoteFormat = config.format;\n console.log('Using daily notes format ' + config.format + ' for detecting calendar nodes.');\n}\n","import { TanaIntermediateSummary } from '../../types/types';\nimport { WebFileSystemAdapter } from './filesystem/WebFileSystemAdapter';\nimport { ObsidianVaultConverter } from './ObsidianVaultConverter';\nimport { IdGenerator } from './utils/IdGenerator';\nimport { createVaultContext, VaultContext } from './VaultContext';\n\nexport async function WebObsidianVaultConverter(\n zipBlob: Blob,\n vaultName: string,\n today: number,\n idGenerator?: IdGenerator,\n): Promise<[TanaIntermediateSummary, VaultContext, WebFileSystemAdapter]> {\n const adapter = new WebFileSystemAdapter(zipBlob);\n const context = createVaultContext(vaultName, adapter, idGenerator);\n return ObsidianVaultConverter(context, today).then((summary) => {\n return [summary, context, adapter];\n });\n}\n","import { WebObsidianVaultConverter } from './converters/obsidian/WebObsidianVaultConverter';\n\nconst zipInput = document.getElementById('vault-zip') as HTMLInputElement;\nzipInput.addEventListener('change', async (event) => {\n let progress;\n let seconds = 0;\n\n try {\n const zipFile = ((event.target as HTMLInputElement).files as FileList)[0];\n const vaultName = zipFile.name.slice(0, zipFile.name.indexOf('.zip'));\n progress = document.createElement('b');\n progress.innerHTML = 'In Progress... (imagine a fancy timer with 10-30 secs here)
';\n document.body.appendChild(progress);\n const cancel = setInterval(() => seconds++, 1000);\n const [summary, , adapter] = await WebObsidianVaultConverter(zipFile, vaultName, Date.now());\n clearInterval(cancel);\n document.body.removeChild(progress);\n\n const success = document.createElement('b');\n success.innerHTML = 'Success! And it only took ' + seconds + ' seconds.
';\n document.body.appendChild(success);\n\n const summaryHeading = document.createElement('h2');\n summaryHeading.innerText = 'Summary:';\n document.body.appendChild(summaryHeading);\n const summaryElement = document.createElement('p');\n summaryElement.innerText = Object.entries(summary)\n .map((entry) => entry[0] + ': ' + entry[1])\n .join('\\n');\n document.body.appendChild(summaryElement);\n\n const result = adapter.getResult();\n const downloadButton = document.createElement('button');\n downloadButton.innerText = 'Download TIF File';\n downloadButton.addEventListener('click', () => {\n const url = URL.createObjectURL(new Blob([result]));\n const a = document.createElement('a');\n a.style.display = 'none';\n a.href = url;\n a.download = vaultName + '.tif.json';\n document.body.appendChild(a);\n a.click();\n URL.revokeObjectURL(url);\n });\n document.body.appendChild(downloadButton);\n } catch (error) {\n console.trace(error);\n\n if (progress) {\n document.body.removeChild(progress);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const stackStr: string = (error as any).stack.toString();\n\n document.body.appendChild(document.createElement('br'));\n const errorParagraph = document.createElement('b');\n errorParagraph.innerText = 'An Error occured.';\n document.body.appendChild(errorParagraph);\n if (stackStr.toLowerCase().includes('readdirectory')) {\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const additionalInfo = document.createElement('b');\n additionalInfo.innerText =\n 'It probably has to do with a not properly zipped vault.\\nPlease check the text at the top again.';\n document.body.appendChild(additionalInfo);\n }\n\n document.body.appendChild(document.createElement('br'));\n document.body.appendChild(document.createElement('br'));\n const errorContent = document.createElement('b');\n errorContent.innerText = 'Content of Error (please post in the Slack and tag me):\\n\\n' + stackStr;\n document.body.appendChild(errorContent);\n }\n});\n"],"names":["relList","link","processPreload","mutations","mutation","node","getFetchOpts","script","fetchOpts","MAX_BITS","D_CODES","BL_CODES","LENGTH_CODES","LITERALS","L_CODES","HEAP_SIZE","END_BLOCK","MAX_BL_BITS","REP_3_6","REPZ_3_10","REPZ_11_138","Buf_size","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_DEFAULT_STRATEGY","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","length","value","a","b","_dist_code","Tree","that","gen_bitlen","s","tree","stree","extra","base","max_length","h","n","m","bits","xbits","f","overflow","bi_reverse","code","len","res","gen_codes","max_code","bl_count","next_code","elems","dist","StaticTree","static_tree","extra_bits","extra_base","static_ltree2_first_part","static_ltree2_second_part","index","static_dtree_first_part","static_dtree_second_part","MAX_MEM_LEVEL","DEF_MEM_LEVEL","Config","good_length","max_lazy","nice_length","max_chain","func","STORED","FAST","SLOW","config_table","z_errmsg","NeedMore","BlockDone","FinishStarted","FinishDone","PRESET_DICT","INIT_STATE","BUSY_STATE","FINISH_STATE","Z_DEFLATED","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","smaller","depth","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","lm_init","i","init_block","tr_init","k","heap","v","j","scan_tree","prevlen","curlen","nextlen","count","max_count","min_count","build_bl_tree","max_blindex","put_byte","p","put_short","w","putShortMSB","send_bits","val","send_code","c","c2","send_tree","send_all_trees","lcodes","dcodes","blcodes","rank","bi_flush","_tr_align","_tr_tally","lc","out_length","in_length","dcode","compress_block","ltree","dtree","lx","bi_windup","copy_block","buf","header","_tr_stored_block","stored_len","eof","_tr_flush_block","opt_lenb","static_lenb","flush_block_only","fill_window","more","deflate_stored","flush","max_block_size","max_start","longest_match","cur_match","chain_length","scan","match","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflate_fast","hash_head","bflush","deflate_slow","max_insert","deflateReset","_level","_method","memLevel","_strategy","err","_strm","dictionary","dictLength","level_flags","old_flush","bstate","ZStream","ret","start","size","ZipDeflate","options","z","bufsize","getMaximumCompressedSize","data","onprogress","lastIndex","bufferIndex","bufferSize","buffers","chunk","uncompressedSize","Z_MEM_ERROR","inflate_mask","MANY","fixed_bl","fixed_bd","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","e","t","hp","g","l","mask","q","xp","y","initWorkArea","vsize","bb","tb","result","nl","nd","bl","bd","tl","td","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","tindex","border","TYPE","LENS","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","left","table","blens","codes","last","hufts","check","inftree","bl_","bd_","tl_","td_","METHOD","FLAG","DICT4","DICT3","DICT2","DICT1","DICT0","BLOCKS","DONE","BAD","mark","Inflate","inflateReset","istate","ZipInflate","nomoreinput","MAX_32_BITS","MAX_16_BITS","COMPRESSION_METHOD_DEFLATE","COMPRESSION_METHOD_STORE","COMPRESSION_METHOD_AES","LOCAL_FILE_HEADER_SIGNATURE","SPLIT_ZIP_FILE_SIGNATURE","DATA_DESCRIPTOR_RECORD_SIGNATURE","CENTRAL_FILE_HEADER_SIGNATURE","END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE","END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_LENGTH","ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH","EXTRAFIELD_TYPE_ZIP64","EXTRAFIELD_TYPE_AES","EXTRAFIELD_TYPE_NTFS","EXTRAFIELD_TYPE_NTFS_TAG1","EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP","EXTRAFIELD_TYPE_UNICODE_PATH","EXTRAFIELD_TYPE_UNICODE_COMMENT","BITFLAG_ENCRYPTED","BITFLAG_LEVEL","BITFLAG_DATA_DESCRIPTOR","BITFLAG_LANG_ENCODING_FLAG","FILE_ATTR_MSDOS_DIR_MASK","VERSION_DEFLATE","VERSION_ZIP64","VERSION_AES","DIRECTORY_SIGNATURE","MAX_DATE","MIN_DATE","UNDEFINED_VALUE","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","_format","codec","controller","MINIMUM_CHUNK_SIZE","maxWorkers","DEFAULT_CONFIGURATION","config","getConfiguration","getChunkSize","configure","configuration","baseURL","chunkSize","terminateWorkerTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","workerScripts","setIfDefined","deflate","inflate","propertyName","propertyValue","mimeTypes","type","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","crc32","encodeText","bitArray","a1","a2","shift","_end","carry","out","last2","shift2","arr","byteLength","tmp","bytes","hash","sha1","ol","words","cipher","key","aes","sbox","decTable","keyLen","encKey","decKey","rcon","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","kIndex","b2","random","typedArray","m_w","m_z","rcache","_r","prf","iv","word","b1","b3","counter","misc","password","salt","ui","arrayBuffer","outLength","hmac","Hash","exKey","bs","GET_RANDOM_VALUES_SUPPORTED","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","getRandomValues","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","HASH_ALGORITHM","HASH_FUNCTION","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","codecBytes","Aes","CtrGladman","HmacSha1","AESDecryptionStream","signed","encryptionStrength","resolve","aesCrypto","strength","resolveReady","ready","createDecryptionKeys","subarray","output","append","ctr","pending","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","toBits","decryptedChunk","fromBits","signature","indexSignature","AESEncryptionStream","stream","preamble","createEncryptionKeys","encryptedChunkArray","concat","paddingStart","paddingEnd","verifySignature","inputLength","expand","inputChunk","outputChunk","decrypt","passwordVerificationKey","createKeys","passwordVerification","encrypt","encodedPassword","baseKey","importKey","derivedBits","deriveBits","compositeKey","authentication","format","algorithm","extractable","keyUsages","leftArray","rightArray","inputArray","begin","end","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","target","getByte","updateKeys","keys","byte","key0","key1","key2","getInt32","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","CompressionStreamNative","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","pipeThrough","pipeThroughCommpressionStream","setReadable","InflateStream","DecompressionStreamNative","decryptionStream","streamSignature","dataViewSignature","CodecStreamNative","CodecStream","error","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_DEFLATE","CODEC_INFLATE","codecType","Stream","WEB_WORKERS_SUPPORTED","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","ProgressWatcherStream","worker","busy","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onend","chunkOffset","callHandler","handler","parameters","runWorker","getWebWorker","runWebWorker","codecStream","resolveResult","rejectResult","reject","closed","watchClosedStream","sendMessage","resultValue","writableSource","writer","resolveStreamClosed","reason","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","event","onMessage","message","transferables","buffer","messageId","reader","stack","name","responseError","close","done","pool","pendingRequests","indexWorker","streamCopy","clearTerminateTimeout","terminateTimeout","ERR_HTTP_STATUS","ERR_HTTP_RANGE","ERR_ITERATOR_COMPLETED_TOO_SOON","CONTENT_TYPE_TEXT_PLAIN","HTTP_HEADER_CONTENT_LENGTH","HTTP_HEADER_CONTENT_RANGE","HTTP_HEADER_ACCEPT_RANGES","HTTP_HEADER_RANGE","HTTP_HEADER_CONTENT_TYPE","HTTP_METHOD_HEAD","HTTP_METHOD_GET","HTTP_RANGE_UNIT","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","Reader","diskNumberStart","readUint8Array","Writer","Data64URIReader","dataURI","dataEnd","dataStart","dataArray","delta","indexByte","Data64URIWriter","contentType","indexArray","dataString","BlobReader","blob","BlobWriter","headers","TextReader","text","TextWriter","encoding","utf8","FetchReader","createHtpReader","initHttpReader","sendFetchRequest","getFetchRequestData","readUint8ArrayHttpReader","XHRReader","sendXMLHttpRequest","getXMLHttpRequestData","httpReader","preventHeadRequest","useRangeHeader","forceRangeRequests","sendRequest","getRequestData","isHttpFamily","getRangeHeaders","contentSize","contentRangeHeader","splitHeader","headerValue","getContentLength","response","getHeaders","contentLength","method","request","entry","HttpReader","Uint8ArrayReader","Uint8ArrayWriter","initSize","previousArray","SplitZipReader","readers","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitZipWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","writeChunk","closeDisk","protocol","initStream","CP437","VALID_CP437","decodeCP437","stringValue","indexCharacter","decodeText","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE","PROPERTY_NAME_MS_DOS_COMPATIBLE","PROPERTY_NAME_ZIP64","PROPERTY_NAMES","Entry","ERR_BAD_FORMAT","ERR_EOCDR_NOT_FOUND","ERR_EOCDR_ZIP64_NOT_FOUND","ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND","ERR_CENTRAL_DIRECTORY_NOT_FOUND","ERR_LOCAL_FILE_HEADER_NOT_FOUND","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_ENCRYPTED","ERR_UNSUPPORTED_ENCRYPTION","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getUint32","getBigUint64","ZipReader","zipReader","endOfDirectoryInfo","seekSignature","signatureArray","signatureView","getDataView","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","getUint16","appendedDataOffset","lastDiskNumber","expectedLastDiskNumber","filesLength","prependedDataLength","startOffset","endOfDirectoryLocatorArray","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","filenameOffset","extraFieldOffset","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","filename","comment","readCommonFooter","extractPrependedData","extractAppendedData","entries","zipEntry","extraFieldAES","compressionMethod","bitFlag","rawLastModDate","compressedSize","localDirectory","dataView","dataOffset","rawBitFlag","getDate","rawExtraField","extraField","rawExtraFieldView","offsetExtraField","extraFieldZip64","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","readExtraFieldAES","extraFieldNTFS","readExtraFieldNTFS","extraFieldExtendedTimestamp","readExtraFieldExtendedTimestamp","extraFieldView","missingProperties","max","indexMissingProperty","extraction","extraFieldUnicode","rawPropertyName","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","lastModDate","getDateNTFS","lastAccessDate","creationDate","extraFieldData","flags","timeProperties","timeRawProperties","indexProperty","time","minimumBytes","maximumLength","setUint32","maximumBytes","seek","timeRaw","date","view","ERR_DUPLICATED_NAME","ERR_INVALID_COMMENT","ERR_INVALID_ENTRY_COMMENT","ERR_INVALID_ENTRY_NAME","ERR_INVALID_VERSION","ERR_INVALID_ENCRYPTION_STRENGTH","ERR_INVALID_EXTRAFIELD_TYPE","ERR_INVALID_EXTRAFIELD_DATA","ERR_UNSUPPORTED_FORMAT","EXTRAFIELD_DATA_AES","EXTRAFIELD_LENGTH_ZIP64","workers","pendingEntries","ZipWriter","splitZipFile","pendingAddFileCalls","promiseAddFile","addFile","pendingEntry","closeFile","getLength","version","extraFieldSize","arraySet","extendedTimestamp","maximumCompressedSize","maximumEntrySize","keepOrder","internalFileAttribute","externalFileAttribute","zip64","diskOffset","bufferedWrite","dataDescriptor","dataDescriptorSignature","headerInfo","getHeaderInfo","dataDescriptorInfo","getDataDescriptorInfo","getFileEntry","entryInfo","files","previousFileEntry","releaseLockWriter","releaseLockCurrentFileEntry","writingBufferedEntryData","writingEntryData","fileWriter","lockPreviousFileEntry","requestLockCurrentFileEntry","signatureArrayView","writeData","createFileEntry","requestLockWriter","setMissingInfo","setZip64Info","lockWriter","lock","localHeaderArray","headerArray","rawExtraFieldExtendedTimestamp","rawExtraFieldNTFS","rawExtraFieldAES","dataDescriptorArray","rawExtraFieldZip64","setEntryInfo","extraFieldAESView","setUint16","setUint8","extraFieldExtendedTimestampView","extraFieldExtendedTimestampFlag","extraFieldNTFSView","lastModTimeNTFS","getTimeNTFS","setBigUint64","headerView","dateArray","dateView","lastModDateMsDos","extraFieldLength","localHeaderView","dataDescriptorView","dataDescriptorOffset","rawExtraFieldZip64View","entryData","sliceAsArrayBuffer","arrayBufferView","directoryOffset","indexFileEntry","fileEntryOffset","endOfdirectoryArray","endOfdirectoryView","availableSize","streamWriter","arrayLikes","arrayLike","fs","params","parent","ancestor","relativeName","ZipFileEntry","mimeType","ZipDirectoryEntry","addChild","fileSystemEntry","addFileSystemEntry","path","pathPart","getZipBlobReader","initReaders","exportZip","getTotalSize","children","childIndex","child","FS","resetFS","detach","destination","fullname","id","process","zipBlobReader","totalSize","selectedEntry","entryOffsets","exportChild","processChild","indexProgress","previousValue","currentValue","addDirectory","file","getChildren","childZipEntry","readEntries","directoryReader","temporaryEntries","configureWebWorker","basename","str","SEPARATOR","readConfig","context","configSubPath","checkResult","configPath","WebFileSystemAdapter","zipBlob","__publicField","_targetPath","_oldPath","_newPath","_path","chunks","idgenerator","getBracketLinks","skipIfNotDirect","links","state","currentLinks","char","hookCallback","hooks","setHookCallback","callback","isArray","isObject","hasOwnProp","isObjectEmpty","obj","isUndefined","isNumber","isDate","map","fn","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","isValid","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","Moment","isMoment","warn","msg","deprecate","firstTime","args","arg","argLen","deprecations","deprecateSimple","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","now","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","makeGetSet","keepTime","set$1","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","indexOf","o","month","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","getSetYear","getIsLeapYear","createDate","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","values","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","min","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","matcher","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","listWeekdaysImpl","localeSorted","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","humanize","argWithSuffix","argThresholds","withSuffix","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","dateStringToDateUID","displayName","moment","isPath","searchStr","FileDescMap","fileName","filePath","defaultData","dailyNoteFormat","dateUID","pathMatch","nameMatch","isPathBool","_a","incrementSummary","summary","shiftFromLeafToTop","createVaultContext","vaultPath","fileSystemAdapter","idGenerator","randomGenerator","untrackedUidRequest","blockLinkUidRequestForUsing","blockObsidianUid","blockUidMap","blockUidData","blockLinkUidRequestForDefining","filterInvalidBlockLinks","tracker","unlinkedNodes","fileBlockLinks","blockLink","removeBlockId","content","line","splitLine","lastEle","createTree","targetRoot","sourceRoot","sources","isChildCheck","conversion","postInsertionHook","lastSourceNodes","lastTargetNodes","childNode","insertNodeIntoHierarchy","targetNode","sourceNode","removeNonParentNodes","lastSourceNode","lastTargetNode","traverseTreeDepthFirst","nodes","contentPath","pathLeft","headingLinkUidRequestForUsing","cleanLink","unchangedLink","fileHeadingData","uid","matchHeadingLinks","dummyHeadingLinks","missingHeadingLinks","validHeadingLinks","unchangedInlineLink","dummyHeadingUidData","potentiallyMatchingNodes","dummySourceRoot","dummyTargetRoot","potentialParent","potentialChild","headingTree","dummyData","matchingHeadingNode","postProcessTIFFIle","headingLink","tempPath","regExes","updatedLine","regEx","UidRequestType","UidRequestType2","setUidsInNodeContent","tanaNode","foundUIDs","requestUidsForAllLinks","refSet","foundUid","bracketLink","aliasArr","requestUidForLink","cleanUpLink","detectLinkType","obsidianLink","linkType","standardLinkUidRequest","requestUidForContentNode","cleanedContent","requestUidForFile","uidData","filterInvalidContentLinks","getAllInvalidLinks","createUnlinkedTanaNodes","importName","today","rootNodeName","rootNode","isEmptySpace","countEmptySpace","curPosition","findFirstEmptySpacePosBackwards","curChar","nextNewLine","isNewLine","lastPositionIsNewline","lastPosChar","isNumberedBullet","secondChar","detectBulletHierarchy","currentPos","isBulletStart","nonEmptyPos","nonEmptyChar","HierarchyType","findBulletSliceStartPosition","hierarchy","posOfBulletText","emptySpaceInBulletText","findBulletSliceEndPosition","endPosition","emptySpaces","findCodeBlockSliceEndPosition","postProcessCodeBlock","obsidianNode","startingPos","emptySpace","detectCodeBlockHierarchy","newLinePos","codeLanguage","char1","char2","char3","secondNewLinePos","findDataViewSliceEndPosition","detectDataViewAttributeHierarchy","newline","isSoloDataViewAttribute","splitName","detectHeadingHierarchy","countHeadingSymbols","curPos","findHeadingSliceStartPosition","posOfHeadingText","emptySpaceInHeadingText","findHeadingSliceEndPosition","headingTextPos","findParagraphSliceEndPosition","lastChar","newTypeOfHierarchyStarts","extractMarkdownNodes","startPosition","nodeDescs","slicePosition","nextHierarchy","extractMarkdownNode","detectNextHierarchy","startPos","findSliceStartPosition","slicePos","findSliceEndPosition","isMarkdownNodeChild","tagRegex","nonDigit","disallowedSymbols","validTag","tag","foundNonDigit","detectTags","removeTagsFromEnd","tags","curContent","globalRemovedTag","removedTag","cleanUpTag","superTagUidRequests","clean","superTagUidRequest","cleanTag","createSuperTagObjects","detectTodoType","removeTodo","hierarchyType","extractImageLinks","imageData","foundData","extractImageLink","nextIndex","lastFoundImageSignifier","altText","tryToExtractLinkedImageLink","removeTitle","embeddedImage","expectedEndPositon","endUrl","handleImages","_b","image","childImageNodes","refs","oldLink","postProcessContentNode","updatedContent","todoState","keyValToFieldNode","childNodes","addAttribute","frontMatterToFieldNode","attributes","foundAttr","attr","convertCodeBlock","convertDataViewAttribute","convertMarkdownNode","dataviewNode","extractFrontmatter","frontMatterEndIndex","parseFrontmatter","frontmatter","lines","curData","nextLine","convertObsidianFile","fileContent","frontmatterData","startIndex","obsidianNodes","headingData","fileNode","createFileNode","markdownNode","supertags","fieldNodes","nodeUid","nodeType","dateDisplayName","getChildrenPosition","dirents","readFilteredAndSortedDir","dirent","handleVault","handleDirStart","handleDirEnd","handleFile","childrenPosition","addParentNodeStart","targetPath","addParentNodeEnd","addFileNode","absoluteFilePath","ObsidianVaultConverter","loadDailyNotesConfig","collectedUnlinkedNodes","superTags","WebObsidianVaultConverter","vaultName","adapter","zipInput","progress","zipFile","cancel","success","summaryHeading","summaryElement","downloadButton","stackStr","errorParagraph","additionalInfo","errorContent"],"mappings":"8KAAqB,UAAoB,CACrC,MAAMA,EAAU,SAAS,cAAc,MAAM,EAAE,QAC/C,GAAIA,GAAWA,EAAQ,UAAYA,EAAQ,SAAS,eAAe,EAC/D,OAEJ,UAAWC,KAAQ,SAAS,iBAAiB,2BAA2B,EACpEC,EAAeD,CAAI,EAEvB,IAAI,iBAAkBE,GAAc,CAChC,UAAWC,KAAYD,EACnB,GAAIC,EAAS,OAAS,YAGtB,UAAWC,KAAQD,EAAS,WACpBC,EAAK,UAAY,QAAUA,EAAK,MAAQ,iBACxCH,EAAeG,CAAI,CAGvC,CAAK,EAAE,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,EAAI,CAAE,EACvD,SAASC,EAAaC,EAAQ,CAC1B,MAAMC,EAAY,CAAA,EAClB,OAAID,EAAO,YACPC,EAAU,UAAYD,EAAO,WAC7BA,EAAO,iBACPC,EAAU,eAAiBD,EAAO,gBAClCA,EAAO,cAAgB,kBACvBC,EAAU,YAAc,UACnBD,EAAO,cAAgB,YAC5BC,EAAU,YAAc,OAExBA,EAAU,YAAc,cACrBA,CACV,CACD,SAASN,EAAeD,EAAM,CAC1B,GAAIA,EAAK,GAEL,OACJA,EAAK,GAAK,GAEV,MAAMO,EAAYF,EAAaL,CAAI,EACnC,MAAMA,EAAK,KAAMO,CAAS,CAC7B,CACL,KCHA,MAAMC,GAAW,GACXC,GAAU,GACVC,GAAW,GAEXC,GAAe,GACfC,GAAW,IACXC,GAAWD,GAAW,EAAID,GAC1BG,GAAa,EAAID,GAAU,EAE3BE,GAAY,IAGZC,GAAc,EAGdC,GAAU,GAGVC,GAAY,GAGZC,GAAc,GAMdC,GAAW,EAAI,EAGfC,GAAwB,GAGxBC,GAAa,EACbC,GAAiB,EACjBC,GAAqB,EAErBC,GAAa,EACbC,GAAkB,EAClBC,GAAe,EACfC,GAAW,EAEXC,GAAO,EACP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} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 87ba627..96643e4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Inofficial Obsidian-2-Tana Converter - +

Inofficial Obsidian-2-Tana Converter

diff --git a/src/converters/obsidian/links/internalLinks.ts b/src/converters/obsidian/links/internalLinks.ts index f4d9f6b..11deb18 100644 --- a/src/converters/obsidian/links/internalLinks.ts +++ b/src/converters/obsidian/links/internalLinks.ts @@ -39,7 +39,7 @@ export function requestUidsForAllLinks(content: string, context: VaultContext): .map((bracketLink): [string, string[]] => { return [bracketLink, bracketLink.split('|').map((s) => s.trim())]; }) - .filter((arr) => arr[1][0] !== '') + .filter((arr) => arr[1][0] !== '' && arr[1][0] !== '#') .map((arr) => { const aliasArr = arr[1]; //handling aliases @@ -83,7 +83,7 @@ export function requestUidForLink(obsidianLink: string, context: VaultContext) { const cleanLink = cleanUpLink(obsidianLink); const linkType = detectLinkType(cleanLink); if (cleanLink[0] === undefined) { - console.log('Parsed undefined clean link. Original link: ' + obsidianLink, 'Type of link: ' + linkType); + console.log('Parsed undefined clean link. Original link: ' + obsidianLink + '.', 'Type of link: ' + linkType); } switch (linkType) { case LinkType.DEFAULT: diff --git a/src/converters/obsidian/tests/fixtures/full.tif.json b/src/converters/obsidian/tests/fixtures/full.tif.json index a8c6b0b..8c4cff0 100644 --- a/src/converters/obsidian/tests/fixtures/full.tif.json +++ b/src/converters/obsidian/tests/fixtures/full.tif.json @@ -33,7 +33,7 @@ ] }, { - "name": "This is for testing what happens if the date is accessed first. Should write some more other tests.", + "name": "This is for testing what happens if the date is accessed first. Should write some more other tests.\n[[ # ]] Not a valid link", "createdAt": 1, "editedAt": 1, "type": "node", diff --git a/src/converters/obsidian/tests/fixtures/vault.zip b/src/converters/obsidian/tests/fixtures/vault.zip index 208ff76843b452cf6a180c8a972645396fcab11f..17940a455df1f4569d6b543fb3e5c55866eb9866 100644 GIT binary patch delta 312 zcmZ20xleL}F0;geo{0t?%u+zAIuAr`e51z*5fzzi$mGo2c(7-3Ia3itNNO@0vmuNb z!fXlBFnI!VIf&lO#S+R0HpoC^av7@uSZpP$Iuma|TTAE(1|5@H1_p-dlkc*N*B?LF zlMKS872FJrEH9WD7{G*T&qlsO3L>uG>yG-)xvfz6>dl)Z^Ft1&oI6CM?yde?Yp7Ok z{e0eT;i!((d5Jx{dc#e#mTuj8c*Bt+FSxfl?wWLpJH4do#kaX$>5M|0`_${^MTaM; z^-qvG-IBh>{hLMft2wXTZe%H65&id*y;7>@AnUb9fvkM;(8GcPT`Gz!3}Lne>6<)(xg11q=3)tD1RDg@S;lGr7F)@x&cwTCPf+OT%{g;&7#JApCf{Wj zuiq@=pA6KJTw1}+z{v7~nSlXJsP-80H5&-9RL5wp%YSp+(otav-r?Akdz{=lhj;Mt2CiQ=D zx6Fc;_5{to)gXTQ`{cr{uVPZw-(2E&G@r$K#bN%<9UQlr(cD(Rqsk0)+vFKM3T)*Z IK<6?50PUl3p#T5? diff --git a/src/converters/obsidian/tests/fixtures/vault/01.md b/src/converters/obsidian/tests/fixtures/vault/01.md index 1b8e5b2..6362e5b 100644 --- a/src/converters/obsidian/tests/fixtures/vault/01.md +++ b/src/converters/obsidian/tests/fixtures/vault/01.md @@ -1,3 +1,4 @@ DateTest:: [[04-10-2022]] -This is for testing what happens if the date is accessed first. Should write some more other tests. \ No newline at end of file +This is for testing what happens if the date is accessed first. Should write some more other tests. +[[ # ]] Not a valid link \ No newline at end of file